How to code " Stop trading downtrend and start trading uptrend"
-
hello guys
Someone can help me to code this simple strategy??
"Stop trading downtrend and start trading uptrend" -
MT5 please.
-
@piong That is very easy to do if you are a human trader, but extremely complex to implementa as a strategy. Let me ask you just 3 questions:
- When a downtrend is over?
- When an uptrend is over?
- When there is no trend right now?
You and me can use different criteria to answer those questions. Same to the EA. You need a long and detailed list of criteria you consider to answer those questions. Once you have it, we can begin to create an EA.
-
Thanks l'andorra
when MA 28 Cross over MA50 (uptrend)
when MA 28 Cross below MA50 (downtrend)
I want this to be the first condition of my EA. ( that i made it already)My concern is how to code "stop trading" when the second condition is met.
Thanks in advance
-
@piong Put a shared link here and it can be assessed, The simple way is to place a close buy/sell block above sell/buy, this will make EA close then buy/sell every time there is a cross, this will likely be a loosing strategy without other trading conditions.
-
@jstap
good dayThis basically what i have drawn
shared/vMUxjeubc -
@jstap please help
-
@piong This will show you how to do what I think you want, either way there should be enough for you to sort as required. https://fxdreema.com/shared/eINE4351c