MACD Histogram 0 cross buy/sell
-
Hi, i´ve created a simple EA which says that if the MACD Histrogram crosses 0 above -> buy / crosses 0 below - sell.
Validating the data in the backtest, show´s that it´s not considering the Histogram crossing of 0 , intead it opens positions anywhere.Any idea how to fix it? Below a example of the sell condition setup.

Many thanks
-
@starfactor in "more setting" field specify candle ID =1
-
@ambrogio thanks mate, i have changed it and updated the EA, but seems still not working as designed. Any idea on that?

-
@starfactor Be careful, you're reasoning with MACD but you're working with OSMA in your condition block, it's not the same thing
-
@ambrogio Thanks but I thought this is the setup for using the MACD Histogram for signals?
-
This depends what you mean by "histogram". In some charting software, the histogram (grey bars) is the difference between macd and its signal line. Metatrader, on the other hand, displays the actual macd main line as histogram.
-
-
@starfactor please do you mind if you could share your settings link for the EA to see how you set each block. thanks in advance
-
-
I had the same issue with macd. Im not near my pc to show example for you but perhaps i can explain what u need to do.
So ur gna first create.
1.condition (Macd)
2.close trades (sell)
3.no trade (buy)
4.Buy now
5.Close trade (buys)
6.no trade (sell)
7.Sell nowSo on 1. (Macd)
Ur gna select macd, Main line, candle 1Value: 0
Then focusing on just the orrange link of condition 1.
On 1 (orange link)
Connect number 2( filter by sells) to 1
Connect number 3 (filter by buys) to 1
And connect number 4 to number 3The focusing on just the yellow link of condition 1.
On 1 (yellow link)
Connect number 5 (filter by buys) to 1
Connect number 6 (filter by sells) to 1
Connect number 7 to 6So it will look something like so...
Macd / / \ \Close sell trades / \ close buy trades
/ \
No buy trade no sell trade
| |
Buy now sell now -
I forgot to mention
U must put macd > 0 and not macd x>0 -
@luqmaan pls I know that this post is old, but pls I have been trying to replicate the ea you've described without success, pls I need your help. Thanks