[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] HOW TO PLOT PRICE, MACD, STOCHASTIC ON ONE CHART?



PureBytes Links

Trading Reference Links

I am having problems with Plot statements in one afl that I want to plot Price (with EMAs) at the top, Macd histogram in the middle and stochastic at the bottom.  Each of the 3 has PlotShapes as well.

Here is what I have.
1. I use the following for price with EMAs and with plotshape arrows at top.  This works fine:
Plot(Close, "Close",colorBlack,styleThick);
Plot(ema, "EMA",colorRed,styleThick);
OffsetTradeArrow = -25;
PlotShapes(ema_buy*shapeUpArrow, colorGreen, 0, Fund, OffsetTradeArrow);
PlotShapes(ema_sell*shapeDownArrow, colorRed, 0, Fund, OffsetTradeArrow);

2. Then, I move on to Macd histogram where I am having problems with Min and Max values to start with and then with how to overlay its PlotShapes:
Plot(MACD_Histo,"MACD_Histo",colorBlack,styleHistogram|styleOwnScale,min?,max?);
OffsetTradeArrow = -25;
PlotShapes(macd_buy*shapeUpArrow, colorGreen, 0, MACD_Histo, OffsetTradeArrow);
PlotShapes(macd_sell*shapeDownArrow, colorRed, 0, MACD_Histo, OffsetTradeArrow);

I play around (a lot) using an rsi example posted here but not making any progress. I can get Macd_Histo times 100 (Macd_Histo*100) to plot with min at -100 and max at 100/20*100 or 500, but have no idea why I had to use -100 for min value.  The 100/20*100 is from the rsi example posted here.  And, I can not figure out how to get PlotShapes for macd to be over this Macd_Hist plot.

3. Then, I move onto Stochastic and can only get this to plot over the Macd_histo and not below it.  So, can not figure out how to do min value, max value and then plotshapes over this.
Plot(StochDSlow,"   Slow %D",colorRed,styleThick|styleOwnScale,min?,max?);

OffsetTradeArrow = -25;
PlotShapes(stoch_buy*shapeUpArrow, colorGreen, 0, StochDSlow, OffsetTradeArrow);
PlotShapes(stoch_sell*shapeDownArrow, colorRed, 0, StochDSlow, OffsetTradeArrow);


Help appreciated.  Examples too.  Thanks.





------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/