I have an indicator that are drawing an EMAs crossover.
double E1=EMA(13)[0];
double E2=EMA(21)[0];
Now i need to compare with the value of last bar, but when i declare and set value to the E1ant1 var, the indicator dont run in my chart (no code errors)
double E1ant1=EMA(13)[1];
The error is here [1]. No problems If i write this:
double E1ant1=EMA(13)[0];
Could you help me please? Thanks.
Comment