From: Daisy F. <eli...@ya...> - 2005-04-04 22:13:03
|
John, Thank you for your reply. A couple of issues though. I looked at the documentation and saw the alpha transperancy parameter, but for some reason I was still getting the same results. Maybe I am missing something very fundamental. If alpha is not provided then the default is for the candlestick box not to be transperant, correct? Even changing the alpha value wouldn't produced desired results, I can increase transperancy, but not eliminate it. I wasn't seeing that since I can still see the lines (wicks) go through the boxes that's why I asked here. Also, this may be another foolish oversight on my part, but how come when I have candlestick2(axMiddle, opens, closes, highs, lows, width=4, colorup='k', colordown='r') instead of getting a bar colored black when it closes above the open price I get the opposite --- red? It seems colorup should be black, colordown -- red as in colorup : the color of the lines where close >= open colordown : the color of the lines where close < open As far as the moving average calculation, I did see the disclaimer and didn't mean to be a stickler, it just seem a bit misleading to me as I was trying to do the Exponential Moving Average calculation and compare the results to the actual financial charts. They didn't match and I thought I would point that out. --- John Hunter <jdh...@ac...> wrote: > >>>>> "Daisy" == Daisy Fuentes <eli...@ya...> > writes: > > Daisy> I was looking at the example located @ > Daisy> > http://matplotlib.sourceforge.net/screenshots/finance_work2.py > Daisy> and was wondering if it's possible to > color the candlestick > Daisy> boxes so that the candlestick wicks are > not visible through > Daisy> them. > > Yes, the alpha argument to the candlestick plot > controls the > transparency. alpha is the traditional name for the > transparency > level, so look for it in documentation strings, eg > in > > http://matplotlib.sf.net/matplotlib.finance.html#-candlestick > > Daisy> Additionally, is it possible to have a > candlestick > Daisy> that's not just a plain line when the > open and the close > Daisy> prices are the same. Would it be possible > to add a > Daisy> horizontal tick mark? > Daisy> | > Daisy> | > Daisy> - > Daisy> | > Daisy> | > > You can add these marks fairly easily yourself by > adding an additional > plot command, and using the marker style TICKLEFT or > TICKRIGHT. In > other words, you can plot any kind of line you want > more or less. The > candlestick method may not support it directly, but > it is easy to > overlay. We should probably add a marker style > TICKCENTERX for this > kind of marker, and better add TICKCENTERY for > symmetry. It's only a > few lines of code that need to be added to the > lines.py module. > > Daisy> Also, I noticed that the simple moving > average is > Daisy> calculated based on the price open > instead of price close. > > I'm not attempting to make a financially meaningful > plot, but to > illustrate plotting techniques. You are free to do > moving averages > over open, close, average or random data. As I note > in the > finance_work screenshot text > > Some of the data in the plot, are real financial > data, some are > random traces that I used since the goal was to > illustrate plotting > techniques, not market analysis! > > Hope this helps, > JDH > __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com |