Some topics in the forum have noted that you need to iterate through the series that is used to hold values for the plot, but i have not seen an example.
I have written this code, and it seems to work correctly when tested on a playback connection.
// reset all previous values used in plot CountOfTrumpTweetsAgainstAmazon for( int seriesindex = 0; seriesindex < CountOfTrumpTweetsAgainstAmazon.Count; seriesindex++ ) { // reset the series value at this index pointer CountOfTrumpTweetsAgainstAmazon[seriesindex] = 0.0; Print("resetting series value at index " + seriesindex ); }
The speed of this operation appears to be very fast when tested on a playback connection running at 1x speed, even though it is printing to the Ninjascript Output window at each bar index pointer as a debug test.
resetting series value at index 5417 resetting series value at index 5418
Comment