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…
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue