Need help writing a custom indicator

 
I wrote a custom indicator that draw a line using moving average. So far, it drew a line. However, I have a scale that use a timeframe as a switch to select two scaling parameters. How do I get timeframe from the current chart so I can select the proper scaling parameter. I am not concern about the moving average because I can use "o."


Another question, if I want to call this custom indicator from my "expert". I will have to add the formal agrgument on the declaration. Is it possible to call a custom indicator from the "expert."

Thanks
 
black_building:
How do I get timeframe from the current chart so I can select the proper scaling parameter.
int Period( )

Is it possible to call a custom indicator from the "expert."
double iCustom( string symbol, int timeframe, string name, ..., int mode, int shift)
 
Irtron:
black_building wrote:
How do I get timeframe from the current chart so I can select the proper scaling parameter.
int Period( )

Is it possible to call a custom indicator from the "expert."
double iCustom( string symbol, int timeframe, string name, ..., int mode, int shift)

Thank Irtron.
Reason: