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

Re: [amibroker] MACD Predictor



PureBytes Links

Trading Reference Links

here is a fonction which calculate the next close at which the macd will cross its signal
best regards
----- Original Message -----
Sent: Tuesday, June 19, 2007 3:10 AM
Subject: [amibroker] MACD Predictor

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
mm = MACD(r1, r2);
ms = Signal(r1, r2, r3);
UpCrossover = Cross( mm, ms );
DownCrossover = Cross( ms, mm);
IIf( mm > ms, DownCrossover, UpCrossover );
ValueWhen( DownCrossover, Ref(C,1));
ValueWhen( UpCrossover, Ref(C,1));
MACDPredictor = ValueWhen( DownCrossover, Ref(C, 1)) OR
ValueWhen( UpCrossover, Ref(C,1));
Plot(MACDPredictor,"",4);

The above code is a my feeble attempt to show the very next future
closing price that would create a crossover of the mm and ms. Please
help as I am not experienced with AFL coding.

Thanks.

George

__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Attachment: function MACDCrossForecast.doc
Description: MS-Word document