Exit Condition with PnL logic — Tradetron Community
← Community

Exit Condition with PnL logic

Uncategorized 1,382 views

Lion Algos

Select OR instead of AND in the condition builder

Sanjay Shah

Hi Rama

Thanks for reply. Did it auomatically consiered * Multiplier , supposed I traded in multiple lots

Lion Algos

Not sure on that. I haven’t tried PnL with multiple lot. Also I haven’t tried PnL under traded instrument. I tried only at strategy level universal exit

Tradetron Team Tradetron team

Use OR, not AND, between the target and the stop loss, so whichever is hit first exits.

How to write it

In Universal Exit:

PNL >= Number(2000) * Multiplier OR PNL <= Number(-1000) * Multiplier

  • PNL is strategy-level (all sets together) and belongs in Universal Exit.
  • About multiple lots: PNL is in rupees on your real position, so it grows with lots. To keep a 1X threshold correct when you deploy at 2X or more, multiply it by the Multiplier keyword, as above.
  • For one leg, use Traded Instrument with the pnl field in a Set Exit or Repair Once.
  • For one stock in a list, use PNL Underlying in a Set Exit.

Example

Deployed at 2X with the condition above: the target becomes 4,000 and the stop −2,000.

Test in Live Offline and check which condition fired in the Notification Log. Examples: "PNL / Target / Stoploss" related keywords: Different Examples of its Uses - #2 by Nelson

:sparkles: Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.