ATR Risk Calculator MT5
- Utilities
- Andrew Mcculloch
- Version: 1.10
- Updated: 24 May 2026
ATR Stop Loss and Take Profit Calculator. Know your risk before you take the trade!
Click any candle and instantly see your stop loss, take profit, and correct lot size, all calculated from ATR, scaled to your account. A useful back-testing and live trading tool.
If you find this indicator useful, please leave a review
How It Works
Click a candle. The indicator reads ATR at that bar, calculates SL and TP using your configured multipliers, and draws the levels on the chart. An info panel shows prices, pip distances, lot size for your risk percentage, and whether the trade would have won or lost.
Click once — BUY setup. Entry at candle close, SL below, TP above.
Click again on the same candle — SELL setup. SL above, TP below.
Click a third time on the same candle — clears everything.
Click a different candle at any time — resets to a fresh BUY setup on the new candle. No need to clear first.
What You See
Three lines forward from the entry candle: solid entry line, dotted SL and TP levels. A directional arrow marks the entry.
When the outcome is determined, a filled zone is drawn from the entry bar to the exact candle where TP or SL was hit. Win fills and loss fills have independent configurable colours, making it immediately obvious at a glance whether the setup paid off. The fill can be toggled off if you prefer lines only.
The info panel displays:
- Direction — BUY or SELL
- Outcome — WIN, LOSS, or NO RESULT if price did not reach either level within the evaluation window
- Entry, SL, and TP — exact prices with pip distances
- ATR value at the clicked bar
- Lot size — calculated for your risk percentage against your current account balance
- Risk amount in account currency
The outcome is determined by walking forward through subsequent bars and checking whether price hit TP or SL first. If both are touched on the same bar, it assumes worst case (SL first). Click through historical candles to quickly evaluate setups and build intuition.
Lot Size Calculation
The indicator sizes your position so that if SL is hit, you lose exactly your configured risk percentage. It uses the symbol's tick value and tick size, rounds down to the nearest valid lot step, and respects your broker's min/max lot constraints. Works across forex, indices, commodities, and crypto.
No more lot size calculators in a separate browser tab.
Configuration
ATR Period — Lookback for the Average True Range. Shorter periods react faster to recent volatility, longer periods smooth it out.
ATR Multiplier for Stop Loss — ATR distance from entry to SL. A value of 1.5 places the stop 1.5 ATRs away.
ATR Multiplier for Take Profit — ATR distance from entry to TP. With the defaults of 1.5 SL and 2.0 TP, every setup has a positive R:R built in.
Risk % — Percentage of account balance at risk per trade. Lot size is derived from this.
Line length — How far forward the lines extend. The outcome check uses the same window — if neither level is hit within 30 bars, the result shows NO RESULT.
Colours — Entry line, SL line, TP line, panel background, and panel text are all independently configurable.
Show fill — Toggle the outcome fill zone on or off. When enabled, a filled rectangle is drawn from the entry candle to the bar where TP or SL was hit.
Win fill colour / Loss fill colour — Independent colours for win and loss fill zones. Choose colours that suit your chart theme.
