Hi,
I am looking for a reference to include the logic for identify the days to expire for traded instrument is <= 1, I would like to exit the positions tied to the set.
Regards,
Varalakshmi E A
Hi,
I am looking for a reference to include the logic for identify the days to expire for traded instrument is <= 1, I would like to exit the positions tied to the set.
Regards,
Varalakshmi E A
use DayDifference Keyword
Use Days Difference (D2-D1) with today’s date and the traded leg’s expiry, in the Set Exit.
Days Difference (D2-D1)(Today('NSE'), Traded Instrument(Entry, expiry, <underlying>, 1, 1, 1)) <= Number(1)
1, 1, 1 = set 1, condition 1, leg 1. Change them to point at your leg.The leg expires on the 26th. On the 25th the keyword returns 1, so the exit fires on the 25th.
Note: this counts calendar days, so a weekend or holiday in between counts too. Test in Live Offline. Keyword reference: Keyword Documentation — Tradetron
Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.
Request received. Pick a time now, or close this and we'll call you to set one up.
The calendar didn't load here. Open the booking page ↗
Booked. The calendar invite is on its way to your email.
Tradetron's AI assistant — pricing, brokers, strategies, anything.
AI can make mistakes. Consider checking important information.
How good was it?
We store the question and the answer with your report so the team can audit it.