Stop-loss placement defines where a price-based rule requests an exit to limit a trade's loss. Methods use a fixed distance, an Average True Range (ATR) multiple, a swing level or a volatility band; time stops instead define when to request closure. There is no universal stop location. Broker quote-side, minimum-distance and price-increment rules still apply, and a chart-only exit is separate from a broker-held stop.

This guide belongs to the risk management library. Separate three decisions: how the stop is calculated, what loss the position size implies, and where the exit is enforced.
Stop-loss placement methods at a glance
Scroll horizontally to read every column.
| Method | Rule input | Important limitation |
|---|---|---|
| Fixed distance | A specified price, pip or tick distance | The same distance does not adapt to changing volatility |
| ATR multiple | ATR × a chosen multiplier | The result depends on the data, timeframe and evaluation time |
| Structure-based | A defined swing low or high, with any explicit buffer | A pivot may only become known several bars later |
| Volatility band | A specified upper or lower band | A moving band can widen as well as tighten the candidate stop |
| Time stop | Elapsed time or completed bars since a defined event | It specifies an exit time condition, not a maximum price loss |
TradingView's strategy FAQ documents fixed-distance stops, ATR-based stops and time-based exits.[1] A documented method is not a recommended setting.
How do you calculate a stop-loss price?
Initial long stop = entry reference − distance · Initial short stop = entry reference + distance
Stop distance in pips = |entry reference − stop price| ÷ pip size
These formulas describe an initial stop on the loss side of entry. The entry reference is the price used for the calculation, which may differ from the eventual fill. PineConnector documents these relationships for its explicit stop parameters.[2]
For an ATR-based distance, distance = ATR in price units × chosen multiplier. Specify the feed, timeframe, lookback, smoothing convention and bar used. Also state whether that initial distance stays fixed or becomes part of a separate trailing rule.[1]
Units matter. TradingView's strategy.exit() uses ticks for its relative loss parameter and an absolute price for stop.[1] PineConnector defines one pip as ten symbol quoting points. The broker's tick size separately determines valid price increments.[2]
Worked example: three rules, three stop distances
Illustrative numbers, not a recommendation. Assume a long entry reference of 1.10000, pip size 0.00010, and supplied ATR of 0.00150. The structure rule uses an already-confirmed swing low of 1.09650 and a 0.00050 buffer.
| Placement rule | Calculated stop | Entry-to-stop distance |
|---|---|---|
| Fixed 20 pips | 1.10000 − (20 × 0.00010) = 1.09800 | 20 pips |
| ATR × 2 | 1.10000 − (0.00150 × 2) = 1.09700 | 30 pips |
| Swing low minus buffer | 1.09650 − 0.00050 = 1.09600 | 40 pips |
Assume USD 10 per pip per 1.00 lot. At 0.10 lot, those distances imply USD 20, USD 30 and USD 40 of planned loss before costs. Keeping quantity unchanged while widening the stop changes the cash exposure.
Position size (lots) = risk amount ÷ (stop distance in pips × pip value per 1.00 lot)
A hypothetical USD 60 budget instead gives 0.30 lots at 20 pips, 0.20 lots at 30 pips and 0.15 lots at 40 pips. Each fits an illustrative 0.01-lot step. The position sizing guide covers rounding down and checking minimum and maximum volume. PineConnector documents the loss-based formula, while warning that costs and execution can change the actual loss.[2]
What does each placement method need to specify?
Fixed distance and ATR stops
A fixed-distance rule needs a unit and an anchor; an ATR rule adds a volatility input. Neither implies that the initial stop moves later. The ATR trailing stop guide explains the separate update schedule and rule for retaining or replacing an existing stop.
Structure-based stops
A structure rule can define a long stop below a specified swing low, or a short stop above a specified swing high. Define the lookback or pivot-confirmation rule, the buffer and when the level becomes available.
The timing is consequential. TradingView documents how a pivot detected several bars later can be plotted back on the earlier bar.[3] A retrospective label does not make that swing available at entry. Test the rule using the confirmation time, as explained in pivot confirmation and repainting.
Volatility-band stops
A band rule takes its candidate price from a defined band rather than from the entry. For example, TradingView documents bands calculated as a basis average plus or minus a scaled deviation.[4] Specify the band calculation, selected side and evaluation bar.
A rule might use the lower band for a long, subject to the stop being valid below the broker's bid. Freezing that initial band value and updating it each bar produce different exits. If updates must only tighten a stop, encode that restriction explicitly.
Time stops
A time stop requests closure after a specified duration or bar count, regardless of whether a price level has been reached. TradingView's FAQ demonstrates elapsed-time exits and explains that historical time conditions are evaluated at bar closes.[1] An elapsed-time condition becoming true is separate from the order's fill.
Define whether the clock begins at the signal, simulated entry or broker fill. Those are separate events. A time stop does not supply an entry-to-stop price distance for risk sizing. A separate initial price stop can coexist with the time-exit rule.
Why must a stop respect the broker's stops level?
As of 25 September 2026, MetaTrader 5 documents broker-defined stop conditions in the symbol's contract specification.[5] MQL5 defines SYMBOL_TRADE_STOPS_LEVEL as a minimum distance in points from the current closing quote.[6]
Minimum stop distance in price units = Stops level × Point
For forex and CFD positions using bid/ask triggers, a long's stop is checked against the bid and a short's against the ask. Exchange-traded symbols can use different trigger rules, commonly the last price.[7] The entry-to-stop risk distance is therefore different from the quote-to-stop distance used for broker checks.
Separate illustrative quote: bid 1.10000, ask 1.10020, Point 0.00001, and a 50-point minimum. The minimum is 50 × 0.00001 = 0.00050, or 5 pips. A proposed long stop at 1.09960 sits 6 pips below the ask but only 4 pips below the bid. The 4-pip distance fails that minimum.

