kazuna8
 ( 42.83% )
- ago
API reference says:
QUOTE:
It is intended for use in Chart Style and other Extension development.


I have a strategy running in Strategy Monitor with the "Use Streaming Data" selected for IQFeed streaming provider.

I would like to know if the last bar is a streaming bar like I used to do it (IsStreaming) in WL6.

So far I tested, HasStreamingBar works fine in Strategy Monitor with the streaming data.
0
223
12 Replies

Reply

Bookmark

Sort
- ago
#1
As several posters have already asked this question, try to search the forum before creating a third duplicate. Be sure to "Enable Full-Text Search".

https://www.wealth-lab.com/Discussion/HasStreamingBar-is-sometimes-false-during-market-hours-11109
https://www.wealth-lab.com/Discussion/HasStreamingBar-fails-when-switching-bar-scale-9470
0
kazuna8
 ( 42.83% )
- ago
#2
Yes, I did but I didn't find it mentioned about if it was used in Strategy Monitor.
0
Cone8
 ( 5.57% )
- ago
#3
QUOTE:
I would like to know if the last bar is a streaming bar like I used to do it (IsStreaming) in WL6.
For IQFeed, the S. Monitor will give you exactly the same result as a Streaming Chart when you select Streaming (or Streaming Bars).

QUOTE:
So far I tested, HasStreamingBar works fine in Strategy Monitor with the streaming data.
What are you trying to do with that in the Strategy Monitor, exactly? I can't see how it has any use at all - unless you want to access the current partial bar in progress while processing the bar interval that just ended.
0
kazuna8
 ( 42.83% )
- ago
#4
QUOTE:
For IQFeed, the S. Monitor will give you exactly the same result as a Streaming Chart when you select Streaming (or Streaming Bars).

So HasStreamingBar should work fine in the Strategy Monitor for IQFeed when I select the "Use Streaming Data" option.
The "Use Streaming Bars" option is grayed out in the case of the Daily scale.

QUOTE:
What are you trying to do with that in the Strategy Monitor, exactly?

I want to send an email and a text message from the strategy running in the Strategy Monitor. I just wanted to make sure that it is the last bar and is a streaming bar so that it is sending only once.
0
Cone8
 ( 5.57% )
- ago
#5
QUOTE:
So HasStreamingBar should work fine in the Strategy Monitor for IQFeed when I select the "Use Streaming Data" option.
No. There's no reason to use this, especially for your purpose. Let's go over what our documentation says about HasStreamingBar

Returns true if BarHistory has streaming bar. This property is not intended to be used in Strategy code, and will return inconsistent results. Rather, it is intended for use in Chart Style and other Extension development.

QUOTE:
The "Use Streaming Bars" option is grayed out in the case of the Daily scale.
Of course. It's not smart to use Streaming or the Streaming Bars for non-intraday scales.

A Streaming Chart and the S. Monitor will only process your strategy if it gets an update for the interval.
If it doesn't, it won't even be executed. So it if it runs, it's the "last bar" and it's current.
0
kazuna8
 ( 42.83% )
- ago
#6
QUOTE:
A Streaming Chart nor and the S. Monitor will only process your strategy if it gets an update for the interval. If it doesn't, it won't eve be executed. So it if it runs, it's the "last bar".

But the strategy gets executed in Strategy Monitor when the scheduled time comes even if there is no update to the bar since the last run. Correct?

On the Strategy Monitor, I have a Daily scale strategy scheduled to run at 16:30, 17:00, 17:30, or something like that. Each time when the scheduled time comes, the strategy is executed even if there is no update to the daily bar because it is well after the market close. Correct?

That's how my strategy has been working for years on WL6.

I guess WK6's "IsStreaming" was so handy and I was using it to distinguish if the same strategy code was running with the streaming bar in the Chart/SM or if it was backtesting.
0
Cone8
 ( 5.57% )
- ago
#7
QUOTE:
But the strategy gets executed in Strategy Monitor when the scheduled time comes even if there is no update to the bar since the last run. Correct?
In Post #5 I just said the contrary, so clearly not correct. If the data is not up-to-date, for a particular symbol, then it's not run for that symbol.

QUOTE:
On the Strategy Monitor, I have a Daily scale strategy scheduled to run at 16:30, 17:00, 17:30, or something like that.
Leaving aside that you can only configure one time of day to run a Daily strategy, it would work at any time after the market close because the daily bar is current. (Post #5)

QUOTE:
I guess WK6's "IsStreaming" was so handy
Finally we get to what you're really after. Maybe ExecutionMode will serve whatever you need it for.
0
kazuna8
 ( 42.83% )
- ago
#8
QUOTE:
Finally we get to what you're really after. Maybe ExecutionMode will serve whatever you need it for.
Yes, I'm using ExecutionMode already. On top of that, I wanted to ensure the execution is from the last bar and it is a streaming bar.

Perhaps, the fact that the strategy gets executed from StrategyExecutionMode.StrategyMonitor and if it is the last bar, it implies that the bar is a streaming bar because the daily bar is current.
0
kazuna8
 ( 42.83% )
- ago
#9
QUOTE:
Leaving aside that you can only configure one time of day to run a Daily strategy, it would work at any time after the market close because the daily bar is current.
Is it also applicable to WL6? I have more than one scheduled for a day to run the same Daily strategy on WL6 and I see them all getting run at the scheduled time.
0
Cone8
 ( 5.57% )
- ago
#10
You probably don't need me to confirm that you add the same strategy many times and run each one whenever you want.
0
kazuna8
 ( 42.83% )
- ago
#11
That was my observation from using WL6 for a long time.
I haven't tried it yet on WL8 as I just completed this part of migration this weekend.
I will see how it works on WL8 this week.
0
kazuna8
 ( 42.83% )
- ago
#12
I tested today and here are my findings.

WL6 doesn't care whether or not the data set is updated, so the strategy is executed at the scheduled time regardless.

WL8 doesn't execute the strategy if there is no update to the data set. Unfortunately, this is blocking me from migrating from WL6 to WL8.

I am going to write another discussion about it.
0

Reply

Bookmark

Sort