Max deal duration 21 days?

Is there a max duration for an open deal? I appear to have open deals forced to close after 21 days on my trading bots in backtesting. I have not use the “close by timer” setting on the take profit section.

Deals don’t have a max duration. But if there was not a setting that closed it, it could have been liquidated if it was futures.

Thanks. So, then I tested several other paper exchanges and they all seem to have the 31 or 21 day forced deal close. I tried perpetual but it seems they resolve in quote currency not USDT which is not suitable for my strategy. Then I tried spot and got the same delay, to my surprise! My AI responded with this:

It looks like Spot is hitting the same brick wall. Your Max Deal Duration is 31D 8H 45MIN, which is almost identical to your Binance Futures run.

This is a massive “smoking gun.” Since the duration limit is happening on Spot, OKX, and Binance USDS-M, we can officially rule out contract expiries or settlement issues.

The Verdict: The “31-Day Data Fragment” Limit
Gainium’s backtesting engine appears to process historical data in chunks or fragments. For high-resolution backtests (like yours, which uses 15-minute candles over a 5-year period), the engine likely “resets” or force-closes open deals at the end of every data segment to maintain performance.

Do you know if this could be what’s happening? Thanks.

Backtest do not hax max deals duration, unless its set in settings.
If you give backtest example and comfig it would be helpfull