- ago
In wl 9 with 5 minutes before close i setup my strategy monitor as follows:
scale = daily, use polling, use at-close signaling, seconds before close = 250,
and log below confirmed running strategy with no signals produced however.
Then running it manually again did not produced signals.
Why then after market close running back testing produced signals, but not when running strategy monitor?
Thanks

Here is the log
9/21/2026 14:55:19: Status = LoadingData
9/21/2026 14:55:19: Start Polling Thread
9/21/2026 14:55:19: Populating Data
9/21/2026 14:55:19: Calling GetHistories Pass 1
9/21/2026 14:56:12: GetHistories returned with 22 symbols
9/21/2026 14:56:12: Calling GetHistories Pass 2
9/21/2026 14:56:12: GetHistories returned with 22 symbols
9/21/2026 14:56:12: GLD 3449 bars to 9/18/2026 | WealthData
9/21/2026 14:56:12: DIA 3448 bars to 9/18/2026 | WealthData
...
9/21/2026 14:56:12: NVDA 3449 bars to 9/18/2026 | WealthData
9/21/2026 14:56:12: NextRun set to 9/21/2026 14:55:50
9/21/2026 14:56:12: Status = Idle
9/21/2026 14:56:12: Status = Processing
9/21/2026 14:56:43: Ran Strategy on MSFT,NOW,GEV,GOOGL,GLD,AMAT,SOXX,QQQ,AAPL,XLU,NVDA,SPY,META,PFE,AMD,CVX,AMZN,DIA,XLE,CPNG,RSP,TSM: 0 Signals, Run Time=28sec
9/21/2026 14:56:43: NextRun set to 9/21/2026 18:00
9/21/2026 14:56:43: Status = Completed
9/21/2026 14:56:43: Processed all Symbols

9/21/2026 14:58:00: Running Now
9/21/2026 14:58:01: Status = Processing
9/21/2026 14:58:27: Ran Strategy on MSFT,SOXX,NOW,SPY,QQQ,AAPL,GEV,XLU,AMAT,GOOGL,GLD,NVDA,AMD,AMZN,XLE,META,PFE,CVX,DIA,RSP,CPNG,TSM: 0 Signals, Run Time=25sec
9/21/2026 14:58:27: NextRun set to 9/21/2026 18:00
9/21/2026 14:58:27: Status = Completed
9/21/2026 14:58:27: Processed all Symbols
9/21/2026 14:58:27: Status = Deactivated
9/21/2026 14:58:27: Leaving Polling Thread

9/21/2026 15:03:28: Status = LoadingData
9/21/2026 15:03:28: Start Polling Thread
9/21/2026 15:03:28: Populating Data
9/21/2026 15:03:28: Calling GetHistories Pass 1
9/21/2026 15:03:29: GetHistories returned with 22 symbols
9/21/2026 15:03:29: Calling GetHistories Pass 2
9/21/2026 15:03:30: GetHistories returned with 22 symbols
9/21/2026 15:03:30: GLD 3450 bars to 9/21/2026 | WealthData
9/21/2026 15:03:30: XLE 3450 bars to 9/21/2026 | WealthData
9/21/2026 15:03:30: DIA 3449 bars to 9/21/2026 | WealthData
...
9/21/2026 15:03:30: NVDA 3450 bars to 9/21/2026 | WealthData
9/21/2026 15:03:30: Running Now
9/21/2026 15:03:30: Status = Idle
9/21/2026 15:03:30: Status = Processing
9/21/2026 15:03:32: NextRun set to 9/21/2026 18:00
9/21/2026 15:03:32: Status = Incomplete
9/21/2026 15:03:32: No Updates for 22 Symbols: GLD,XLE,DIA,SPY,XLU,RSP,SOXX,CPNG,GEV,PFE,QQQ,AMAT,AMD,NOW,GOOGL,META,TSM,CVX,AAPL,AMZN,MSFT,NVDA
9/21/2026 15:03:32: Status = Deactivated
9/21/2026 15:03:32: Leaving Polling Thread
1
321
24 Replies

Reply

Bookmark

Jump to End
- ago
#1
The log explains what's happening. At 14:56, the Strategy Monitor loaded WealthData and all of the Daily histories ended on 9/18:

GLD 3449 bars to 9/18/2026 | WealthData
DIA 3448 bars to 9/18/2026 | WealthData
...
NVDA 3449 bars to 9/18/2026 | WealthData

So when the Strategy ran at 14:56, there was no 9/21 Daily bar yet for it to evaluate. Running it manually again at 14:58 didn't help because the underlying data still hadn't changed.

After the market closed, WealthData published the completed 9/21 Daily bars, which you can see when you restarted at 15:03:

