API reference says:
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.
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.
Rename
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
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
Yes, I did but I didn't find it mentioned about if it was used in Strategy Monitor.
QUOTE:For IQFeed, the S. Monitor will give you exactly the same result as a Streaming Chart when you select Streaming (or Streaming Bars).
I would like to know if the last bar is a streaming bar like I used to do it (IsStreaming) in WL6.
QUOTE: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.
So far I tested, HasStreamingBar works fine in Strategy Monitor with the streaming data.
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.
QUOTE:No. There's no reason to use this, especially for your purpose. Let's go over what our documentation says about HasStreamingBar
So HasStreamingBar should work fine in the Strategy Monitor for IQFeed when I select the "Use Streaming Data" option.
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:Of course. It's not smart to use Streaming or the Streaming Bars for non-intraday scales.
The "Use Streaming Bars" option is grayed out in the case of the Daily scale.
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.
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.
QUOTE: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.
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?
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. (Post #5)
On the Strategy Monitor, I have a Daily scale strategy scheduled to run at 16:30, 17:00, 17:30, or something like that.
QUOTE:Finally we get to what you're really after. Maybe ExecutionMode will serve whatever you need it for.
I guess WK6's "IsStreaming" was so handy
QUOTE: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.
Finally we get to what you're really after. Maybe ExecutionMode will serve whatever you need it for.
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.
QUOTE: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.
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.
You probably don't need me to confirm that you add the same strategy many times and run each one whenever you want.
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.
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.
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.
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.
Your Response
Post
Edit Post
Login is required