Difference between iMA valu and moving avergage on chart

 

Hi

i have a problem . i calculate iMA for a chart and simultaneously i check that value with moving average indicaator on chart. but they have different value. why ?

 

Why
not edit the standard script
Why write your own
Why do you expect the same value.
There are a lot of why to your question.
//-------
Happy 2019
 
i want change any things i saw on chart to a expert . so different value is my problem. i used icustome function . the value was different too.
 
Show the code.
 

   ma_value_h4=iMA(NULL,PERIOD_H4,100,0,MODE_SMMA,PRICE_CLOSE,0);
   ma_value_d =iMA(NULL,PERIOD_D1,100,0,MODE_SMMA,PRICE_CLOSE,0);
   ma_value_w =iMA(NULL,PERIOD_W1,100,0,MODE_SMMA,PRICE_CLOSE,0);


this is my code value is different with value on chart please advise!!!!!!!!!!

Reason: