Trade on MA Cross above or below
-
Is there a way of triggering a trade regardless of whether the cross is above or below and close trades in the same way?
-
Of course it is, but some more info about what you exactly need would be appreciated.
-
There's an example EA that does exactly this in the tutorial section of this website somewhere. It will buy when they cross, then when they cross again it will close it out and enter a short position. It'll continually buy, sell, buy, sell etc.
-
@l-andorrà Thanks for your reply. I have a simple ma crossover strategy that dictates buy when indicators cross above or below and another oscillator is signalling buy. I have tried making two condition trees for buy so that the EA will buy regardless of whether the cross is above or below but that has not worked.
-
Ok. Could you please share your project? That way we'll be able to find the issue.
-
@andrew-4 thanks Andrew but that is not what I want
-
@l-andorrà Sorry for the delay and thanks for your offer. The advisor is triggered by an MA cross either above or below. I want it to buy when the MACD main is above the signal line and sell when the MACD main is below the signal line.
I have enclosed the file and screenshots.
Blocks 2,8,11 and 15 are all the same
Blocks 18,23,26 and 30 are all the same
Block 31 is the reverse of Block 17
Note the EA title is incorrect as was an earlier version3_1583908019049_MACrossStochasticfxdreema.mq5 2_1583908019049_MACrossStochasticfxdreema.ex5

-
Specify candle ID 1 in all operands of all condition blocks.