Traded Instrument — Tradetron Community
← Community

Traded Instrument

Keyword help 1,371 views

Amit

Will

Traded Instrument
Exit,price,NIFTY BANK, 1,1,2

work if I want to take the exit price of a previously traded instrument?

Capturett71

@Nelson @Jovin

AlgoBull Solution

Hello,

Exit will not work as exit does not have legs and thus not cannot be referred in Traded Instrument keyword.

Amit

Then how can I fetch Entry and Exit price of an instrument that is already squared off?

Rahul

Use repair instead of exit and Exit when the repair is executed.

Lion Algos

amitkrnandi - yes. It gives exit price.

Tradetron Team Tradetron team

Short answer: no. Traded Instrument (Exit, price, ...) will not work. Exit blocks have no legs, so Traded Instrument cannot point at them. Its condition type must be Entry, Repair Once or Repair Continuous.

How to get the exit price

  1. Exit through a Repair block: close the leg in a Repair Once (e.g. with Leg Exit, or a leg in its Position Builder that squares off the position). Then read that block’s leg with Traded Instrument ( Repair Once, price, NIFTY BANK, set, condition, leg ).
  2. Runtime variable: in that same Repair Once’s Runtime section, save exit_px = LTP ( the instrument ). It is written right after the block’s leg is taken, so it is close to the exit fill. Read it later with Get Runtime Number.

Entry price

Traded Instrument ( Entry, price, NIFTY BANK, 1, 1, 2 ) still works after the leg is squared off.

Field names are lowercase (price, strike, pnl). Test in Live Offline and check the Notification Log for the returned values.

Recommended structure: Recomended Structure for Get runtime, Traded instrument, Traded instrument name keyword. | Tradetron Helpdesk

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