What Is Trailing Stop Loss and How to Activate TSL on Tradetron

Huzefa Kudrati Updated Oct 6, 2026 12 min read

What Is Trailing Stop Loss and How to Activate TSL on Tradetron

A trailing stop loss (TSL) is a stop that moves in your favour as a trade makes money and never moves back. On Tradetron, the TSL works on your whole strategy's profit and loss: once profit reaches the level you set, a floor is locked in and raised in steps, and if P&L falls below that floor, every position is closed.

How a trailing stop loss works on Tradetron, with a worked rupee example, in 3 minutes. हिन्दी में देखें: Tradetron पर trailing stop loss, 3 मिनट में

Illustration of a trailing stop as a safety clip that moves up behind a rising price

What is a trailing stop loss?

A normal stop loss sits at one price. A trailing stop follows the price up (for a long trade) at a fixed distance, so the exit level improves as the trade moves your way. When the price reverses by that distance, you are out.

Price reaches Highest price so far Trailing stop (5% below the high) If hit, result per share
₹1,000 (entry) ₹1,000 ₹950 −₹50
₹1,100 ₹1,100 ₹1,045 +₹45
₹1,200 ₹1,200 ₹1,140 +₹140
Falls to ₹1,150 ₹1,200 ₹1,140 (unchanged) not hit yet
Falls to ₹1,140 ₹1,200 ₹1,140 exit, +₹140

The stop never moved down when the price dipped from ₹1,200 to ₹1,150. That one-way movement is the whole idea: you give back at most the trailing distance from the best point of the trade.

Trailing stop loss vs fixed stop loss

Fixed stop loss Trailing stop loss
Where it sits One level, set at entry Moves up with profit, never down
What it protects Your capital Your capital, then your open profit
Best for Defining the maximum loss Letting winners run while locking in gains
Main weakness Gives back the whole gain if the trade reverses Normal pullbacks can stop you out early

Most traders use both: a fixed stop for the worst case, and a trailing stop once the trade is in profit. If you want a simple rule for the fixed part, the 7% rule is a good starting point for swing trades.

TSL in an algo vs a TSL order at your broker

What traders usually call a trailing stop loss is a trailing stop order at the broker: the broker keeps modifying a stop order sitting at the exchange as the price moves.

A TSL in an algo strategy works differently. Nothing waits at the exchange. Tradetron calculates your strategy's P&L each time it checks conditions, compares it with the current TSL level, and when P&L falls below that level it fires a universal exit that closes all open positions of the strategy.

How to activate the trailing stop loss on Tradetron

