The TRIX indicator smooths price data and then looks at the daily (or whatever time frame is being used) percentage movement of that smoothed price data. This filters out much of the price noise that’s seen on the price chart. TRIX will rise on sustained moves higher in price, and will fall on sustained moves lower in price.
//@version=2 strategy("TRIX Strategy[YaroslavG]",overlay=false) emas=input(14) trix=((ema(ema(ema(close, emas), emas), emas)-ema(ema(ema(close, emas), emas), emas)[1]) / ema(ema(ema(close, emas), emas), emas)[1]) * 10000 plot(trix) plot(0,color=black) if (crossover(trix,0)) strategy.entry("long", strategy.long) if (crossunder(trix,0)) strategy.entry("short", strategy.short)