Heiken Ashi with no tail
-
I am trying to create a simple EA that goes long when previous heiken ashi is bullish and has no lower wick (low=open) and goes short when previous heiken ashi is bearish and has no upper wick (high=open).
The EA below goes long when previous heiken ashi is bullish even when it has a lower wick. And similarly goes short even when previous heiken ashi has a upper wick.
https://fxdreema.com/shared/PicxrdRfb
What should I do to prevent the EA from entering a long when there is a lower wick and entering a long when there is an upper wick?
-
@fxgump You are requiring that two prices on candle ID 1 are exactly equal (one of them is open price). Additionally, block 128 is looking for Bull candles whereas it counterpart is not doing the same for bears.
-
Thanks l'andorra.
I corrected the assymetry between 138 and 148 and block 148 is now looking at bear candles: https://fxdreema.com/shared/qkRygnMDcI agree that using "exactly equal" could be too restrictive and might lead to very few trades. However the problem remains that the EA places trades at each and every candle regardless of whether high=open or low=open condition are met.
I don't understand why this is the case.Any idea?
-
@fxgump Well I'm not an extert at Heiken ashi candles. Are their wicks specially common or uncommon?
-
It's not infrequent that they have no tail (tail = lower wick for bullish candles and upper wick for bearish candle) and the "exactly equal" shouldn't be a problem.
What could be the reason that trades are placed even when the conditions in blocks 138 and 148 are not met? I don't understand. -
@fxgump Obviously that could be a reason, but I considered you already had checked it as confirmed. Are you sure those conditions are met often or not?
-
The problem I have is that trades are placed even when the conditions in blocks 138 and 148 are NOT met. Looks likes these two blocks are not doing their jobs.
-
@fxgump I suggesto you to try it with normal candles. Just substitute the Heiken Ashi indcator by 'Candle'. Then specify the same settings. If it works then, the reason is the indicator itself.
-
@l-andorrà I checked with a regular candle and the EA does what it is supposed to do.
I find it hard to believe that it is the indicator itself as it is the standard MT4 heiken ashi indicator. More likely the way the block processes the heiken ashi outputs. Probably a bug within the block.
What can we do?
-
Hi, have you ever found a solution for this issue? I am trying to achieve the same..
-
@danzig55 I remember an old post where someone found a custom HA indicator that could be used to do that. I don't remember who and when posted it exactly sorry. Apparently the standard MT4 HA indicator has some issues when used that way.