My syntax is wrong on the AddDataSeries and I'm hoping you can help me out. I'm adding about 10 series. I use a 3rd party indicator. If my indicator is > 0 on all 10 data series I want to paint my background. All the examples I see use EMA which adds 20 periods or so and does not apply. My error comes in OnBarUpdate. I'm writing:
// {
// if (resValue[0] > 0)
// R0 = 1;
// else if (supValue[0] > 0)
// S0 = 1;
// else { R0 = 0; S0 = 0; }
// }
// if (BarsInProgress == 1)
// {
// if (resValue[1][0] > 0)
// R1 = 1;
// else if (supValue[1][0] > 0)
// S1 = 1;
// else { R1 = 0; S1 = 0; }
// }
Can someone tell me how to write this?
Thank you.
Comment