GLD 3450 bars to 9/21/2026 | WealthData
...
NVDA 3450 bars to 9/21/2026 | WealthData

That's why the backtest could produce the signals after the close.

Running the strategy manually from the SM does not trigger At-Close Signal processing, you'd need to let that happen on its own at the configured time.
0
Cone8
- ago
#2
It was a failed test because you Activated the Strategy item too close to the run time - 250 seconds before the close is 14:55:50.

You'll see that in the first block of the log, GetHistories didn't finish until 14:56:12...
9/21/2026 14:56:12: GetHistories returned with 22 symbols

At 14:56:12, Next Run was set to 14:55:00
That Next Run started immediately, but since it was already inside the "window" of an AtClose run, it runs as normal processing, by design.

If it were an At-Close Processing run, you'd see "Collecting Partial Bars..." in the log.
0
- ago
#3
What is a practical guideline for a time to activate the Strategy Monitor before the intended At‑Close run window (say seconds before close = 250 or 600 ) ?
0
Cone8
- ago
#4
Practically, just do it once and save it in your Workspace. Then you aren't rushing to Activate something that could have been done 7 hours before.

If the question is how long do you need to complete the process before the close, it depends on the provider and the number of symbols. Do a test and see how it takes to "Collect Partial Bars". As a rule of thumb you can start with 2 symbols per second, so you'd need about 1 minute for 100 symbols.
0
- ago
#5
Per yours - "SM does not trigger At-Close Signal processing, you'd need to let that happen on its own at the configured time" - means Partial or Daily bars form at the configured time = XX seconds before close ? Is this a method to form Partial or Daily bars for Today before close for Strategy evaluation?
0
Cone8
- ago
#6
Partial bars are returned from real-time providers for history requests whenever the market is open. Those requests go out when the Run starts N seconds before the close.
0
- ago
#7
Thanks,
I'll change Monitor strategy streaming from Yahoo to Tingo - to provide real time and get Partial bars before closing.
0
- ago
#8
WealthData also returns partial bars, assuming your symbols are all in the S&P 500.
0
Cone8
- ago
#9
QUOTE:
I'll change Monitor strategy streaming ..

The Streaming Provider does not matter here. It's the checked Historical Provider highest in the list that returns [partial] daily bars. WealthData works for that (SP500, N100, and many ETF), but a WealthData partial bar prices could be delayed by a couple minutes. Yahoo! partial bars may be more up-to-date (NLS pricing).

Who's your broker?
With only 22 symbols as indicated in your log, even IB would work well for this.
0
- ago
#10
For testing - using Dummy broker.
Here is the latest test log - however no Partial bars getting there -

9/23/2026 10:48:30: Status = LoadingData
9/23/2026 10:48:30: Start Polling Thread
9/23/2026 10:48:30: Populating Data
9/23/2026 10:48:30: Calling GetHistories Pass 1
9/23/2026 10:48:30: GetHistories returned with 21 symbols
9/23/2026 10:48:30: Calling GetHistories Pass 2
9/23/2026 10:48:31: GetHistories returned with 21 symbols
9/23/2026 10:48:31: GLD 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: DIA 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: GEV 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: AMD 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: AMAT 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: QQQ 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: RSP 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: SOXX 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: SPY 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: NOW 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: CVX 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: XLU 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: XLE 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: NVDA 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: PFE 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: META 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: MSFT 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: GOOGL 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: AMZN 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: AAPL 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: TSM 64 bars to 9/22/2026 | Yahoo! Finance
9/23/2026 10:48:31: NextRun set to 9/23/2026 14:00
9/23/2026 10:48:31: Status = Idle
0
Cone8
- ago
#11
Just like for all tools, partial bars are ignored, discarded for regular runs.

Remember where we're trying to do here: get an estimate of the Daily bar before the close.. when At-Close Process runs. I don't think you can even schedule that more than 1/2 hour before the close.
0
- ago
#12
In yesterday’s testing I tried both 1800 seconds and 600 seconds before the close, but no partial bars were generated. Since partial bars are important as a proxy for the final daily bar, I’m submitting a feature request to test/support this capability.

Thanks for considering it.
#FeatureRequest
0
Cone8
- ago
#13
We use this feature every day. It works.

How did you test for partial bars? They don't show up in the log, but you can collect evidence by exporting the bars object during the At Close run.
0
- ago
#14
So, partial bars don't show up in the Strategy monitor log by design but generated to participate at-close signaling. To test the bars object during the At Close run
do I need to create bars export method as part of strategy script in c# ?
0
- ago
#15
You WILL see a message in the SM log when partial bars are being requested and delivered.
0
- ago
#16
No signals generated at-close for testing strategy ( buy open, sell close).
Please see/advise on following results.

