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

[amibroker] MACD Signal Value



PureBytes Links

Trading Reference Links

I am looking to get the value of the MACD Signal line to test if it 
is over/under 0.

The code below (taken from AMIBroker MACD indicator) will give the 
the signal and I can plot it, but how do I check the value for the 
current bar?

MACDr1 = Param( "Fast avg", 12, 2, 200, 1 );
MACDr2 = Param( "Slow avg", 26, 2, 200, 1 );
MACDr3 = Param( "Signal avg", 9, 2, 200, 1 );

//MACD Signal Line
MACD_Signal = Signal(MACDr1,MACDr2,MACDr3);

//Plot it just for a test
Plot(MACD_Signal,"MACD VALUE", colorBlue, styleLine );

//Now I want to know the value of the current day
if (MACD_Signal > 0)
{
  //perform some other logic for buy/sells.....
}

Question: MACD_Signal is an array at this point (per the error in the 
AFL Editor) how to I get the current value for the current bar? 




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

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html
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/