In this example we are usign a cross over between 2 moving averages. In this case the trend decider(bigger timeframe 2h) and the actual chart ma (1h).
At the same time I applied an extra for MTF calculation.
Rules are simple :
short on 1h -> we enter when we have a crossunder between 1h ma and 4h ma
we exit when we have a crossover between 1h ma and 4h ma
long on 1h -> we enter when we have a crossover between 1h ma and 4h ma
we exit when we have a crossunder between 1h ma and 4h ma
Warning : Due to the nature of the approach and security function for candle calculations, you can expect repainting issues.
So I recommend to use close of a candle confirmation or a manual approach instead using it as a study instead of strategy.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
Telegram group: https://t.me/atrader_life