hi I want to create a EA based on Simple MA. The strategy works like this. So there will be SMA 7 and Fast MA 21. When FMA crosses down the SMA “open Sell” Position and when it crosses upword it closes “Sell position” and “open Buy” position. M15 and upper TF.
please help…
Hi @perhat2007ny, Welcome to Forex… Jump right in… the water is always warm…
I understand what you are asking here, but I think you asking the wrong question? With MA Crossover’s, the fast MA is the one with the lowest periods (named because it reacts quickest to price action) the higher period MA will always be known as the Slow MA (with 2 MA’s)
The SMA 7 is the fast MA and the SMA 21 is the slow MA… now that we we have that sorted for future reference. The SMA 7 (fast) will be always the one crossing the SMA 21(slow)… The SMA 21 will never cross the 7 (it moves too fast)… I hope this makes sense…
FREE Simple MA Crossover EA… for MT4
This type of EA (Strategy) is widely available… You haven’t stated which Platform you’re using, so I have added a link to a FREE EA (Metatrader MT4) which you will be able to test on Demo first. Please supply the Platform and I maybe able to point you in the right direction.
Hope this is of some help…
1 Like
I tested that EA and looked at the parametrs but it has set of TP and SL. What I mean by that is when Fast MA crosses Slow MA up it supposed to open “BUY” order and when that Fast MA crosses Slow MA down it suposed to close that “Buy” order and open “Sell” order. No TP or SL. TP and SL set automatically when Fast MA crosses Slow MA. Hope you get my point.
Looking Forward…
@perhat2007ny, Understand, I only write code for the Ctrader Platform… which I have existing Bots that use this strategy… No SL, No TP… Position entries and exits completely governed by the Sma7 crossing above and below the Sma21…
It has a dynamic SL system to protect your earnings… Try setting TP and SL to 0… Normally that will activate the Dynamic logic… I had to translate the spanish… give that a try…
***SL dinámico - Set to True
Edit: This one has a choice of settings… Instructions Included.
Four different trading behaviors are available in the EA inputs:
- Both Side (Long and Short): The EA will buy at bullish ma crossovers and sell at bearish crossovers signals both trade
- Any Single Side: Open any one trade which signal come first (Buy or Sell)
- Long Side Only: The EA will buy at bullish signals and disregard bearish signals
- Short Side Only: The EA will sell at bearish signals and disregard bullish signals