Get indicator timeframe by indicator_handle
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.
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,...);
Hi!
Is it possible to get the time frame of indicator using only indicator_handle?
Thanx!