reference · Technical analysis
Average True Range: Gaps, Smoothing and Units
Average True Range smooths a measure of each bar’s movement that includes gaps from the previous close. ATR measures historical range magnitude, not whether the next move will be up or down.

What ATR measures, and what it leaves out
Average True Range measures historical range magnitude, including gaps. It does not predict direction or supply a position size by itself. ATR-based position sizing adds a declared stop-distance rule, monetary conversion, costs, a risk budget and executable quantity constraints. The calculation below is an educational model for a fictional linear instrument, not a recommended allocation or a claim about TradeCopier settings.
Why the previous close matters
True range is the largest of high minus low, the absolute high minus previous close, and the absolute low minus previous close. Fidelity documents this construction and Wilder’s update: new ATR = (previous ATR × (n − 1) + current true range) / n. Initialization and smoothing must match when comparing implementations; an n-period label alone is insufficient.
Keep the original gap example: previous close 100, current high 105 and low 103. The three distances are 2, 5 and 3, so true range is 5. A narrow current bar has not erased the gap. Starting from an initialized 14-period ATR of 2, the next ATR is (13 × 2 + 5) / 14 = 31/14, approximately 2.214286 price units. This is a statistic, not the next bar’s promised range.
Freeze the information available at the decision
Call that completed observation bar t−1. A sizing decision at bar t uses ATR(t−1) = 31/14; it does not read the final high and low of bar t before they exist. Record the instrument, timeframe, completed-bar timestamp, history adjustment and initialization convention. An unfinished bar can change the indicator. In MetaQuotes, CopyBuffer position zero refers to the current bar, so buffer selection matters.
Missing bars, session changes, futures rolls and stock adjustments can distort comparisons. A stale observation is not automatically usable merely because it is nonzero. Define an age limit and data-quality rule before the decision. ATR divided by a chosen price, multiplied by 100, gives a percentage statistic; do not substitute that number into a price-distance formula without converting it back.
Round the stop before calculating cash exposure
Assume a hypothetical long entry at 100, multiplier k = 2 and a price tick of 0.25. The raw distance is 2 × 31/14 = 31/7, approximately 4.428571. The unrounded long stop is 95.571429. Our declared outward-rounding rule rounds down to 95.50, making the actual modeled distance 4.50. For a short position, the analogous outward rule rounds the proposed stop upward. These are explicit modeling choices, not universal order rules.
The ATR itself is about 8.857143 ticks. A fractional statistic is valid, while an order price must satisfy its applicable grid. Round the proposed price first and recompute distance; rounding a previously calculated quantity cannot repair an invalid stop. Review price-grid validity separately from broker stop-distance requirements.
Translate the distance into a cost-aware quantity
Use fictional account equity of USD 23,000 and an illustrative budget B = USD 230, or 1%. This percentage is an arithmetic assumption, not a suggested risk level. Assume one lot changes by USD 100 per price unit, already expressed in the account currency, plus USD 10 of total modeled round-trip costs per lot. Costs are assumed linear in quantity here. Avoid counting a spread twice if it is already included in the entry-to-exit distance.
For this linear model, risk per lot R = distance × monetary value per price unit per lot + costs per lot. Thus R = 4.50 × 100 + 10 = USD 460 per lot, and unconstrained quantity q = B/R = 230/460 = 0.50 lot. A different settlement currency needs a documented conversion before dividing. Nonlinear payoffs and fixed minimum fees require a different model, not blind reuse of this formula.
Apply caps and quantity floors without forcing a trade
Suppose the operator’s hypothetical maximum is 0.37 lot and the fictional broker permits 0.10, 0.20, 0.30 and successive 0.10 increments. Cap the raw 0.50 at 0.37, then round down to the permitted 0.30 lot. Its modeled exposure is 0.30 × 460 = USD 138. The operator cap need not itself be an executable size; the chosen quantity must satisfy both conditions.
MetaQuotes lists separate tick-size, minimum-volume, maximum-volume, volume-step and aggregate-volume properties. Check the actual instrument and account rather than assuming the example’s grid. A per-order maximum also does not establish remaining portfolio capacity. Margin, existing positions and pending orders require their own checks. A number that passes this worksheet does not prove that a broker will accept an order.
Stress the same quantity before considering a resize
Now model an additional adverse exit movement of 3.00 price units beyond the planned stop, with total costs rising to USD 20 per lot. Stressed risk per lot becomes (4.50 + 3.00) × 100 + 20 = USD 770. Keeping the original 0.30 lot gives USD 231, exceeding the USD 230 budget by USD 1. The base calculation has not capped the realized loss.
If this stress case is made a pre-trade sizing constraint, 230/770 is approximately 0.298701 lot. Applying the same cap and grid yields 0.20 lot, with stressed exposure USD 154. That is a separate proposed size, not a retroactive change to an existing fill. Stress inputs are scenarios, not forecasts or worst-case bounds; a larger gap or other costs could exceed them.
| Case | Budget USD | Risk per lot USD | Quantity lots | Modeled exposure USD |
|---|---|---|---|---|
| Base after cap and grid | 230 | 460 | 0.30 | 138 |
| Stress, unchanged quantity | 230 | 770 | 0.30 | 231 |
| Stress-constrained resize | 230 | 770 | 0.20 | 154 |
| Small budget; no trade | 40 | 460 | 0 | No order; minimum would model 46 |
When the output should be no trade or unavailable
With a USD 40 budget, the raw size is 40/460 = 2/23, approximately 0.086957 lot. It is below the 0.10 minimum, whose modeled exposure would be USD 46. Skip the proposed trade; rounding upward to the minimum violates the budget. An operator cap below the permitted minimum likewise leaves no valid quantity.
Missing ATR, absent currency conversion, unknown costs or an invalid contract multiplier mean the calculation is unavailable. Zero or negative ATR, nonpositive tick or quantity step, and nonpositive budget fail this model’s input checks. Do not replace missing values with zero, divide by zero, or silently clamp ATR to a convenient floor. A deliberate volatility floor changes the model and must be disclosed and retested.
Keep a reproducible decision record
Download the worked scenario CSV and blank manual review CSV. They contain values and review fields, not automatic calculations or an order-import format. Record observed inputs, timestamps, conversion, costs, cap, grid, base and stressed outcomes, and a reason for skipping. The manual file starts unreviewed; filling it does not certify product support.
Use the futures sizing calculator or its forex counterpart to examine declared cash assumptions. Keltner Channels show another use of ATR, as an envelope width. Copying an account instruction does not make instruments’ monetary values identical: validate each follower’s inputs independently. None of these calculations guarantees a stop fill at its planned price.
Questions and answers
Does a rising ATR predict a rising price?
No. ATR measures historical range magnitude. Upward moves, downward moves and gaps can all increase it.
What is the ATR position-sizing formula?
In the stated linear model, quantity = budget / [(rounded stop distance × cash value per price unit per lot) + total modeled costs per lot]. Apply account and broker constraints afterward, and do not use the formula when required inputs are unavailable.
Why use a lagged, completed ATR value?
It fixes information available at the decision. Using the final range of the current unfinished bar in a historical decision can introduce information that was not yet known.
Should the stop price or lot size be rounded first?
Under this example’s rule, round the stop outward to the price grid first, recalculate its distance and cash exposure, then cap and round quantity down to a permitted size.
What happens when the minimum lot exceeds the budget?
The proposed trade is skipped. In the example, the minimum 0.10 lot models USD 46 of exposure, exceeding a USD 40 budget; forcing the minimum would violate that budget.
Can ATR be zero or unavailable?
Yes. This model rejects zero or negative ATR and treats missing or stale data as unavailable under its declared checks. It does not divide by zero or silently substitute a volatility floor.
Is a two-ATR stop a guaranteed loss limit?
No. The example’s 0.30 lot models USD 138 under base assumptions but USD 231 under the stated adverse-exit and higher-cost stress. Actual execution can be worse than either scenario.
Are these caps and rounding rules TradeCopier settings?
No. The cap, grid and cost values are fictional educational assumptions. Verify the current instrument, broker, account and supported product behavior separately before translating a calculation into an instruction.
Sources and further checks
Use the current source for your exact instrument, account and platform. Referencing a general specification does not establish support for every TradeCopier workflow.
- Fidelity: Average True Range · Checked September 22, 2026
- MetaQuotes: Technical indicator interfaces · Checked September 19, 2026
- MetaQuotes: CopyBuffer and current-bar indexing · Checked September 22, 2026
- MetaQuotes: Symbol price and volume properties · Checked September 22, 2026
Found an error? Send a correction with this page's address and a primary source. See our editorial standards for how we handle examples, claims and revisions.






