RealTest Trailing Stops, Stop Losses, and Profit Targets (Validated Code Guide)
In RealTest, ExitStop and ExitLimit require a numeric price per share and default to intraday stop or limit orders evaluated on the prior bar, while ExitRule takes a true or false condition filled at the next open. For a non-decreasing ATR trailing stop on stocks or ETFs, use HHV(H - 3 * atrN, BarsHeld + 1) because it never loosens when volatility spikes and adjusts cleanly across stock splits.
- ExitStop and ExitLimit accept a price per share rather than a boolean condition, and returning 0 or NaN tells RealTest to place no order for that bar.
- Naive ATR trailing formulas like Highest(H, BarsHeld) - 3 * ATR(14) can move a long stop downward when volatility expands, whereas HHV(H - 3 * atrN, BarsHeld + 1) ratchets monotonically upward.
- In a live RealTest 2.0 comparison on ETFs from 2010 to 2024, HHV(H - 3 * atrN, BarsHeld + 1) handled the March 7, 2024 5-for-1 split in IYH smoothly while Max(PrevExitStop, H - 3 * atrN) triggered a phantom stop-out at the split-day open 17 bars early.
- Position variables such as FillPrice, BarsHeld, Shares, ExitNum, and PrevExitStop must live inside Strategy or Library formulas because Data section arrays calculate before the backtest loop starts.
- Using Reason(price, label) inside ExitStop or ExitLimit stamps custom exit labels like initial_stop, breakeven, and chandelier_trail directly into the Trade List Reason column.
- Setting Ambiguity to Stop enforces pessimistic fills whenever a daily bar touches both a stop loss and a profit target on the same session.
Ask a general AI assistant for a RealTest trailing stop and it will usually hand you broken code. Common mistakes include passing a boolean condition into ExitStop, referencing FillPrice inside the Data section, or writing T.Highest in an active exit formula where it silently evaluates to NaN. Because RealTest has a compact, purpose-built syntax and most community examples sit inside a private user forum, small misunderstandings distort backtests without always raising a syntax error.
Every directive, default value, and timing rule in this guide comes straight from the official RealTest User Guide. Every code block below was parsed and executed in RealTest 2.0 on real Norgate equity and ETF data so you can paste the logic straight into your own .rts script and verify the trade list.
How ExitStop, ExitLimit, and ExitRule Work Together in RealTest
A RealTest strategy can define up to three exit mechanisms at the same time, and they operate as a one-cancels-all exit bracket. ExitStop places a stop-loss price, ExitLimit places a profit-target price, and ExitRule evaluates a true or false exit condition such as a time stop or indicator crossover. Whichever order triggers first closes the position and records its label in the Trade List Reason column.
| Strategy Element | Input Type | Default Timing | Broker Order Type | Bar Evaluated | Behavior When 0 or NaN |
|---|---|---|---|---|---|
ExitStop |
Price per share | Intraday |
STP DAY |
Bar prior to exit day | No stop order placed |
ExitLimit |
Price per share | Intraday |
LMT DAY |
Bar prior to exit day | No limit order placed |
ExitRule |
Boolean condition | NextOpen |
MKT DAY at open |
Bar prior to exit day | Condition false, hold position |
Each of the three exit types carries its own timing directive (ExitStopTime, ExitLimitTime, and ExitTime), documented in the official RealTest documentation for ExitStop, ExitLimit, and ExitRule. If you are new to how the portfolio simulation loop orders entries and exits across a full universe, read our overview of RealTest backtesting software first.
| Timing Choice | Applies To | How RealTest Evaluates and Fills the Exit |
|---|---|---|
Intraday (default for stop and limit) |
ExitStopTime, ExitLimitTime
|
Calculates the trigger price from yesterday's close and fills intraday when today's range crosses it, or at the open if price gaps through. |
NextOpen (default for ExitRule) |
All three | Checks whether the prior close touched the stop or limit (or met ExitRule), then exits at tomorrow's open via a market order. |
NextClose |
All three | Calculates the price from the prior bar and exits at tomorrow's close (MOC for ExitRule, LOC for ExitLimit, late-session STP for ExitStop). |
ThisClose |
All three | Evaluates on the exit bar itself and exits at that bar's close. Cannot generate advance daily orders and introduces lookahead bias on price-dependent signals. |
Fixed Percentage Stop Loss and Profit Target in RealTest
To place a static percentage stop loss and profit target in RealTest, multiply FillPrice by your stop and target factors inside ExitStop and ExitLimit. For a long strategy, the stop sits below FillPrice and the limit target sits above it. For a short strategy, the signs flip so the stop sits above FillPrice and the limit sits below it.
Strategy: long_fixed_bracket
Side: Long
EntrySetup: C > Avg(C, 200) and C > HHV(H, 20)[1]
Quantity: 20
QtyType: Percent
MaxPositions: 5
Commission: Max(1, Shares * 0.005)
ExitStop: FillPrice * 0.95
ExitLimit: FillPrice * 1.10
Ambiguity: Stop
Strategy: short_fixed_bracket
Side: Short
EntrySetup: C < Avg(C, 200) and C < LLV(L, 20)[1]
Quantity: 20
QtyType: Percent
MaxPositions: 5
Commission: Max(1, Shares * 0.005)
ExitStop: FillPrice * 1.05
ExitLimit: FillPrice * 0.90
Ambiguity: Stop
Keep one architectural rule in mind whenever you write FillPrice or BarsHeld. Those variables belong in the Strategy or Library section, never in Data. RealTest computes every Data array across all symbols before the backtest starts, so no open positions exist yet and any position variable inside Data silently evaluates to zero or NaN.
ATR Volatility Stop Anchored to the Entry Bar
A raw expression like FillPrice - 2 * ATR(14) recalculates ATR(14) every day you hold the stock, meaning your stop distance widens during volatility spikes and tightens during quiet weeks. To lock the risk unit to the exact volatility present when you entered, precompute atrN in Data and index it back to the entry setup bar with atrN[BarsHeld].
Parameters:
atrLen: 14
stopMult: 2
tgtMult: 4
Data:
atrN: ATR(atrLen)
longSig: C > Avg(C, 200) and C > HHV(H, 20)[1]
Strategy: atr_anchored_bracket
Side: Long
EntrySetup: longSig
Quantity: 20
QtyType: Percent
MaxPositions: 5
Commission: Max(1, Shares * 0.005)
ExitStop: FillPrice - stopMult * atrN[BarsHeld]
ExitLimit: FillPrice + tgtMult * atrN[BarsHeld]
Ambiguity: Stop
Notice that the Data item is named atrN rather than atr. RealTest rejects item names that shadow built-in functions or keywords such as atr, rsi, open, close, or rank with a reserved syntax error.
Non-Decreasing ATR Chandelier Trailing Stop (HHV vs PrevExitStop)
The most frequently asked question on the RealTest user forum is why a Chandelier trailing stop written as Highest(H, BarsHeld) - 3 * atrN sometimes moves downward. When a stock stalls and ATR expands, subtracting a larger 3 * atrN from the same peak high lowers the stop price below yesterday's stop.
RealTest offers two valid ways to enforce a strictly non-decreasing trailing stop for longs (or non-increasing for shorts). The first places the entire stop expression inside HHV over BarsHeld + 1 bars. The second uses RealTest's built-in PrevExitStop position variable, which initializes to 0 at entry and stores the previous bar's calculated ExitStop value.
Library:
// Method 1 (recommended for equities and ETFs) stateless and split-safe
trailChandelier: HHV(H - 3 * atrN, BarsHeld + 1)
// Method 2 (stateful via PrevExitStop)
trailPrevLong: Max(PrevExitStop, H - 3 * atrN)
// Short side with PrevExitStop MUST guard the initial 0 value
trailPrevShort: IF(PrevExitStop > 0, Min(PrevExitStop, L + 3 * atrN), L + 3 * atrN)
Two syntax details matter here. First, using BarsHeld + 1 inside HHV ensures the stop evaluates cleanly on entry day when BarsHeld equals 0, because HHV(expr, 0) returns zero and leaves day one unprotected. Second, on a short strategy using PrevExitStop, writing Min(PrevExitStop, L + 3 * atrN) without the IF(PrevExitStop > 0, ...) guard returns 0 on entry day and permanently disables the stop.
Why PrevExitStop Breaks on Stock Splits (Live RealTest Test)
In theory, HHV(H - 3 * atrN, BarsHeld + 1) and Max(PrevExitStop, H - 3 * atrN) look identical for a long trend strategy. To verify both in RealTest 2.0, we ran them side by side on the exact same ETF universe from 2010 through 2024. For 622 consecutive trades across 14 years, every entry date, exit date, and fill price matched to the penny. Then trade 623 diverged on IYH.
Both strategies entered 67 shares of IYH on February 2, 2024 at 297.71. On March 7, 2024, IYH executed a 5-for-1 split, adjusting the open position to 335 shares and opening at 61.43. Because PrevExitStop carried the prior bar's pre-split stop value into the split-day comparison, the PrevExitStop strategy treated the 61.43 open as a massive gap below its stop and exited immediately at the open after 23 bars. The HHV(H - 3 * atrN, BarsHeld + 1) strategy dynamically split-adjusted its lookback bars inside HHV, stayed in the trade through the split, and exited on a genuine trailing stop breach on April 2, 2024 at 60.69 after 40 bars.
On futures or unsplit instruments, PrevExitStop works smoothly and is handy when a stop depends on custom state. On US stocks and ETFs, HHV(H - 3 * atrN, BarsHeld + 1) (and LLV(L + 3 * atrN, BarsHeld + 1) for shorts) is the safer default because RealTest handles historical split ratios automatically inside lookback functions.
How to Move a Stop Loss to Breakeven With Custom Trade Reasons
A common mistake when coding a breakeven stop is writing IF(C >= FillPrice + 2 * atrN, FillPrice, FillPrice - 2 * atrN). If price touches +2 ATR and later drifts back to +1 ATR before hitting breakeven, the IF condition turns false and the stop drops back down to the initial loss level. To latch the breakeven move permanently once reached, check HHV(H, BarsHeld + 1) instead of today's close.
You can also wrap each branch in RealTest's built-in Reason(price, label) function. Normally every stop exit shows the generic string exit stop in the Trade List. Adding Reason() writes your exact label directly into T.Reason so you can audit how many trades exited at the initial stop versus breakeven.
Library:
initRisk: 2 * atrN[BarsHeld]
beTrigger: HHV(H, BarsHeld + 1) >= FillPrice + initRisk
breakevenStop: IF(beTrigger,
Reason(FillPrice, "breakeven"),
Reason(FillPrice - initRisk, "initial_stop"))
Strategy: breakout_with_breakeven
Side: Long
EntrySetup: longSig
Quantity: 20
QtyType: Percent
MaxPositions: 5
Commission: Max(1, Shares * 0.005)
ExitStop: breakevenStop
ExitRule: BarsHeld >= 20
ExitTime: NextOpen
When we ran this exact strategy in RealTest 2.0 on ETFs from 2010 to 2024, the Trade List cleanly separated 393 initial_stop exits, 165 breakeven exits filled at exact entry price (minus commissions), and 365 exit rule time stops.
Delayed Stops, Partial Profit Targets, and Day-1 FillPrice Behavior
Because RealTest interprets a return value of 0 from ExitStop or ExitLimit as no order, you can activate a stop only after a set holding period or scale out of half a position at a first profit target while trailing the remaining shares.
Delaying an ExitStop until BarsHeld >= 1 also solves a subtle gap between backtests and live daily order generation. In RealTest's default order-consistent mode, live orders for tomorrow must be prepared before the market opens, before the true entry fill price exists. On entry day (BarsHeld = 0), FillPrice inside an ExitStop or ExitLimit formula therefore uses OrderPrice for limit or stop entries, or the prior bar's C for market-on-open entries. From the next bar onward (BarsHeld >= 1), FillPrice returns the actual entry fill price. If you execute automatically via RealTest, OrderClerk, and IBKR, either delay stops by one bar or anchor day-1 stops to your known entry limit price so backtest fills match live broker orders.
Strategy: delayed_stop_and_half_target
Side: Long
EntrySetup: longSig
Quantity: 20
QtyType: Percent
MaxPositions: 5
Commission: Max(1, Shares * 0.005)
// No stop on entry day; combine initial stop and Chandelier trail from bar 1
ExitStop: IF(BarsHeld >= 1, Max(FillPrice - initRisk, trailChandelier), 0)
// Sell half once at +1R, then return 0 so no second limit order is placed
ExitLimit: IF(ExitNum = 1, FillPrice + initRisk, 0)
ExitLimitQty: Shares / 2
ExitRule: BarsHeld >= 20
ExitTime: NextOpen
Ambiguity: Stop
When ExitLimitQty triggers a partial exit, RealTest splits the trade record cleanly in the Trade List so you see the first half closed under exit limit and the trailing half closed later under exit stop or exit rule. If you scale out across three or more legs (for example selling one quarter per bar), use FillQty / 4 instead of Shares / 4 because Shares shrinks after every partial exit while FillQty retains the original entry size.
How RealTest Handles Same-Bar Stop and Target Ambiguity
When a strategy runs both ExitStop and ExitLimit on daily OHLC bars, a wide-range session can touch both the stop price and the target price on the same day. Without intraday ticks, the engine needs a rule to decide which order filled first. In RealTest, you control that rule through the Ambiguity strategy element.
| Ambiguity Setting | Same-Bar Resolution Rule | Best Use Case |
|---|---|---|
Default (used if omitted) |
Assumes Low preceded High when Close > Open, and High preceded Low when Close < Open. |
General exploration when you want a middle-ground estimate. |
Stop |
Always assumes the stop loss filled first when both prices were touched. | Conservative validation for serious strategy research. Recommended default. |
Target |
Always assumes the profit target filled first when both prices were touched. | Sensitivity check only, to measure the upper bound of ambiguity impact. |
Neither |
Skips exiting on ambiguous bars where sequence cannot be proven. | Diagnostic auditing on tight-bracket strategies. |
Run your strategy once with Ambiguity: Stop and once with Ambiguity: Target. If the Sharpe ratio or expectancy swings dramatically between the two runs, your stops and targets are tighter than a single daily bar's range and daily OHLC data cannot evaluate the bracket cleanly.
Complete Validated RealTest Script (S&P 500 Breakout With Multi-Stage Stops)
Below is a complete, runnable RealTest script combining an initial 2-ATR protective stop, a latched breakeven move at +2 ATR, a split-safe 3-ATR Chandelier trailing stop, a 6-ATR profit target, a 40-bar time stop, custom trade reasons via Select and Reason, and a chart overlay that plots the active stop line on every trade chart.
The import block uses Norgate Data historical index constituents (.S&P 500 Current & Past) so delisted stocks remain in the test. If you need help choosing the right Norgate tier for survivorship-free equity testing, see our Norgate Data and RealTest plan guide.
Notes:
Complete validated RealTest script combining initial ATR stop,
breakeven move, split-safe Chandelier trailing stop, profit target,
and time stop on S&P 500 historical constituents.
Import:
DataSource: Norgate
IncludeList: .S&P 500 Current & Past
IncludeList: SPY
StartDate: 2005-01-01
EndDate: Latest
SaveAs: spx_stops_demo.rtd
Settings:
DataFile: spx_stops_demo.rtd
StartDate: 2010-01-01
EndDate: 2024-12-31
AccountSize: 100000
BarSize: Daily
Parameters:
atrLen: 14
initMult: 2
trailMult: 3
beTrigger: 2
tgtMult: 6
maxHold: 40
Data:
atrN: ATR(atrLen)
ma200: Avg(C, 200)
hh50: HHV(H, 50)
spyUp: Extern($SPY, C > Avg(C, 200))
liquid: C > 5 and Avg(C * V, 20) > 10000000
entrySig: InSPX and liquid and spyUp and C > ma200 and C > hh50[1]
Library:
initStop: FillPrice - initMult * atrN[BarsHeld]
trailStop: HHV(H - trailMult * atrN, BarsHeld + 1)
beReached: HHV(H, BarsHeld + 1) >= FillPrice + beTrigger * atrN[BarsHeld]
activeStop: Max(initStop, IF(beReached, FillPrice, 0), trailStop)
labeledStop: Select(
trailStop >= Max(initStop, IF(beReached, FillPrice, 0)), Reason(trailStop, "chandelier_trail"),
beReached, Reason(FillPrice, "breakeven"),
1, Reason(initStop, "initial_stop"))
Strategy: spx_breakout_stops
Side: Long
EntrySetup: entrySig
SetupScore: ROC(C, 60)
Quantity: 10
QtyType: Percent
MaxPositions: 10
Commission: Max(1, Shares * 0.005)
Slippage: 0.02
ExitStop: labeledStop
ExitLimit: FillPrice + tgtMult * atrN[BarsHeld]
ExitRule: BarsHeld >= maxHold
ExitTime: NextOpen
Ambiguity: Stop
TestData:
recordedStop: Extern(@spx_breakout_stops, IF(Shares <> 0, activeStop, NaN))
Charts:
StopLine: IF(BarDate > T.DateIn and BarDate <= T.DateOut, recordedStop[1], NaN)
MA200: ma200
This script is a structural syntax template rather than a tuned trading strategy, yet verifying it in RealTest 2.0 on S&P 500 historical constituents from 2010 through 2024 confirmed all five exit paths across 2,111 completed trades. The trade list recorded 590 initial_stop exits, 312 breakeven exits, 862 chandelier_trail exits, 217 exit limit target exits, 119 exit rule 40-bar time stops, and 11 end-of-data or end-of-test closures, including clean exits on delisted names like TLAB-201312.

