Can i call the period in the program?

 

Hi everyone, 

Thanks in advance for you help. I have 2 questions

1. I was wondering if I could write something like :

 if Period_CURRENT = PERIOD_H1

{...

}

 if Period_CURRENT = PERIOD_H2

{...

}

2. I have an additional question: the PERIOD_M40 do not exist right?

Thanks again,

Luciole

 
if(_Period == PERIOD_H1)
{
   ...  
}
 

Thank you so much !!


have a great day!

:) :) :)

 
what about the PERIOD_M40, any suggestions?
 
Luciole: what about the PERIOD_M40, any suggestions?
There is no M40 Timeframe (Period) in MetaTrader v4!
 
Thanks for your answer
Reason: