You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Known issue: with calc_on_order_fills, an exit that the script calls on every execution can fill more than once for the same entry #854
Affected releases: 1.2.0 through 1.12.0. Earlier releases have not been checked.
Which scripts: a strategy with calc_on_order_fills = true that calls, on every execution while the position is open, a strategy.exit for an entry with a fixed qty smaller than the position, a limit and a stop, and another strategy.exit of the same entry whose quantity is a share of the current position. In our tests, a script with only the first of those exits (no second exit sized from the position) was not affected. Whether a script without calc_on_order_fills, or exits with only a limit or only a stop, are affected has not been established yet.
What the engine does: after that exit has filled once for the entry, the engine arms the same exit again for the entry's remaining quantity when the script calls it again. The exit can then fill a second time (on a following bar, when the price is still beyond its limit) and a third time (at its stop). A second strategy.exit of the same entry that is sized from the current position then closes less than it should, and a final strategy.close_all may find nothing left to close.
What TradingView does: it fills that exit once for the entry. The remaining quantity stays open until another order closes it.
Effect on results: the entry and the total quantity closed are the same, but the position is closed earlier and in different pieces. The list of trades has extra rows for that exit id, later exits are smaller, and a closing row that TradingView books can be missing. Net profit, the number of trades and every per-trade statistic can differ from TradingView's.
How to recognise it: in the list of trades, the same exit id closes more than one trade for one entry, although the script gives that exit one quantity.
Status: a fix is in progress; this entry will name the release that carries it.
We will update this entry as the affected scope is confirmed.
Status 2026-11-13: the fix is in progress; its candidate is due 2026-11-14 and it is targeted for 1.13.0 (planned 2026-11-15). If it is not ready in time, 1.13.0 ships without it and it follows in the next patch release; we post that here the same day.
Status 2026-11-14 17:00 (UTC+8): a fix is written and its focused checks pass; it is in final review now. It is planned for the 1.13.0 release. We will post the next update here by 2026-11-15 12:00 (UTC+8).
What's left: that next version, then the full test suite, the comparison runs against TradingView-matched results, a final review and one complete verification build.
Delay: an outage on our side has paused the work since about 10:10 today.
Release: we are aiming at 1.13.0. If it misses 1.13.0, we will say so here the same day.
Next update here by 2026-11-15 20:00 (UTC+8), or sooner when the fix merges.
Activity
docs: note the calc_on_order_fills exit re-fill known issue (#856)
luisleo526 commentedon Nov 13, 2026
Status 2026-11-13: the fix is in progress; its candidate is due 2026-11-14 and it is targeted for 1.13.0 (planned 2026-11-15). If it is not ready in time, 1.13.0 ships without it and it follows in the next patch release; we post that here the same day.
🤖 Generated with Claude Code
luisleo526 commentedon Nov 14, 2026
Status 2026-11-14: work on the fix is under way, but its date is not established yet. We will post the date here by 2026-11-14 18:00 (UTC+8).
luisleo526 commentedon Nov 14, 2026
Status 2026-11-14 17:00 (UTC+8): a fix is written and its focused checks pass; it is in final review now. It is planned for the 1.13.0 release. We will post the next update here by 2026-11-15 12:00 (UTC+8).
fix: scope repeated exits to eligible entry origins (#854)
fix: admit renewed exit brackets after settled openings (#854)
test: distinguish exit trigger boundaries from fill levels (#854)
Merge exit-origin repair onto current engine main (#854)
luisleo526 commentedon Nov 15, 2026
Status update (2026-11-15, UTC+8), as promised for today 12:00:
strategy.exitgets no quantity, or one order for several same-ID entries (related to #694) #810). The two have to follow one rule so that, once combined, they cannot reintroduce the late exit. We measured that interaction this morning, and the next version of the fix resolves it.Next update here by 2026-11-15 20:00 (UTC+8), or sooner when the fix merges.