It's a simple trend following system. Play with the setups. Works best on 30min and up timeframes. Look at the code for better understanding.
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.