need a help to write an EA

 
i am a new to MQL4.I wanted to send an automated buy trade whenever upper arrow comes and sell whenever down arrow comes Will it be possible to help me to develop an EA based on the following indicator? https://www.mql5.com/en/code/9276
 
chr2010 wrote >>
i am a new to MQL4.I wanted to send an automated buy trade whenever upper arrow comes and sell whenever down arrow comes Will it be possible to help me to develop an EA based on the following indicator? https://www.mql5.com/en/code/9276

A quick scan of the code used in indicator 609 shows that the arrows are generated when the +DI crosses the -DI in the Average Directional Movement indicator.


It unfortunately has a flaw that makes it useless: it uses shift-1, ie a future value, for calculating the cross.


This could be corrected, but the lovely picking of peaks and valleys would go out the window and it would exhibit large drawdowns during sideways markets, which is sadly the case with most trend followers.


Paul