Thanks

Monitor settings,



Log without Partial bars,
9/24/2026 14:49:57: Status = LoadingData
9/24/2026 14:49:57: Start Polling Thread
9/24/2026 14:49:57: Populating Data
9/24/2026 14:49:57: Calling GetHistories Pass 1
9/24/2026 14:49:58: GetHistories returned with 21 symbols
9/24/2026 14:49:58: Calling GetHistories Pass 2
9/24/2026 14:49:58: GetHistories returned with 21 symbols
9/24/2026 14:49:58: GLD 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: DIA 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: MRNA 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: GEV 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: QQQ 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: RSP 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: SOXX 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: SPY 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: PFE 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: XLE 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: XLU 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: NVDA 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: AMAT 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: AMD 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: GOOGL 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: MSFT 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: CVX 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: AMZN 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: META 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: TSM 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: AAPL 64 bars to 9/23/2026 | Yahoo! Finance
9/24/2026 14:49:58: NextRun set to 9/24/2026 14:55
9/24/2026 14:49:58: Status = Idle
9/24/2026 14:55:01: Status = Processing
9/24/2026 14:55:03: Ran Strategy on GEV,DIA,GLD,RSP,MRNA,XLE,PFE,SOXX,QQQ,SPY,XLU,AMD,NVDA,AMZN,AMAT,TSM,GOOGL,CVX,META,AAPL,MSFT: 0 Signals, Run Time=267ms
9/24/2026 14:55:03: NextRun set to 9/24/2026 18:00
9/24/2026 14:55:03: Status = Completed
9/24/2026 14:55:03: Processed all Symbols

File Output run as part of testing strategy and having Partial bars for AAPL and other symbols
Date,Open,High,Low,Close,Volume
2026-06-24,295.36,299.70,292.94,293.08,53081900
...
2026-09-23,341.08,341.80,335.50,337.02,31587800
2026-09-24,336.32,338.91,334.30,336.73,17560317







0
Cone8
- ago
#17
To me, it looks like it worked perfectly. The close of the 1-minute bar on 9/24/2026 for AAPL at 15:55:00 ET (based on the log, it looks like you're in CST) was 336.73, as your data shows as the last bar's partial Daily close. High and Low for the day are correct too (Open is debatable).

If you didn't get a signal, one of these must be true:
a. the script doesn't have a MarketClose signal, or,
b. the script's logic didn't trigger the MarketClose signal, or,
c. it's not programmed correctly to trigger the signal on an At-Close run.

If you can't figure it out, we'd be happy to review your test script.

By the way, the message "Collecting Partial Bars..." actually shows up in the Status column, not in the log.
0
- ago
#18
Thanks Cone, I’m going to add this to the log as well.
1
- ago
#19
Please see the Execute script

public override void Execute(BarHistory bars, int idx)
{
if (!HasOpenPosition(bars, PositionType.Long))
{
PlaceTrade(bars, TransactionType.Buy, OrderType.Market, bars.Open[idx]);
}
else
{
PlaceTrade(bars, TransactionType.Sell, OrderType.Market, bars.Close[idx]);
}
}
0
Cone8
- ago
#20
Both orders are OrderType.Market.

At-Close Processing ONLY acts on orders for OrderType.MarketClose. When a MarketClose signal triggers during an At-Close Processing run, it will be converted to a Market order.

Please watch this video about how to set up and use At-Close processing and its purpose in a strategy:
https://www.youtube.com/watch?v=Z39A55OEudM
0
- ago
#21
Yes, using Ordertype.Marketclose - generated testing signals.
And as Per Glitch to “add this to the log as well” - going to be much beneficial refinement.

Thanks!
1
- ago
#22
It will be in Build 11, the next upcoming release.
0
- ago
#23
Thanks,
Adding at-close prices to SM log would help.

In SM testing got 4 signals today with proper at-close prices retrieved in SM at 2 pm.
However, signals were reported as of yesterday 9/29 along with their Closing prices. Wonder is this is expected behavior. See below.

0
Cone8
- ago
#24
Sure (and the market isn't closed today). To get an At-Close signal, the MarketClose signal MUST occur on the previous (yesterday's) bar for the order to be processed at the close "today".

Remember, we're adding the partial bar to the BarHistory to allow the script to calculate indicators at the "estimated close of today" so that you can create rules like, if (bars.Close[idx + 1] < sma200[idx + 1]) then sell at the close, tomorrow (which is today). That signal occurred on yesterday's bar, but couldn't be processed without today's [estimated] closing price, which happens before the close!
0

Reply

Bookmark

Jump to Top