Hi Community,
i noticed some weard behviour when selecting the 60 minute scale in the chartview.
maybe i have to implement the dataprovider differently but i would appreciate help in this matter because i have no clue why that error occurs.
to show the problem you may only need these two types.
when traversing thru the scale settings in the ui beside the exception it also runs twice with the 30 minute scale into the gethistorybarinternal.
kind regards
mike
i noticed some weard behviour when selecting the 60 minute scale in the chartview.
maybe i have to implement the dataprovider differently but i would appreciate help in this matter because i have no clue why that error occurs.
to show the problem you may only need these two types.
CODE:
internal class CustomDataSetProvider : DataSetProviderBase { private List<DataSet> _dataSet = []; public override List<DataSet> DataSets => _dataSet; public override string Name => "Custom"; public override void Initialize() { _dataSet.Add( new DataSet { PreferredDataProviderName = "Custom", Name = "Custom", IsDynamicEnabled = false, IsUserCreated = false, ReadOnlySymbols = true, Symbols = ["SYMBOL"], }); } } internal class CustomDataProvider : DataProviderBase { public override string Name => "Custom"; public override bool SupportsScale(HistoryScale scale) => true; protected override BarHistory GetHistoryInternal(string symbol, HistoryScale scale, DateTime startDate, DateTime endDate, int maxBars) { Debug.WriteLine($"{symbol} - {scale}."); // Return some dummy data. var bh = new BarHistory(symbol, scale); bh.Add(DateTime.UtcNow, 0, 0, 0, 0, 0); return bh; } }
when traversing thru the scale settings in the ui beside the exception it also runs twice with the 30 minute scale into the gethistorybarinternal.
kind regards
mike
Rename
What you call weird behavior is in fact documented in the Historical Data Provider API > Compress30MinuteBarsFor60Minute.
You are absolutely right.
Disabling the flag did the trick.
Thank you very much.
Disabling the flag did the trick.
Thank you very much.
Your Response
Post
Edit Post
Login is required