This indicator measures the largest distance between a price (high or low) and a moving average. It may come in handy for strategies that open reverse positions as price moves away from a moving average within a certain range, awaiting it to return so the position can be closed.
It just works on any symbol and timeframe.
- Moving average period: Period for moving average calculation.
- Moving average method: You can choose between "Simple", "Exponential", "Smoothed" and "Linear-weighted" moving average methods.
- Average distance calculation period: This is the calculation period for the average distance, and the options are "today", "today + yesterday", "today + past 2 days", "today + past 3 days", "today + past 4 days", "today + past 5 days" and "today + past 6 days".
- Histogram color, width and style.
- Level lines color, style and thickness.
- Copy this project folder to your MetaEditor indicator folder.
- Select the .mq5 file and click 'Compile' button on MetaEditor.
- On MetaTrader, insert this compiled indicator into the chart you want.