Exit after 150 minute after entry — Tradetron Community
← Community

Exit after 150 minute after entry

Strategy 996 views

Gopal

I entered at 30 minute candle and want to exit after 5 five candle i.e. 5x30= 150 minute

Tradetron Team Tradetron team

Use the Time Difference (T2-T1) keyword with EntryTime. It returns the minutes between two HHMM times, so you do not need to store anything yourself.

Exit condition

Time Difference (T2-T1)(EntryTime, Time('NSE')) >= Number(150)

Put it in the Set Exit (or a Repair Once for that leg), joined with OR to your target and stop loss.

Example

Entry at 10:15. 150 minutes later is 12:45, so the exit fires on the first check at or after 12:45. Time Difference converts both times to minutes, so 1015 → 1245 correctly gives 150 (a plain subtraction of 1245 - 1015 would give 230).

Notes

  • It works within the same day only. For a positional trade carried overnight, use Days Difference (D2-D1) as well.
  • Before there is an entry, the result is empty and the condition does not fire. Do not compare it with !=.
  • Test in Live Offline.

Keyword reference: Keyword Documentation — Tradetron

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