Repository navigation
Closed
Description
Scope
These problems are confirmed in v1.10.0. The earlier release boundary has not been established. Affected forms: none found in our corpus in the checked snapshot. This search does not establish their use in other scripts.
Effect
The measured forms below can silently ignore or shift an argument. Each workaround was run alongside the affected form on the release engine. The timeframe, trade-index, history-depth and formatting examples used 1,500 bars of a 15-minute chart; the values describe those examples.
timeframe.in_seconds("D")returns 86,400 seconds, whiletimeframe.in_seconds(timeframe = "D")uses the chart's 15-minute timeframe and returns 900. The equivalenttimeframe.change("D")form changes on 15 daily boundaries; itstimeframe =form changes on 1,499 bars. Use the positional timeframe argument.strategy.closedtrades.profit(1)andstrategy.opentrades.entry_price(1)return the second trade/open trade in the traced controls. Thetrade_num = 1forms read trade/open-trade index 0 instead. Use the positional trade index.max_bars_back(close, 800)supplies the requested depth. A const-name depth (const int DEPTH = 800, thenmax_bars_back(close, DEPTH)) is ignored: the traced static offset has 800 values with the literal and no values with the const name; the dynamic offset has 0 versus 400navalues. Use a literal depth; no broader dynamic-depth workaround is verified.str.format_time(time, timezone = "UTC")shifts the timezone into the format argument. The trace measured a result length of 3, compared with 24 for the positional control. Workaround: supply both the format and timezone positionally, as instr.format_time(time, "yyyy-MM-dd'T'HH:mm:ssZ", "UTC"). The control's output length was 24 on every traced bar; avoid the keyword form for this argument.strategy.risk.max_drawdown()withtype = strategy.percent_of_equity, or that constant held in a variable, behaves as the cash form. In a strategy with entries from a flat position, a value of 10 produced 32 trades, compared with 34 forstrategy.risk.max_drawdown(10, strategy.percent_of_equity)and the control. The first missing entry was at 2020-01-16 07:00 UTC. With a value of 3, the first missing entry was at 2020-01-02 13:00 UTC, with 5 versus 34 trades. Workaround: pass the literal percentage constant positionally. These times identify missing entries in the example, not when an internal halt flag was set.strategy.risk.max_intraday_loss()withtype = strategy.percent_of_equity, or that constant held in a variable, likewise behaves as the cash form. The keyword and variable forms produced 66 trades and were flat for 84 bars where the positional percentage control remained in position; the first position difference was at 2020-01-15 03:45 UTC.strategy.risk.max_intraday_loss(10, strategy.percent_of_equity)matched the 69-trade control. Workaround: pass the literal percentage constant positionally.
Workaround and resolution
Use the specific positional forms above, or a literal depth for max_bars_back. These results do not establish a workaround for other argument forms. A correction is being prepared for the next release.
Metadata
Metadata
Assignees
Labels
No labels
Activity
docs: add the changelog lines for three fixes already on main (#346)
luisleo526 commentedon Nov 9, 2026
Fixed in v1.11.0: the arguments that were ignored or shifted in v1.10.0 are handled in v1.11.0. If one of the forms you reported still behaves differently on v1.11.0, please reply here with the script and we will reopen. Closing.