Exit on close of the current candle — Tradetron Community
← Community

Exit on close of the current candle

Strategy 1,046 views

Girish Raygor

Hello,

Kindly help,

I am taking entry in current candle and want to exit exactly on close of that candle.

Kindly share condition to do exit on close of current candle

Tradetron Team Tradetron team

There is no single keyword for “exit at the close of the entry candle”. Two ways:

  1. Time-based (simple): store the entry time and exit after the candle length:
    • Entry Runtime Variable: entry_t = Time('NSE')
    • Exit: Time Difference(Get Runtime(entry_t), Time('NSE')) >= Number(5) (for 5-min candles)
      This exits about 5 minutes after entry, which is later than the candle close if you entered mid-candle.
  2. Exact candle close: the builder has no “minutes to next candle” keyword, so an exact rule needs custom Python, or a list of fixed times (exit when Time('NSE') reaches the next candle boundary).

Test it in Live Offline before going live.

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