Hi Coders. I wonder if somebody can be so kind and assist me with a code for entries for the following strategy (Magic 100) please https://www.forexfactory.com/thread/989445-magic-100. I can take it from there and write my EA to test the strategy. I am just not good enough to know how to code the entries logic. I appreciate there are EAs provided by various people on the thread, but they are all .ex4 files, so I can't see the coding. Thank you. For clarity of what I am after:
Buy: Price is above the 100EMA, place a buy stop order above the red candle. Stop is under the red candle.
Sell: Price is under the 100EMA, place a sell order under the green candle. Stop is above the green candle.
Basically, set a pending order at the high of the last retracement candle (red) and a stop loss beneath the low of the same candle on a long trade (if uptrend - price above 100ema). If more candles (red) form lower after that candle, then move the pending buy and stop to that new candle. Vice versa for a downtrend - price below 100ema, set pending sell order at low of last retracement candle (green) and stop loss above the high, and if more candles(green) form higher after that candle, move the pending sell and stop to the new candle.
Buy: Price is above the 100EMA, place a buy stop order above the red candle. Stop is under the red candle.
Sell: Price is under the 100EMA, place a sell order under the green candle. Stop is above the green candle.
Basically, set a pending order at the high of the last retracement candle (red) and a stop loss beneath the low of the same candle on a long trade (if uptrend - price above 100ema). If more candles (red) form lower after that candle, then move the pending buy and stop to that new candle. Vice versa for a downtrend - price below 100ema, set pending sell order at low of last retracement candle (green) and stop loss above the high, and if more candles(green) form higher after that candle, move the pending sell and stop to the new candle.