kazuna8
 ( 34.69% )
- ago
I found the fact that WL8's Strategy Monitor executes the strategy only when the dataset is updated.
https://www.wealth-lab.com/Discussion/HasStreamingBar-returns-consistent-results-in-Strategy-Monitor-11644

This is not the case with WL6 and WL6's Strategy Monitor executes the strategy at the scheduled time regardless of whether or not the dataset is updated.

Is there any way to enforce Strategy Monitor to execute the strategy regardless of the dataset update at the scheduled time?

The reason why the dataset is already up-to-date when the Strategy Monitor examines the strategy is that I have the same strategy running on the chart window to monitor the trade activity visually. When the Strategy Monitor examines the strategy after the market closes to generate a signal, the chart window has updated the data set already, so the Strategy Monitor doesn't see the dataset to update it.
0
298
Solved
22 Replies

Reply

Bookmark

Sort
Cone8
 ( 5.68% )
- ago
#1
QUOTE:
WL8's Strategy Monitor executes the strategy only when the dataset is updated.
Who said that? It wasn't me.

I indicated that it will run if the data is up-to-date, on a per-symbol basis. Don't read anything else into that.
0
kazuna8
 ( 34.69% )
- ago
#2
You didn't. As I mentioned in the other thread, I tested it and found it today.
0
Cone8
 ( 5.68% )
- ago
#3
What do you mean by "when the dataset is updated."?

To me that sounds like when the entire dataset is updated in that moment.

It's very simple.. a symbol run will Execute if its data is updated for the current interval. That's not going to change.
0
kazuna8
 ( 34.69% )
- ago
#4
I started WL8 at 14:00 PST (17:00 EST) with a workspace consisting of a chart and the Strategy Monitor.

When the strategy was supposed to be executed at the scheduled time of 14:35, it took 5 minutes and didn't get a run with a status saying "No Updates...".

QUOTE:
2024/09/09 14:00:50: Status = LoadingData
2024/09/09 14:00:50: Start Streaming Thread
2024/09/09 14:00:50: Populating Data
2024/09/09 14:00:50: Calling GetHistories Pass 1
2024/09/09 14:00:53: GetHistories returned with 2 symbols
2024/09/09 14:00:53: Calling GetHistories Pass 2
2024/09/09 14:00:54: GetHistories returned with 2 symbols
2024/09/09 14:00:54: SPY:7,221 bars to 20240909 0000|IQFeed
2024/09/09 14:00:54: VIX.XO:8,740 bars to 20240909 0000|IQFeed
2024/09/09 14:00:54: NextRun set to 2024/09/09 14:35
2024/09/09 14:00:54: Status = Idle
2024/09/09 14:35:00: Status = Processing
2024/09/09 14:40:00: NextRun set to 2024/09/10 14:35
2024/09/09 14:40:00: Status = Incomplete
2024/09/09 14:40:00: No Updates for 2 Symbols: SPY,VIX.XO
0
Cone8
 ( 5.68% )
- ago
#5
What time zone are you in?
... PST.

This is after market. No guarantees there. If you need to run something, you better use a symbol that's ticking.


Edit -
I don't know about VIX, but you should have got an updated for SPY. Let me put my IQFeed hat back on and try to remember what's different about that...
0
kazuna8
 ( 34.69% )
- ago
#6
I'm in PST.

Looking at the log, the dataset was updated by either the chart running the same strategy and the same dataset, or the Strategy Monitor updating the dataset when activating(?) the starategy.
0
kazuna8
 ( 34.69% )
- ago
#7
QUOTE:
This is after market. No guarantees there. If you need to run something, you better use a symbol that's ticking.
Yes, it is after market. It's the first time in the day after the market closes and VIX is stopped (VIX keeps moving for 30minutes(ish) after the market close).
0
Cone8
 ( 5.68% )
- ago
#8
You keep saying "dataset was updated" but there's nothing that shows that. In fact, it states the opposite - "No updates for 2 Symbols.."

The S. Monitors starts processing at the scheduled time by the local clock (even in WL6).
0
Cone8
 ( 5.68% )
- ago
#9
Check your IQFeed settings. Did you check "Regular Session Only"?
0
kazuna8
 ( 34.69% )
- ago
#10
Isn't this an indication of the dataset being updated?
QUOTE:
2024/09/09 14:00:50: Status = LoadingData
2024/09/09 14:00:50: Start Streaming Thread
2024/09/09 14:00:50: Populating Data
2024/09/09 14:00:50: Calling GetHistories Pass 1
2024/09/09 14:00:53: GetHistories returned with 2 symbols
2024/09/09 14:00:53: Calling GetHistories Pass 2
2024/09/09 14:00:54: GetHistories returned with 2 symbols
2024/09/09 14:00:54: SPY:7,221 bars to 20240909 0000|IQFeed
2024/09/09 14:00:54: VIX.XO:8,740 bars to 20240909 0000|IQFeed
2024/09/09 14:00:54: NextRun set to 2024/09/09 14:35
2024/09/09 14:00:54: Status = Idle

And this indicates that the Strategy Monitor isn't executing the strategy because the dataset didn't get updated since 14:00:5x?
QUOTE:
2024/09/09 14:35:00: Status = Processing
2024/09/09 14:40:00: NextRun set to 2024/09/10 14:35
2024/09/09 14:40:00: Status = Incomplete
2024/09/09 14:40:00: No Updates for 2 Symbols: SPY,VIX.XO
0
kazuna8
 ( 34.69% )
