Position not exiting in backtesting — Tradetron Community
← Community

Position not exiting in backtesting

Strategy 1,158 views

Neeraj Sharma

I’m creating a BTST strategy for Bank Nifty long straddle at ATM call and puts weekly expiry. In backtesting strategy is taking entries but not taking exits due to which no new entries are being taken. Please help with exit condition.

GYANESHWAR

Same problem with me … backtest not showing exit entries

Tradetron Team Tradetron team

Usually the exit condition never becomes true, so the position stays open and no new entry can start. For a BTST (buy today, sell tomorrow) straddle, check these:

1. Make the exit fire on the next day

Combine a time check with a “not the entry day” check, for example:

  • Time('NSE') >= Number(920) AND
  • Days Difference (D2-D1) from EntryDate to Today(‘NSE’) is >= Number(1).

A plain time check alone (e.g. Time >= 920) is already true on the entry day if you entered after 9:20, which causes an instant exit; a check that only compares times can also never be true if it waits for a time after the last condition check.

2. Check the expiry of the legs

Pick the expiry in the Position Builder with an expiry keyword (Current Week Expiry, Current Month Expiry, or Select Expiry) that matches the options your index actually lists. If the contract expires before your exit time, the exit has nothing to close.

3. Check Advanced Settings

The condition-check window (start / stop times) must cover your exit time on the next day.

4. Look at the logs

Run the same strategy in Live Offline for a couple of days and read the Notification Log to see whether the exit is evaluated and why it stays false. Backtests run on FastBT; if the exit works in Live Offline but not in the backtest, send the Backtest ID (BID button on the Backtest page) to support (chat on tradetron.tech).

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.