//@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)
Only thing behind is this security TIM. I'm not sure what it is. I searched for it and there is a TIM as well but it doesn't really look related. Also it wouldn't explain why the backtest creates clean and profitable trades while it stumbles around when going live. It looks like the security is repainted, but then again it also looks like a normal behaviour of tradingview.
Quite confusing. Not sure if something can be done with it.
The difference when using it live comes from tradingview itself, how it creates these 160 min candles. That's why it's jumpy.
Not sure of the value at all. If the trend is clear and unbroken it might work somewhat, when it's ranging it is dangerous. So somewhat similar to crossing averages.
How do you write in Russian? I see a message that only English is allowed.