Forum

Moving average EA

I want to write an EA code to generate a 20 EMA and take another 3 SMA am focusing on the first 5 candle to creater my Array but I keep on getting a array out of range please help. thank you in advance. void OnTick() { double ExtMapBuffer1[]; double ExtMapBuffer2[]; //int bar, limit; //int