MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Many Problems with CandlestickChart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116554] Many Problems with CandlestickChart
  • From: James Stein <mathgroup at stein.org>
  • Date: Sat, 19 Feb 2011 05:14:45 -0500 (EST)

I hame many questions/problems/bugs with CandlestickChart, for example:

1. Why does 'Show' fail to correctly display two CandlestickCharts?
2. It's OK if you match up min/max prices by hand, but...
3. It's totally hideous if you use a log scale (which you ought to want to
use).
4. Remove the workaround, keep log scale, and we're back to point 1.
5. How does one control bar coloring? Single colors look OK
  (e.g., ColorFunction -> useBlue), but how to specify two colors, such as
  the red/green used by default?
6. With log scale, why does adding a frame corrupt both dates and prices?
7. TradingChart displays nice data atop the chart during mouse-over;
  Why is this data missing for CandlestickChart?
  What can user to to get the same action here as in TradingChart?
8. What cause the right edges of TradingChart prices to be clipped
sometimes?

You can download a notebook to exhibit all these problems at
        http://dl.dropbox.com/u/9188291/Candle%20Bugs.nb
Or you can copy/paste the stuff below (which is less well organized).

Any help or advice or rtfm appreciated.

(* 0 *)
dataC = FinancialData["CY", "OHLCV", {{2010, 12, 31}, {2011, 2, 18}}];
dataI = FinancialData["INTC", "OHLCV", {{2010, 12, 31}, {2011, 2, 18}}];
(* 1 *)
CandlestickChart[dataC, ImageSize -> Small]
CandlestickChart[dataI, ImageSize -> Small]
Show[%, %%, PlotLabel -> "Show Both"]

(* 2 *)
CandlestickChart[dataC, ImageSize -> Small, PlotRange -> {18, 24}]
CandlestickChart[dataI, ImageSize -> Small, PlotRange -> {18, 24}]
Show[%, %%, PlotLabel -> "Show Both"]

(* 3 *)
CandlestickChart[dataC, ImageSize -> Small, PlotRange -> {18, 24},
ScalingFunctions -> "Log"]
CandlestickChart[dataI, ImageSize -> Small, PlotRange -> {18, 24},
ScalingFunctions -> "Log"]
Show[%, %%, PlotLabel -> "Show Both"]

(* 4 *)
CandlestickChart[dataC, ImageSize -> Small, ScalingFunctions -> "Log"]
CandlestickChart[dataI, ImageSize -> Small, ScalingFunctions -> "Log"]
Show[%, %%, PlotLabel -> "Show Both"]

(* 5 *)
useBlue[date_, open_, high_, low_, close_, change_] := Blue;
useOrange[date_, open_, high_, low_, close_, change_] := Orange;
=E2=80=A8CandlestickChart[dataI, ImageSize -> Small, ScalingFunctions -> "Log"]
=E2=80=A8CandlestickChart[dataI, ImageSize -> Small, ScalingFunctions -> "Log",
ColorFunction -> useBlue]
CandlestickChart[dataI, ImageSize -> Small, ScalingFunctions -> "Log",
ColorFunction -> useOrange]

(* 6 *)
CandlestickChart[dataI, ImageSize -> Small,=E2=80=A8 ScalingFunctions -> "Log",
Frame -> False]
CandlestickChart[dataI, ImageSize -> Small,=E2=80=A8 ScalingFunctions -> "Log",
Frame -> True]
=E2=80=A8CandlestickChart[dataI, ImageSize -> Small, Frame -> False]
CandlestickChart[dataI, ImageSize -> Small, Frame -> True]

(* 7 & 8 *)
CandlestickChart[dataI, ImageSize -> Small, Frame -> True]
TradingChart[dataI, ImageSize -> Small]
TradingChart[dataI, ImageSize -> Medium]


  • Prev by Date: Re: problem with NDSolve::dvnoarg:
  • Next by Date: Re: Another point about Mathematica 8.0
  • Previous by thread: Re: FinancialData Function Not Working for Property "Members"
  • Next by thread: Re: NDSolve Unable to find initial conditions that satisfy the