VincentX:
Hi!
Is it possible to get the time frame of indicator using only indicator_handle?
Thanx!
I don't understand why you need to get the time frame from indicator handle, maybe you can do this:
ENUM_TIMEFRAMES indicator_period = PERIOD_M5; int MAHandle=iMA(_Symbol,indicator_period,5,0,MODE_EMA,PRICE_HIGH);
and if you need to get the time frame then you just call variable indicator_period.
biantoro:
I don't understand why you need to get the time frame from indicator handle, maybe you can do this:
I want to use the value of indicator_period in an external predefined function. This function has only indicator_handle input parameter like CopyBuffer.
// Lib.mqh #property library int MyCopyBuffer(int indicator_handle,...) export { ENUM_TIMEFRAMES indicator_period = ???(indicator_handle); }
// Indicator.mq5 #import "Lib.ex5" int MyCopyBuffer(int indicator_handle,...); #import int MAHandle=iMA(_Symbol,PERIOD_M5,5,0,MODE_EMA,PRICE_HIGH); MyCopyBuffer(MAHandle,...);

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
Hi!
Is it possible to get the time frame of indicator using only indicator_handle?
Thanx!