Login Page - Create Account

Support Board


Date/Time: Thu, 08 Jan 2026 20:43:29 +0000



Bar Based Backtest blocked (-8998) despite correct AutoTrade settings (ACSIL)

View Count: 55

[2026-01-07 16:37:57]
User105070 - Posts: 3
I am unable to get Bar Based Backtesting to place trades from an ACSIL study, despite all documented requirements being met.

Summary:

• Custom ACSIL study compiles and loads correctly
• Study calculations execute and indicators render normally
• Orders are attempted via sc.BuyEntry / sc.SellExit
• Platform is disconnected (File → Disconnect)
• Trade Simulation Mode = ON
• Auto Trading Enabled – Global = ON
• Auto Trading Enabled – Chart = ON
• Chart Trade Mode = ON
• Trading Locked = OFF

However, when running AutoTrade System Bar Based Backtest:

• Orders are blocked with error -8998
• “TRADING BLOCKED” messages appear
• NumberOfTimesCalculateCalled (Cumulative) = 0
• Trades tab remains empty
• Trade Statistics show zero or inconsistent values

This occurs even with a minimal SMA crossover test strategy.

Questions:

1) Are there ANY additional required settings or chart states that can silently block ACSIL Bar Based Backtests?
2) Does Bar Based Backtest strictly require Chart Trade Mode ON even in Simulation?
3) Are there known issues in the current build related to ACSIL AutoTrade or Bar Based Backtest?
4) Is there a way to fully reset trading/backtest state without reinstalling Sierra Chart?

Additional diagnostic information:

• Bar Backtest log shows:
"Back test processing: NumberOfTimesCalculateCalled (Cumulative) = 0"
• Study DOES calculate normally during live/sim chart replay
• Same behavior occurs with a minimal SMA cross test strategy

I can provide the exact ACSIL source code, logs, and screenshots if needed.

TRADING BLOCKED (-8998): Enable Chart Trade Mode + Auto Trading (Chart/Global) and run Bar Based Back Test
This message appears despite the following being verified at the time of the test:

• Trade Simulation Mode = ON
• Trading Locked = OFF
• Auto Trading Enabled – Global = ON
• Auto Trading Enabled – Chart = ON
• Chart Trade Mode = ON
• Platform disconnected (File → Disconnect)

Additional diagnostics from the same run:

Bar Backtest: [Symbol] | Back test processing:
NumberOfTimesCalculateCalled (Cumulative) = 0


Notes:
• The ACSIL study compiles and loads correctly
• Study calculations and plots execute normally
• sc.BuyEntry / sc.SellExit are called
• Same behavior occurs with a minimal SMA crossover test study
• Study does calculate during live/sim chart replay


Thank you.
Date Time Of Last Edit: 2026-01-07 20:25:05
[2026-01-07 16:46:08]
John - SC Support - Posts: 43861
We need to see the entire message related to the error you are getting.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-01-08 07:30:15]
User105070 - Posts: 3
Hi John — understood.

Below is the complete message context related to the error during:

Trade → AutoTrade System Bar Based Backtest

Platform / Build:
• Sierra Chart 2855 (Simulation Mode)
• Symbol: QQQ[M]
• Chart: 1 Minute Intraday
• Study: MIN - SMA Cross Test (Bar Backtest)

Backtest Method:
Trade → AutoTrade System Bar Based Backtest

State / Settings at time of test (all confirmed):
• Trade Simulation Mode = ON
• Auto Trading Enabled – Global = ON
• Auto Trading Enabled – Chart = ON
• Chart Trade Mode = ON
• Trading Locked = OFF
• Platform disconnected (File → Disconnect)

Exact Message Log output:

TRADING BLOCKED (-8998): Enable Chart Trade Mode + Auto Trading (Chart/Global) and run Bar Based Backtest

Bar Backtest: QQQ[M] 1 Min #1
Back test processing: NumberOfTimesCalculateCalled (Cumulative) = 0

Additional observations:
• Study calculations execute normally during live/sim chart replay
• Orders are submitted via sc.BuyEntry / sc.SellExit
• Trades tab remains empty
• Trade Statistics show zero values
• Same behavior occurs with a minimal ACSIL SMA crossover test study

Additional diagnostics:
• Trade Activity Log / Spreadsheet shows no end-of-test data
• Trade Activity Log remains active with no finalization entry
• No bar-based execution summary is written to the log
• Indicates the Bar Based Backtest engine is not entering or completing execution phase


If needed, I can attach:
• Full Message Log export
• The minimal ACSIL test study source code
• Screenshots showing all settings enabled
[2026-01-08 16:11:28]
John - SC Support - Posts: 43861
On the chart where you are performing the backtest, make sure the options for "Trading >> Chart Trade Mode On" and "Trade >> Auto-Trading Enabled - Chart" and "Trade >> Auto-Trading Enabled - Global" are all enabled (have a checkmark next to them). According to that message, at least one of these is not set properly.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-01-08 17:47:56]
User105070 - Posts: 3
Hi John,

Thanks for the response. To confirm explicitly:

On the same chart where the backtest is run (QQQ[M] 1-Min #1), all of the following are enabled and verified immediately before running the backtest:

• Trade → Chart Trade Mode On ✔
• Trade → Auto-Trading Enabled – Chart ✔
• Trade → Auto-Trading Enabled – Global ✔
• Trade Simulation Mode = ON
• Trading Locked = OFF
• Platform disconnected (File → Disconnect)

Despite this, the platform consistently reports:

TRADING BLOCKED (-8998): Enable Chart Trade Mode + Auto Trading (Chart/Global) and run Bar Based Backtest

Additional evidence that something internal is blocking execution:

• Bar Backtest log ends with
Back test processing: NumberOfTimesCalculateCalled (Cumulative) = 0
• Trades tab and Trade Statistics remain empty
• Trade Activity Log spreadsheet shows no end-of-test / finalization data
• Same behavior occurs with a minimal ACSIL SMA cross test study
• Study does calculate and log messages during the backtest loop

This suggests the Bar Based Backtest engine is entering the study, but not transitioning into the execution/fill phase, even though all required trading states are enabled.

Could you please advise:

What internal condition specifically causes NumberOfTimesCalculateCalled = 0 at the end of a Bar Based Backtest?

Is there any chart, trading, or internal state that can override the UI checkmarks and still block execution?

What is the recommended way to fully reset the Bar Based Backtest / trading state (short of reinstalling)?

I’m happy to provide the exact minimal ACSIL test code if helpful.

Thanks for taking a closer look
Attachment Deleted.
Private File

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account