Setting Runtime Variable — Tradetron Community
← Community

Setting Runtime Variable

Strategy 5,275 views

Ganesh Venkataraman

Hi, I am trying to set a new variable at the entry condition. However, the condition is never executed for some reason. I would like to store the SPOT value in a variable and check the value during the exit condition. Is this the correct method?

Chandrahas

Variable function is pathetic with tradetron… You can set it only once ina counter at the start of the API and not in the Condition builder… And you can not change it during program which is again not helpful…

Tradetron Team Tradetron team

You can now store values with Runtime Variables in any block (Entry, Repair Once, Repair Continuous, Set Exit). The value is written after that block’s leg is taken, not in the condition itself.

Steps

  1. In the Entry block, open Runtime Variable, give it a name (e.g. entryspot), click Fx and set the value (e.g. LTP of NIFTY 50 spot).
  2. In the exit condition, read it with Get Runtime(entryspot).
  3. Structure: line 1 Get Runtime, line 2 Traded Instrument, line 3 your comparison.

A Universal Exit clears all runtime variables. To check what was saved: Deployed page → three dots → Runtime Data.

Worked example: Use Entry Candle - High and Low using Runtime Variable - #8 by Nelson

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