I need to assign new historical data to my Plots outside of the core event methods (such as a custom button click).
I can use Series<T>.GetValueAt(barIndex) to read historical values, but I don't find any method to set historical values.
If I try to assign it directly, an exception is thrown.
protected override void OnBarUpdate() { MyCalcValues[0] = Close[0] * 2.0; if ( CurrentBar > 1 ) MyCalcValues[1] = Close[0]; // it works fine } private void ExampleButtonClick(object sender, RoutedEventArgs e) { // This method is executed when the user clicks on a button MyCalcValues[1] = Close[0] * 3.0; // it throws exception }
Thanks.
Comment