- ago
#11
QUOTE:
Check your IQFeed settings. Did you check "Regular Session Only"?
Yes, I see it is checked. Does it matter for the Daily dataset?
0
Cone8
 ( 5.68% )
- ago
#12
2024/09/09 14:00:54: SPY:7,221 bars to 20240909 0000|IQFeed
2024/09/09 14:00:54: VIX.XO:8,740 bars to 20240909 0000|IQFeed

You didn't mention it, but these are daily bars, correct?

QUOTE:
Yes, I see it is checked. Does it matter for the Daily dataset?
No. I just realized for the first time that we're talking about daily bars.

I don't see a problem. You initialized the run for tomorrow.
0
kazuna8
 ( 34.69% )
- ago
#13
I didn't mention but I copied the log for you to examine it.
Yes, these are daily bars.
0
Cone8
 ( 5.68% )
- ago
#14
Sure, but when I see that the schedule is 14:35, I'm immediately thinking 5 minute bars at 2:35 EST. It takes me a while to wind back the clock.
0
kazuna8
 ( 34.69% )
- ago
#15
I have it scheduled at 13:35 (5 minutes after VIX stops) on WL6 where I'm doing my real trade.

I just added an hour for the WL8 strategy to test my WL8 migration.

Sorry for the confusion but I'm running WL6 and WL8 back to back for the time being before fully switching to WL8.
0
kazuna8
 ( 34.69% )
- ago
#16
QUOTE:
I don't see a problem. You initialized the run for tomorrow.

But here is the problem. The run scheduled at 14:35 for today didn't get executed.
QUOTE:
2024/09/09 14:40:00: Status = Incomplete
2024/09/09 14:40:00: No Updates for 2 Symbols: SPY,VIX.XO
0
Cone8
 ( 5.68% )
- ago
#17
I just did this test. Times are local (GMT + 0). Scheduled a run for 6:38 local, IQFeed loaded an updated Daily bar for SPY. and the strategy ran 15 seconds later...
CODE:
9/10/2024 06:37:40: Status = LoadingData 9/10/2024 06:37:40: Start Polling Thread 9/10/2024 06:37:40: Populating Data 9/10/2024 06:37:40: Calling GetHistories Pass 1 9/10/2024 06:37:46: GetHistories returned with 1 symbols 9/10/2024 06:37:46: Calling GetHistories Pass 2 9/10/2024 06:37:46: GetHistories returned with 1 symbols 9/10/2024 06:37:46: SPY:251 bars to 20240909 0000|IQFeed 9/10/2024 06:37:46: NextRun set to 9/10/2024 06:38 9/10/2024 06:37:46: Status = Idle 9/10/2024 06:38:00: Status = Processing 9/10/2024 06:38:00: Pass 1 - Requesting updates for 1 symbols... 9/10/2024 06:38:01: Pass 1 - UpdateHistories returned 0 symbols 9/10/2024 06:38:01: Ran Strategy on SPY: 0 Signals, Run Time=596ms 9/10/2024 06:38:01: NextRun set to 9/11/2024 06:38 9/10/2024 06:38:01: Status = Completed 9/10/2024 06:38:01: Processed all Symbols

When it runs, the Strategy outputs the local time and last bar to a file. Here's the output.
CODE:
06:38:01.655   20240909 0000   544.6500   547.7100   542.6800   546.4100   40445822


I rescheduled for 06:43 and ran it again.
CODE:
06:38:01.655   20240909 0000   544.6500   547.7100   542.6800   546.4100   40445822 06:43:02.299   20240909 0000   544.6500   547.7100   542.6800   546.4100   40445822
Last night, I did this test, but IQFeed had not updated the Daily bar yet, so it didn't run last night, as expected when the data isn't up-to-date.
0
kazuna8
 ( 34.69% )
- ago
#18
Comparing your log and mine, the differences are:

Yours was scheduled at 6:38 and LoadingData started 20 seconds prior to the scheduled time.
Mine was scheduled at 14:35 and LoadingData didn't start for the scheduled time. Instead, LoadingData started when I started WL8 which auto-activated the strategy.

Yours have these three lines between "Status = Processing" and "NextRun set to".
CODE:
9/10/2024 06:38:00: Pass 1 - Requesting updates for 1 symbols... 9/10/2024 06:38:01: Pass 1 - UpdateHistories returned 0 symbols 9/10/2024 06:38:01: Ran Strategy on SPY: 0 Signals, Run Time=596ms
Mine didn't have those three lines.

What would be making these differences?
0
kazuna8
 ( 34.69% )
- ago
#19
There is one more difference.

Yours:
CODE:
9/10/2024 06:37:40: Start Polling Thread

Mine:
CODE:
2024/09/09 14:00:50: Start Streaming Thread

You are using Polling and I'm using Streaming.
Would it make the difference?
0
kazuna8
 ( 34.69% )
- ago
#20
I have chosen Streaming Data based on your write-up.
https://www.wealth-lab.com/blog/wealthlab-data-providers

If I read it correctly, Streaming is recommended for IQFeed.

I think I'm going to try Polling.
Is there any downside to using Polling for IQFeed?
0
Cone8
 ( 5.68% )
- ago
#21
That article focuses on Intraday data.
Streaming is clearly not the choice for Daily bars. Of course, use Polling for Daily.
1
Best Answer
kazuna8
 ( 34.69% )
- ago
#22
Yes, it looks like it.
If I use the Polling method, it seems to execute the strategy regardless.
I appreciate your help on this as well.
1

Reply

Bookmark

Sort