The TSL lives in Advanced Settings on the strategy creation page. By default all three boxes show 0, which means the TSL is off. To turn it on, fill in all three. (Our guide to Tradetron's advanced settings covers the other options on the same screen.)

The Advanced Settings panel in Tradetron's strategy builder: price execution, revisions and final action, tranching, trailing stop loss (Activate at, When profit increased by, Increase TSL by), reactivation, check frequency, capital, trading window, rollover and Python codeAdvanced Settings in the current builder

Tradetron Advanced Settings screen with the Trailing Stop Loss fields filled in: Activate at 800, When profit increased by 200, Increase TSL by 100The Trailing Stop Loss box in Advanced Settings

Activate at

The strategy profit, in rupees, at which the TSL switches on. With Activate at = 800, nothing happens until the strategy's total P&L goes above ₹800. The moment it does, the TSL is set at ₹0: from then on, if P&L drops below zero, the strategy exits.

When profit increased by

The step size. After activation, every time profit rises by this amount above the activation level, the TSL moves up once.

Increase TSL by

How far the TSL moves up on each step. Set it equal to When profit increased by for a 1:1 trail (every ₹200 of new profit lifts the floor by ₹200). Set it lower, as in the example below, to give the trade more room.

  • Activate at profit at which the TSL switches on (floor starts at ₹0)
  • Profit increased by the step: how much new profit raises the floor once
  • Increase TSL by how far the floor rises per step

A worked example: 800 / 200 / 100

Take Activate at = 800, When profit increased by = 200 and Increase TSL by = 100. Here is what the strategy does as its P&L moves (hypothetical numbers):

Case Strategy P&L TSL level What happens
1 ₹0 not active Strategy has just started
2 −₹900 not active Below the activation level; the TSL does nothing (your normal stop loss still applies)
3 +₹801 ₹0 P&L crossed ₹800, so the TSL activates at ₹0. A fall below zero now exits
4 +₹1,001 ₹100 Profit is one ₹200 step above ₹800, so the floor rises by ₹100
5 +₹1,201 ₹200 Two steps above activation
6 +₹1,601 ₹400 Four steps above activation
7 +₹399 ₹400 P&L fell below ₹400: universal exit, all positions closed

Line chart of a hypothetical strategy P&L rising to ₹1,601 and falling back, with the TSL stepping from ₹0 to ₹400 and the exit when P&L drops to ₹399The TSL only steps up. It exits when P&L falls below it

The rule in one line:

At a peak of ₹1,601, profit is ₹801 above ₹800, which is four full ₹200 steps, so the TSL is 4 × ₹100 = ₹400. Notice what this setting means in practice: from a ₹1,601 peak, the strategy can give back about ₹1,200 before it exits. That is a deliberate choice of a loose trail. A 200 / 200 setting would have locked in ₹800 at the same peak.

Rules that catch people out

  1. It works on the whole strategy, not a set. The TSL looks at the strategy's total P&L across all sets and legs.
  2. Realised and unrealised P&L both count. Profit already booked by a closed leg is part of the number the TSL watches.
  3. It resets with the run counter. Each new run of the strategy starts with a fresh TSL; a new run doesn't inherit the old floor.
  4. It scales with the multiplier. Deploy at 2X and the TSL values double too (Activate at 800 behaves like 1,600). Enter values for 1X.
  5. The exit is a universal exit. When the TSL hits, every open position of the strategy is closed, not just the losing leg.
  6. A floor of ₹0 doesn't mean you exit at exactly zero. Charges and slippage on the exit orders can turn a ₹0 exit into a small loss.

Other ways to trail a stop on Tradetron

The Advanced Settings TSL is the quickest option, but it always starts its floor at ₹0 and always works on the whole strategy. Keywords give you more control:

You want to… Use How it works
Trail the whole strategy, the simple way Advanced Settings TSL Activate at / profit step / TSL step, floor starts at ₹0
Trail the whole strategy but lock in a profit at activation Universal Exit TSL keyword, in the Universal Exit condition Four values: activate at, lock at, profit step, TSL step; in points (₹ on P&L) or percent
Trail one leg on its own Leg TSL keyword, in that leg's SL trigger Same four values, measured on that leg's price move from its entry
Build your own trail rule Max Profit and PNL keywords e.g. exit when Max Profit ≥ 2,500 and Max Profit − PNL ≥ 1,000

Two details matter here. Enter Universal Exit TSL values at 1X: the keyword scales with your multiplier on its own, so don't multiply it again. And for a percent trail on a leg, the exit type is tsl-pct; tsl-points trails in points. The keywords guide explains how keywords are added to conditions.

How to check your TSL in runtime data

Once a strategy is running, you can see exactly where the TSL stands:

  1. Open the Deployed page and find your strategy.
  2. Click the three dots next to it and choose Runtime data. (Only the strategy's creator can see it.)
  3. Look for the three TSL keys for the current run counter.

Runtime data rows showing tsl 1514.0, tsl_profit 4514.0 and tsl_flag 1 for run counter 12TSL values in a strategy's runtime data

  • tsl_flag = 1 means the TSL has been activated in this run. If the key is missing or 0, profit hasn't reached Activate at yet.
  • tsl_profit is the profit level the TSL has stepped up to: the activation level plus every full step reached so far. It tracks the highest profit the strategy has reached, rounded down to a step.
  • tsl is the current floor. If the strategy's P&L drops below this number, the universal exit fires.

In the screenshot, the floor is ₹1,514 and the profit step reached is ₹4,514. Until the strategy exits, both numbers can only move up.

How to choose your TSL values

There is no universal right setting, but there is a right way to pick one:

  • Start from your strategy's normal swings. If a healthy trade routinely gives back ₹1,000 before moving on, a trail that exits on a ₹400 pullback will cut most of your winners short.
  • Decide what "in profit" means. Activate at should be a profit you'd be unhappy to see turn into a loss, not a number reached on the first tick.
  • Pick your ratio on purpose. A 1:1 trail locks in more and exits sooner; a 2:1 trail (as in the example) gives back more but rides through pullbacks.
  • Backtest two or three versions. Compare total P&L, drawdown and how many trades the TSL closed. Keep in mind that backtests check conditions on minute-by-minute data, so a quick spike inside a minute that live trading would catch can be missing from the test.

Pros

  • Locks in part of an open profit automatically
  • Lets a winning day run instead of exiting at a fixed target
  • Set once in Advanced Settings, no code needed
  • Scales with the multiplier, so one setting works at any size

Cons

  • Normal pullbacks can close a trade that would have recovered
  • Works on total P&L, so one leg's loss can trigger an exit for all legs
  • Exit fills come after the check and can be worse than the TSL level in fast markets
  • The Advanced Settings version can't lock in profit at activation (use the keyword for that)

For more ways to protect a strategy, read seven techniques to reduce drawdown and the guide to Repair Once and Repair Continuous conditions.

Frequently asked questions

What is a trailing stop loss?

A trailing stop loss is a stop that moves in your favour as the trade gains and never moves back. It caps how much of an open profit you can give back. For example, with a 5% trail on a stock that rises from ₹1,000 to ₹1,200, the stop moves from ₹950 to ₹1,140.

How does the trailing stop loss work on Tradetron?

Tradetron's TSL watches the strategy's total P&L. Once P&L goes above Activate at, a floor is set at ₹0. Each time profit climbs another When profit increased by step, the floor rises by Increase TSL by. If P&L falls below the floor, a universal exit closes all positions.

Where do I find the TSL setting in Tradetron?

In Advanced Settings on the strategy creation page, in the box called Trailing Stop Loss. All three fields default to 0, which means the TSL is off.

Does the TSL work on each leg separately?

No. The Advanced Settings TSL works on the whole strategy's P&L, realised and unrealised. To trail a single leg, use the Leg TSL keyword in that leg's SL trigger.

Does the TSL change with the multiplier?

Yes. The TSL values scale with your deployment multiplier, so at 2X an Activate at of 800 behaves like 1,600. Enter the values for a 1X deployment.

Is a trailing stop loss better than a fixed stop loss?

They do different jobs. A fixed stop caps the loss on a trade; a trailing stop protects open profit. Most strategies use a fixed stop from the start and add a trailing stop once the trade is in profit.

What is the disadvantage of a trailing stop loss?

A trail that is too tight gets hit by normal pullbacks and closes trades that would have recovered. In fast markets the exit can also fill worse than the stop level. Backtesting a few settings helps you find a distance that suits the strategy.

Want to join Tradetron?

Thousands of traders have moved to algo trading. Leave your number and our team will help you get started.