I test this code:
int i = 0; // we will change the value of i to 1, 2, 3 .... if (Close[i] > Open[i]) Print("Bull"); else if (Close[i] < Open[i]) Print("Bear");
However, a problem occurs when I put the code in my button click event:
void ToggleClick(object sender, RoutedEventArgs e) { ... }
For i = 1, 2, 3...: the following error happens, even though we already have hundreds of bars on chart
Thanks.
Comment