//@version=2 strategy("GetTrendStrategy", overlay=true) tim=input('160') out1 = security(tickerid, tim, open) out2 = security(tickerid, tim, close) plot(out1,color=red) plot(out2,color=green) longCondition = crossover(security(tickerid, tim, close),security(tickerid, tim, open)) if (longCondition) strategy.entry("long", strategy.long) shortCondition = crossunder(security(tickerid, tim, close),security(tickerid, tim, open)) if (shortCondition) strategy.entry("short", strategy.short)
It is a repainting if the trend is not confirmed (as this is looking ahead for a confirmation). I mean it still works because when you have an entry signal, you can entry and place a stop loss.
The results you see are not real, the indicator changes the values of the past bars or histogram so it looks like it works but it doesn't, the past is "repainted" in every tick or 160 min or what ever timeframe he use
Unlike moving average , MAs will not repaint, they are all based on averages of the past, what you see is what they are. No cheating No false indication No fake signal