Expiry Mode
The “Expiration Mode” enables the Chart to stop data updates, based on a specified “expire” date. Any new data afterwards will not update the Chart.
In regular mode the Chart shifts the data to the left. In “Expiration Mode” the Chart fills from left to right, showing all the data including the future dates area.
The following API enables switching this mode ON or OFF on the fly.
StopExpiration
Disable expiration mode and reset buffers accordingly.
1 2 3 4 |
objChartMain1.chart.StopExpiration(); objChartMain1.chart.SetNumberOfBars(1000); //Reduce buffer size objChartMain1.chart.SetNumVisibleItems(90); //How many candle to show (default zoom in) objChartMain1.chart.SetNumFuturesBars(1,1); //Reduce the number of future bars (iNumOfFutureBars, iNumVisibleFutureBars) |
UpdateExpirationField
Update the expiration date and enable expiration mode if not already enabled.
1 2 3 |
objChartMain1.chart.UpdateExpirationField("date","2017-01-01 10:00:00"); objChartMain1.chart.SetNumberOfBars(300000); //Increase buffer size objChartMain1.chart.SetNumVisibleItems(30000); //How many candle to show (default zoom in) |