In my C# coded historical data provider, I set UsesPersistentStorage and SupportsPartialBar properties to true.
When I run WL in the middle of a trading day, I expect it to fetch the current day's partial bar from my provider. However, it only shows bars till the previous traded day.
When I do "Reload chart data from provider", WL then fetches the data from the provider and shows current day's partial bar correctly.
When I run WL in the middle of a trading day, I expect it to fetch the current day's partial bar from my provider. However, it only shows bars till the previous traded day.
When I do "Reload chart data from provider", WL then fetches the data from the provider and shows current day's partial bar correctly.
Rename
Historical providers must delete the partial bar from their data, if returned by data feed. You shouldn't be saving it during the day.
I understand. The partial bar shouldn't be saved because it can change. However, it can be shown in the chart.
When WL needs to show the chart, it can fetch the data from the disk for the completed bars. In addition, since the provider supports partial bars, it can query the provider on the fly for the current day to fetch and show the partial bar - without the user invoking the "Reload" action immediately (after opening the chart). The Reload from the provider option can be used to refresh the data some time after opening the chart to refresh the view.
Otherwise, what is the use of PartialBar Support?
When WL needs to show the chart, it can fetch the data from the disk for the completed bars. In addition, since the provider supports partial bars, it can query the provider on the fly for the current day to fetch and show the partial bar - without the user invoking the "Reload" action immediately (after opening the chart). The Reload from the provider option can be used to refresh the data some time after opening the chart to refresh the view.
Otherwise, what is the use of PartialBar Support?
The use of PartialBar support is to return the partial bar using GetPartialBarInternal when the market is open:
https://www.wealth-lab.com/Support/ExtensionApi/HistoricalDataProvider
https://www.wealth-lab.com/Support/ExtensionApi/HistoricalDataProvider
I know. I am trying to say that the "GetPartialBarInternal" method on my provider is never called during the trading hours if my provider uses persistence and when the UI is on Daily chart - Unless I invoke "Reload data from the provider" option on the chart.
By convention, WL8 never displays a partial bar unless the chart is streaming. WL8 is primarily a backtesting tool so the partial bar isn't required when backtesting or viewing backtest results on the chart.
I see. Then Reload shouldn't display the partial bar either while in non-streaming mode for the same reason you stated.
Right, your provider should discard any partial bar. You can call the method RemovePartialBar in your provider before you return the BarHistory. It uses the assigned MarketDetails (Markert property of the BarHistory) to determine if the last bar of data is a partial bar, and removes it accordingly. Let me know if this helps!
Your Response
Post
Edit Post
Login is required