21 day moving average on 15min chart,possible or not???

 

21 day moving average on 15min chart,possible or not???

 

when i open 15Min chart i want 21Day moving average, actually when i put 21 Day MA on 15Min chart i have moving average of the last 21 bars of 15Min  

 
itriad:

21 day moving average on 15min chart,possible or not???

 

when i open 15Min chart i want 21Day moving average, actually when i put 21 Day MA on 15Min chart i have moving average of the last 21 bars of 15Min  


why not ??

It is

double SMA21Daily = iMA(Symbol(),PERIOD_D1,21,0,MODE_SMA,PRICE_CLOSE,0);
Comment("21Day SMA = ",DoubleToStr(SMA21Daily,Digits));
 
itriad: when i open 15Min chart i want 21Day moving average, actually when i put 21 Day MA on 15Min chart i have moving average of the last 21 bars of 15Min  
The standard (Mt4) moving average doesn't have a time frame parameter.
  1. You'll have to find a multi-timeframe MA indicator (MTF) in the code base.
  2. Or you could use a 21 * 24 * 4 = 2016 moving average on the M15 (How close depends on the type and price action.)
  3. Or you can have a 21 Day moving average like deVries posted, when you code your own. (This forum is about MetaQuotes Language 4 and auto trading.)

 
thanks
 
I just dropped by to say I hate unpolite messages. Try saying hello and thanks once in a while. It works like a charm.