ATR as the determinant of the trend
This indicator features 3 types of marks on the chart:
- Green arrow above the candle means that an upward movement is expected
- Red arrow below the candle means that a downward movement is expected
- Blue cross in the middle of the candle means the previous signal has weakened
- dist - integer value that represents the number of bars used in calculation, in other words, the period.
- percent - fractional number ranging from 0.5 to 1.0. The less the value, the stronger and less frequent the signals.
The program considers 'dist' last candles and calculates the ATR of the rising and ATR of the falling ones. After that it compares them using the 'percent' coefficient and generates the signal.
Advantage of this approach primarily lies in its dynamism, especially if 'dist' is set to a small value.