I only see that the chart is assigned to the ohlcdata array with setdata, but I don't see what efficient method is used to refresh the last candlestick close and only add a new candlestick, what should be the way this refresh the last cell and add a new cell? Where is this sample code?
I find this method, SetBinding(DependencyProperty, BindingBase)
Attaches a binding to this element, based on the provided binding object.
(Inherited from FrameworkElement.)
but no samples
Thank you
tradingChart update
Moderator: Queue Moderators
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: tradingChart update
TradingChart has AddData() method, which adds 1 or more points to the end of existing data array. The demonstration of usage is in ExampleTraderPerformance from our Demo (Interactive Examples App).
If you would be using LightningChart .NET control directly, then stockSeries.AddPoints() method does the same thing (add points to the end of array).
If you would be using LightningChart .NET control directly, then stockSeries.AddPoints() method does the same thing (add points to the end of array).
Re: tradingChart update
Thank your reply!
for update close of last OhlcData , i still use SetData or other?
for update close of last OhlcData , i still use SetData or other?
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: tradingChart update
At the moment, there is no better way than reading existing data-array, changing any item in array and setting Data-array again to the chart:
Hope this helps.
Code: Select all
var data = _chart.GetOhlcData();
data[i].Close = newValue;
_chart.SetData(data, "", "value update");