Trend Analysis with MA and ATR
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.