Store the high of a red 15-min candle of the ITM strike in a runtime variable — Tradetron Community
← Community

Store the high of a red 15-min candle of the ITM strike in a runtime variable

Keyword help 1,494 views

Deepak

I want to write a logic to identify the high of the recent 15 min candle

ITM -1 if nifty trades at 24400 then i need to have the value of the below from 24350 CE strike
Condition 1 :- Open > close
condition 2 :- store this value of high in a runtime variable “high value”
condition 3 - use the “high value” for future trades.

Can you please help?

Tradetron Team Tradetron team

Store the value when the condition is met, then reuse it:

  1. Strike (ITM by one): for a CE, ATM SPOT('NIFTY 50', -1) (one strike below ATM), e.g. 24350 when NIFTY is ~24400.
  2. Condition: Position(OPEN(Symbol(<that CE>, '15m')), -1) > Position(CLOSE(Symbol(<that CE>, '15m')), -1) (last 15-min candle is red).
  3. Store in the entry’s Runtime Variable: high_value = Position(HIGH(Symbol(<that CE>, '15m')), -1).
  4. Use later with Get Runtime(high_value).

Runtime variables are written after a leg is taken, so the store needs a trade in that set. A Universal Exit clears them. 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.