The indicator that drives the robot is based on ATR (average true range) and drawn on the price chart.
In summary: In the end we will have a channel that will be used as a SAR (stop and reverse).
- The indicator will calculate the ATR for the last X bars (X is an external variable).
- The indicator will subtract the ATR value from the highest price in the last Y bars and draw a line (Y is an external variable and can be different from the ATR period)
- The indicator will add the ATR value from the lowest price in the last Y bars and draw a line.