An obvious reason would be that the Indicator generates “in bar” an Entry arrow (works at Tick level), which is not valid any more at the transition to the next bar with the longer timeframe (like 1 hour).
When drawing the “DrawArrowUP”, the indicator uses a bar index (barrabasso) and a value (basso) that do not come from the “MACD crosses under” but from the “Low” values…
This is where it goes wrong, the “Arrow” doesn’t use the values of the “Crosses Under” but of the “Low” value…
If Low<basso then
basso=low
barrabasso=barindex
EndIf
If you don’t use this piece of code, you will get the same signals…
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok