Need Help with MA Strategy
-
Hi All
I am trying to create this strategy but cant seem to get it working. The idea is very simple.
Entry conditions (BUY):
- Price needs to cross through and close above the 20 SMA
- Price needs to close above the 50 SMA
Buy two market orders.
Stoploss for both orders is the value of ATR(14) in pips
1st Order Take Profit is value of ATR(14) in pips
2nd Order Take Profit is when price closes below the 20 SMAClose all open orders if price closes below 20 SMA
This is what I have: https://fxdreema.com/shared/HYjmYblEc
When I run this on backtest the entry criteria seem to work well, although it does miss some valid entries. The big problem is that it ignores the stoploss and take profits for the first order. Instead it just closes both orders when price closes below the 20 SMA.
Hope I explained it well enough.
Any help would be greatly appreciated
-
ATR gives us values like 0.0014, which I call "price fraction" in some blocks, and maybe "digits" in others... if I missed to fix it. "Pips" expects values like 14. Of course you can multiply ATR by 10000, but this "price fraction" is already available, so... https://fxdreema.com/shared/qRuutgoU
-
Thank you very much. Worked perfectly. Much appreciated