Stop Loss and Take Profit approaches in Pine Script: Points vs. Price levels
When writing risk management rules in Pine Script, developers choose between two syntax models in strategy.exit(): relative offsets (loss and profit) or absolute price levels (stop and limit). Using absolute price levels is generally preferred for advanced strategies because it accommodates technical chart levels, swing highs/lows, and ATR bands directly.
| Method | Parameters used | Input units | Best suited for |
|---|---|---|---|
| Price level exit | stop = price, limit = price | Exact currency price (e.g. $145.20) | ATR stops, swing low/high defense, support/resistance exits |
| Point offset exit | loss = ticks, profit = ticks | Symbol ticks (mintick multiples) | Fixed pip/tick scalping strategies |
| Percent exit | stop = entry * (1 - pct) | Calculated absolute price | Portfolio equity modeling and trend investing |
| Break-even exit | Dynamic stop = entry_price | Updated price upon profit trigger | Risk-free profit protection |