Tick alignment is another check. PineConnector's broker-value checklist separates Point from tick size and warns that a displayed zero stop level does not establish that every stop will be accepted.[2] Later modifications can also face a freeze level.[6] See stops level and freeze level in MT5.
How do placement rules map to PineConnector alerts?
As of 25 September 2026, PineConnector's stop-loss syntax accepts a distance through sl_pips= or an exact price through sl_price=.[2] Compute the rule's result before sending it:
- Fixed distance: send its pip distance, using the broker symbol's pip size.
- Initial ATR stop: convert ATR × multiplier into pips, or send the calculated price.
- Structure or band: send the calculated level as a price. A changed level needs a separate modification request.
-
Time stop: send a close request when the defined time condition occurs. Elapsed time is not an
sl_pips=orsl_price=value.
Illustrative messages, not recommendations. Each is a separate example for the TradingView alert's Message field. Replace LicenseID and EURUSD with the intended connection and exact broker symbol. Check all receiving accounts, permitted volume and trade scope; add secret= if required. Test on demo.
LicenseID,buy,EURUSD,vol_lots=0.10,sl_pips=20
Requests 0.10 lot and a 20-PineConnector-pip stop. The documentation's single-price illustration gives 1.09800 from 1.10000. Which broker quote anchors the distance, and whether the stop is attached to the opening request or added afterwards, are not documented; test on demo.
LicenseID,buy,EURUSD,vol_lots=0.10,sl_price=1.09600
Requests the structure example's exact price. Choose one stop method per entry. TradingView and MetaTrader can use different feeds, quotes and timestamps, so a valid chart level may be invalid at the broker.[8]
LicenseID,closelong,EURUSD
A time-exit alert can request closure of matching EURUSD buys within the EA's scope. The message contains no timer. Omitting a supported comment filter can broaden the affected positions; inspect what closed and what remains.[2]
PineConnector also documents ATR trailing based on MetaTrader broker data, updating at the selected timeframe's bar closes.[2] Sending a single TradingView-calculated ATR stop does not activate that separate feature.
Is a strategy stop the same as a broker-side stop?
No. TradingView's strategy orders belong to its broker emulator.[9] PineConnector's converter documentation explicitly says simulated stops are not copied into protective broker orders; separately configured broker stops can close before the simulated exit.[10]
An exit condition becoming true, an alert triggering, webhook delivery, PineConnector processing, the EA request, broker acceptance and the closing deal are separate events. A chart-only exit depends on that route completing. A broker-held stop is stored and executed on the broker's server.[5]
Check the receiving configuration. PineConnector's Shadow Targets setting uses EA monitoring for the intended levels when enabled, while sending more distant visible targets.[11] Normal broker stops and internally monitored targets have different dependencies.
What can still go wrong with a correctly calculated stop?
- Execution: a stop price is not a fixed realised loss. PineConnector documents differences from costs, fills and gaps.[2]
- Rejected placement or modification: inspect the actual position's S/L field. MT5 displays zero there when no stop has been placed.[5]
- Trailing dependency: MT5's terminal Trailing Stop stops updating when the platform is off; the last server-held stop remains operative.[7]
- Stale alert: TradingView saves the script and inputs when an alert is created. Recreate affected alerts after changing the rule or inputs.[12]
- Combined exposure: valid individual stops do not measure total open risk across correlated positions.
Frequently asked questions
Where should a stop loss be placed?
There is no universal stop-loss location. Define a fixed-distance, volatility, structure or time-based exit rule, then check its implementation. For forex and CFD price stops using bid/ask triggers, a long stop must be below the bid and a short stop above the ask, with the broker's minimum distance and tick size respected.
How is an ATR stop loss calculated?
Multiply ATR in price units by a chosen multiplier, then subtract that distance from the long entry reference or add it to the short entry reference. Specify the data feed, timeframe, lookback and evaluation bar. An initial ATR stop remains fixed unless a separate updating rule changes it. No multiplier fits every trading rule.
What is a structure-based stop loss?
A structure-based stop uses a defined chart level, such as a confirmed swing low for a long or swing high for a short, with any specified buffer. The rule must identify how the swing is detected and when it becomes known. A pivot plotted retrospectively cannot supply information that was unavailable at the entry decision.
What is a time stop in trading?
A time stop requests an exit after a defined duration or number of bars. Specify whether timing starts at the signal, simulated entry or actual broker fill. A time stop does not define the maximum price loss, and an exit request does not establish closure. Confirm the resulting deal and remaining position at the broker.
Does a TradingView stop automatically become an MT5 stop?
No. A TradingView strategy stop is a simulated order. A PineConnector workflow must separately request broker protection or send a close instruction when its exit condition occurs. PineConnector's converter documents that simulated stops are not copied into broker stop orders. Inspect the receiving configuration and actual MT5 position to establish which protection exists.
Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account and no code was compiled.
Related reading
- Risk management: sizing, stops and account limits
- Position sizing methods and calculator
- Stops level and freeze level in MT5
- ATR trailing stops: calculation and execution
- Portfolio heat and correlated exposure
Sources
- TradingView – Strategies FAQ: fixed, ATR and time-based exits, accessed 25 September 2026.
- PineConnector – Syntax: stop loss, sizing, broker values and command scope, accessed 25 September 2026.
- TradingView – Repainting: plotting pivots in the past, accessed 25 September 2026.
- TradingView – Other timeframes and data: custom band calculation, accessed 25 September 2026.
- MetaQuotes – Executing Trades: stop levels and broker-held orders, accessed 25 September 2026.
- MetaQuotes – MQL5 Reference: Symbol Properties, accessed 25 September 2026.
- MetaQuotes – Basic Principles: stop triggers, orders, deals and trailing stops, accessed 25 September 2026.
- PineConnector – FAQ: TradingView and MetaTrader price differences, accessed 25 September 2026.
- TradingView – Strategies: broker emulator and exit orders, accessed 25 September 2026.
- PineConnector – Pine Script converter: separate broker stops and targets, accessed 25 September 2026.
- PineConnector – EA settings: Shadow Targets, accessed 25 September 2026.
- TradingView – Alerts: saved script and input context, accessed 25 September 2026.
PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.