how,
i m trying to code EMA 14 to show in ATR 14 chart window
i can do it in terminal by selecting moving leverage "Previous indicator DATA"
but how can i code it for my EA
i got this code but showing some error
i m trying to code EMA 14 to show in ATR 14 chart window
i can do it in terminal by selecting moving leverage "Previous indicator DATA"
but how can i code it for my EA
Inserted Code
#define EMAperiodATR 14
int start(){
static datetime Time0; bool newBar = Time0 < Time[0];
if (newBar){ Time0 = Time[0];
double EMAalphaATR = 2.0/(EMAperiodATR+1),
ATR = iATR(NULL, 0, ATR.Period, 1);
static double EMA.ATR;
EMA.ATR += (ATR - EMA.ATR) * EMAalphaATR;
} i got this code but showing some error