how can I monitor if there was an NBarsUp Event during the last 7 bars?
I tried this, but it doesn't work:
for (int i = 0; i < 7; i++)
{
double value = NBarsUp(3, true, true, true)[i];
if (value == 1)
{
BackColor = Color.Green;
}
}
P.S.: Interestingly, if I change it to "for (int i = 0; i > -7; i--)", it gives a green background for the 7 bars leading up to the NBarsUp Event. So, looking into the future works, but the ordinary use doesn't? What am I missing?


Comment