How to set MA cross signal?

Avatar
  • updated

To set the MA cross signal, simply use the MACD filter in "Buy on Main > 0 / Sell on Main < 0" mode.

The MACD histogram is the difference between 2 MAs (fast and slow). So, when the histogramm crosses the 0 level, the fast MA crosses the slow MA:

Image 2633

That's all! )

Avatar
Choong Seng Chen

I tried this, I'm expecting that when it cross the line, both red and blue will light up, however, it seems like it is not the case, the blue lights up when MACD is above 0 while red lights up when MACD is below 0.

I'm not sure if I did it correctly, I wanted it to start 1st OP only when it cross, the cross is a trigger, and I'll couple with another signal (e.g. MA) to set the direction either BUY or SELL.

Avatar
jagr19

will it keep opening new buy or sell trades while main >0 or sell <0 or only 1 trade when it first crosses. would very much like to have it just enter a single trade when it first crosses.

Avatar
Andrey Khatimlianskyi

If you use only one MACD filter in "Buy on Main > 0 / Sell on Main < 0", EA opens new buy all the time when MACD > 0. So, new position is opened as soon as previous one is closed by TP, for example.

Let me know if you need "Buy on Main crosses 0 above / Sell on Main crosses 0 below" mode, I'll add it.

Avatar
Mayank Gupta

I am also facing the above Issue, Please add this logic in next version of CP, I need something like as below

Avatar
Mikhail Kukhta
Quote from Andrey Khatimlianskyi

If you use only one MACD filter in "Buy on Main > 0 / Sell on Main < 0", EA opens new buy all the time when MACD > 0. So, new position is opened as soon as previous one is closed by TP, for example.

Let me know if you need "Buy on Main crosses 0 above / Sell on Main crosses 0 below" mode, I'll add it.

Indeed, it would not be bad to add this parameter to the already existing ones in the MACD. 

Avatar
Ulises Cune

This script can help with a simple click to modify the strategy to use the 2 ema crossover (EMA Fast=20 corss EMA Slow=50) using MACD as explained by Andrey.

Image 2987

https://communitypowerea.userecho.com/en/communities/7/topics/365-script-to-optimize-the-setting-file-not-the-strategy?redirect_to_reply=3713#comment-3713