6 Common RealTest ExitStop Bugs and How to Debug Them
Most RealTest stop issues do not crash the parser. They either produce silent zero prices or trigger on the wrong bar. Check your script against these six patterns first.
| Broken Pattern | What Happens in RealTest | Validated Fix |
|---|---|---|
ExitStop: C < LLV(L, 20) |
Evaluates to 0 or 1 (a 1-dollar stop price), never stopping out normal stocks. |
Pass the price directly as ExitStop: LLV(L, 20). |
Putting FillPrice or BarsHeld in Data
|
Silently evaluates to 0 or NaN because Data runs before the test loop. |
Move position-dependent stop formulas to Library or Strategy. |
ExitStop: T.Highest * 0.90 |
Silently inert (same trade count as no stop) because T.* variables are closed-trade fields. |
Use HHV(H, BarsHeld + 1) * 0.90 for open positions. |
ExitStop: Highest(H, BarsHeld) - 3 * atrN |
Stop drops downward when ATR expands and leaves entry day (BarsHeld = 0) unprotected. |
Use HHV(H - 3 * atrN, BarsHeld + 1). |
ExitStop: Min(PrevExitStop, L + 3 * atrN) on shorts |
PrevExitStop starts at 0, so Min(0, price) returns 0 and cancels the short stop. |
Guard with IF(PrevExitStop > 0, Min(...), L + 3 * atrN) or use LLV(L + 3 * atrN, BarsHeld + 1). |
ExitStop: BarsHeld >= 2 and FillPrice * 0.95 |
Boolean and returns 0 or 1 instead of the stop price. |
Use IF(BarsHeld >= 2, FillPrice * 0.95, 0). |
To inspect the exact daily stop price your strategy calculated during a test, add either a DebugTargetStop line inside the strategy (with Test Output set to Debug) or store the stop inside a TestData section using Extern(@strategy_name, ...). Unlike Data, TestData runs inside the backtest loop and has full access to Shares, FillPrice, and BarsHeld.
TestData:
recordedStop: Extern(@spx_breakout_stops, IF(Shares <> 0, activeStop, 0))
Putting Verified Stops Into a Full RealTest System
Once your exit mechanics behave identically in backtests and live broker orders, pair these stop formulas with our validated guides on RealTest ATR position sizing, RealTest multi-strategy portfolio combining, RealTest Extern() and breadth filters, RealTest EntryLimit and slippage modeling, RealTest OrderSettings and IBKR order generation, RealTest #Rank and monthly rotation, AmiBroker AFL to RealTest translation, RealTest zero-trade debugging, and writing valid RealTest code with ChatGPT and Claude. If you want working scripts to test on your own machine right away, start with the free RealTest strategy and code library or download our Free Mean-Reversion Strategy for RealTest and Python to inspect a complete template.
To see how ATR trailing exits behave inside a full breakout system, look at the Turtle Max Growth Strategy. For equity mean-reversion exit brackets built on survivorship-free S&P 500 data, review the RealTest Mean Reversion Trading Strategy. If you already have an idea or an existing Pine Script, AmiBroker, or TradeStation system that refuses to behave cleanly in RealTest, our RealTest Strategy Development service turns rough logic into audited, order-ready RealTest code.
Want to bank 50 percent profit at a fixed target while trailing your remaining shares? Follow our RealTest partial exits and scaling-out guide (ExitLimitQty, FillQty, and ExitNum).
Key terms
- ExitStop
- A RealTest Strategy element that takes a numeric price formula per share and submits an intraday stop-loss order (STP DAY) by default, evaluated using the bar prior to exit day.
- ExitLimit
- A RealTest Strategy element that takes a numeric price formula per share and submits an intraday profit-target limit order (LMT DAY) by default.
- ExitRule
- A RealTest Strategy element that takes a true or false condition formula and exits the position at market at the next bar's open by default when non-zero.
- BarsHeld
- A RealTest open-position variable counting how many bars (trading nights) a position has been held since entry. It starts at 0 on entry day for stop and limit formulas and must be used inside Strategy, Library, or TestData rather than Data.
- FillPrice
- A RealTest open-position variable returning the entry fill price of the current position. On entry day in order-consistent mode, ExitStop and ExitLimit substitute OrderPrice (or prior Close for MOO orders) because the live open fill is not yet known before the bell.
- PrevExitStop
- A RealTest open-position variable initialized to 0 at entry that stores the prior bar's calculated ExitStop value so stateful trailing stops can reference their previous level.
- Ambiguity
- A RealTest Strategy setting (Default, Stop, Target, or Neither) specifying which exit RealTest assumes filled first when a single daily bar touches both ExitStop and ExitLimit.
Frequently asked questions
How do you write a non-decreasing ATR trailing stop in RealTest?
Use ExitStop with HHV(H - 3 * atrN, BarsHeld + 1) for long positions or LLV(L + 3 * atrN, BarsHeld + 1) for short positions, where atrN is precomputed in the Data section as ATR(14). Placing the ATR subtraction inside HHV guarantees the stop never lowers during volatility spikes, covers entry day when BarsHeld is 0, and stays accurate across stock splits.
What is the difference between ExitStop and ExitRule in RealTest?
ExitStop accepts a numeric price per share and submits an intraday stop order (STP DAY) by default using the prior bar's close. ExitRule accepts a true or false condition (such as BarsHeld >= 20 or C > Avg(C, 10)) and exits at the next bar's open via a market order by default.
Why does my RealTest ExitStop not trigger any exits?
The three most common causes are passing a boolean condition like C < LLV(L, 20) instead of a price (which evaluates to 0 or 1), placing FillPrice or BarsHeld inside the Data section instead of Library or Strategy (which silently returns 0 or NaN), or using closed-trade variables like T.Highest instead of HHV(H, BarsHeld + 1).
How do you move a stop loss to breakeven in RealTest?
Latch the breakeven trigger with HHV(H, BarsHeld + 1) so the stop stays at FillPrice even if the stock later pulls back. Write ExitStop as IF(HHV(H, BarsHeld + 1) >= FillPrice + 2 * atrN[BarsHeld], Reason(FillPrice, "breakeven"), Reason(FillPrice - 2 * atrN[BarsHeld], "initial_stop")).
Should I use PrevExitStop or HHV for trailing stops in RealTest?
For stocks and ETFs that can undergo stock splits, HHV(H - 3 * atrN, BarsHeld + 1) is safer because RealTest automatically split-adjusts lookback bars inside HHV, whereas PrevExitStop can trigger a premature split-day exit. PrevExitStop works well on unsplit instruments or custom stateful stops, provided short strategies guard its initial 0 value with IF(PrevExitStop > 0, Min(...), ...).
How do you delay an ExitStop until after the entry bar in RealTest?
Return 0 when BarsHeld is below your threshold because RealTest treats 0 in ExitStop or ExitLimit as no order. For example, IF(BarsHeld >= 1, FillPrice - 2 * atrN[BarsHeld], 0) skips entry-day stop orders and activates the stop from bar one onward.
How does RealTest handle a bar that hits both ExitStop and ExitLimit?
The Ambiguity strategy setting controls same-bar conflicts. Default guesses Low before High on green bars (Close > Open) and High before Low on red bars (Close < Open). Setting Ambiguity to Stop assumes the stop filled first and is recommended for conservative testing.
Can RealTest take partial profits at a limit target and trail the rest?
Yes. Set ExitLimit to IF(ExitNum = 1, FillPrice + initRisk, 0) and set ExitLimitQty to Shares / 2 while keeping ExitStop active. After the first half exits at the target, ExitNum increments to 2 so ExitLimit turns off while ExitStop continues trailing the remaining shares.