You're keeping back the fact that the EA is run on M1 too. Why?
Apparently there is no other timeframe data available for your EA unless you're messing with the indicator properties.
Apparently there is no other timeframe data available for your EA unless you're messing with the indicator properties.
Thank you for an answer.
Should not be data retreived from the server, and MA recalculated?
How to calculate an indicator wthin EA for specified timeframe?
Example: A function
iMA( string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift)
returns a reasonable value for timeframe= 0 or timeframe=OBJ_PERIOD_M1,
but always returns 0 when timeframe=OBJ_PERIOD_M5, M15 etc
Thanks
Should not be data retreived from the server, and MA recalculated?
How to calculate an indicator wthin EA for specified timeframe?
Example: A function
iMA( string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift)
returns a reasonable value for timeframe= 0 or timeframe=OBJ_PERIOD_M1,
but always returns 0 when timeframe=OBJ_PERIOD_M5, M15 etc
Thanks
Again,
Indicator function returns 0 if there is no data available for the chosen symbol and timeframe.
It should perhaps, but there are some restrictions too, symbol is not in the symbol list for example. Although I can't remember exactly, sorry.
To make sure the data you're building the indicator on is available and accessible.
Look for it in the history center (F2) or just open a chart with that symbol and timeframe to see if there are needed bars in it.
Indicator function returns 0 if there is no data available for the chosen symbol and timeframe.
Should not be data retreived from the server, and MA recalculated?
It should perhaps, but there are some restrictions too, symbol is not in the symbol list for example. Although I can't remember exactly, sorry.
How to calculate an indicator wthin EA for specified timeframe?
To make sure the data you're building the indicator on is available and accessible.
Look for it in the history center (F2) or just open a chart with that symbol and timeframe to see if there are needed bars in it.
Please do not mix constants OBJ_PERIOD_M1 and PERIOD_M1!!!
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
Actually I try iMACD() and iMA() functions, but seems other indicators behavior the same.
Something that I missing?
Thanks