ATR Dynamic Support and Resistance Bands
Fixed price levels do not adapt to the market: a 50-pip move means a lot on a quiet day and very little on a volatile one. This indicator solves that by measuring the distance from a central moving average in units of ATR, the average true range of recent bars.
The upper band is basis + multiplier x ATR and the lower band is basis - multiplier x ATR. Price tends to react near these bands, so they work as dynamic resistance and support that automatically adjust to current volatility.
The ATR is calculated inside the indicator with Wilder smoothing, so no indicator handles are needed. On each new tick only the last bar is recalculated, and the full history is processed only once at start.
Bands are context, not signals on their own. In a strong trend price can walk along a band for a long time, so confirm with price action or other tools.
| Input | Default | Purpose |
|---|---|---|
| Basis line | ||
| InpBasisPeriod | 20 | Period of the basis moving average (2 and above) |
| InpBasisMethod | BASIS_SMA | Basis moving average method: BASIS_SMA (simple) or BASIS_EMA (exponential) |
| ATR bands | ||
| InpAtrPeriod | 14 | ATR period (1 and above) |
| InpMultiplier | 2.0 | ATR multiplier; the distance of each band from the basis (must be greater than zero) |
| Appearance | ||
| InpUpperColor | clrWhite | Color of the upper band |
| InpLowerColor | clrSilver | Color of the lower band |
| InpBasisColor | clrGray | Color of the basis line |
| InpBandStyle | STYLE_DASH | Line style of the upper and lower bands |
| InpBasisStyle | STYLE_DOT | Line style of the basis line |
| InpLineWidth | 1 | Line width of all lines (1 to 5) |
| InpShowBasis | true | Show or hide the basis line |
| Info label | ||
| InpShowInfo | true | Show the info label with the ATR value in the chart corner |
| InpInfoColor | clrWhite | Color of the info label |
Fig. 1. AtrBands on an H1 chart with default settings (black and white image per Code Base guidelines).
Supertrend EA Gold Breakeven
Supertrend expert advisor for MT5 on Gold (XAUUSD), forex and indices: entry on the closed candle of the flip, stop at the Supertrend line, target by stop multiple, breakeven and lot by risk percent. Open source code.
Daily Pivot Points – Classic, Fibonacci and Camarilla
Daily pivot point with three resistance levels and three support levels, using Classic, Fibonacci or Camarilla formulas.
Candle Countdown Timer and Spread Display on Chart
Shows the time left until the current candle closes and the current spread in a corner of the chart. The countdown updates every second, even when no new ticks arrive.
MACD Signals
Indicator edition for new platform.