Hello! Try like this: I dont know if it is the same, but it should be.
double MA_1_Day_Ago = iMA(NULL,0,780,0,MODE_SMA,0,i+1);
01005379:
Hello! Try like this: I dont know if it is the same, but it should be.
Hello! Try like this: I dont know if it is the same, but it should be.
Hello 01005379
Thank you for suggestion,
I changed the coding with your suggestion, although there were some changes, I'm still not getting the correct data in the indicator window.
ima(Symbol(),PERIOD_D1,MA_period, MA_mode,MA_shift,MA_price,iBarsShift(Symbol,PERIOD_D1,Time[0],false));//z
Hello zzuegg
With your suggestion
I replaced the following coding,
double MA_1_Day_Ago = iMA(NULL,PERIOD_D1,13,0,MODE_SMA,0,(NULL,PERIOD_D1,Time[0],i+1));double MA_2_Day_Ago = iMA(NULL,PERIOD_D1,13,0,MODE_SMA,0,(NULL,PERIOD_D1,Time[0],i+2));
but was unable to compile the program, it giving a error of ('=' - no lvalue present) which I have no idea what it means.
Have I applied your suggestion correctly?
try this...
double MA_1_Day_Ago = iMA(NULL,PERIOD_D1,13,0,MODE_SMA,0,iBarsShift(NULL,PERIOD_D1,Time[i],false)+1); double MA_2_Day_Ago = iMA(NULL,PERIOD_D1,13,0,MODE_SMA,0,iBarsShift(NULL,PERIOD_D1,Time[i],false)+2);
zzuegg:
try this...
Hello zzuegg
Thank you, it now works
I made one amendment, that being, I changed (iBarsShift) to (iBarShift).
Thank you again.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello all
I am trying to show the daily 13MA direction on a 1 Hour timeframe chart in a separate window using the coding as below.
I am see the that the coding is not finding the correct daily MA value on the correct time.
Can anyone help with this problem?