I'd like some help to create an EA I use to catch the second or third leg of a trend, originally recommended by Fxbootcamp.
The strategy is the second stochastic cross(at candle close) above the oversold line and after MACD has gone that way. I use this strategy as a confirmation for trades I've already planned, but I think it might be viable as a standalone Expert Advisor. Like most EA's though, it will not be profitable in a consolidating market. Therefore, before making a trade, it must refer to the MACD histogram(called value3 in the template) from the previous candle. If it greater than value X(for a long) or -X (for a short), the trade would be made. Obviously that histogram value will have to be entered by the user based on time frame and risk profile. Even better if it can have a filter for market direction such as 21ema above/below the 55ema. I don't have the mql4 knowledge to program this yet, but I'm working on it.
I've attached an example picture on a 15m chart where the macd histogram value would be -0.000169. At the time, however, that value would not have been known, as the candle had not formed yet. The previous candle was a known value, though, which in this case was -0.000121. That is the candle that must be above value X/-X.
I would generally close half position at 20 pips, and rest at next macd cross, but it may work better in some cases just to take 20pips. Either way, I'd really like to play with it and if I get settings right, I'll share them.
All values user-selectable, but below are the values I use.
EMAs 21, 55
Attachments are a template and 2 indis, since the fxb-clean template uses the EX4, I have included that, but obviously the modifiable one is MACDcorrect.mq4
Thanks in advance.