Quote:
|
Originally Posted by The_N
Hello. I wonder how to get timeframe on which EA or indicator is executing?
|
Use this:
Code:
string tf()
{
switch(Period())
{
case PERIOD_M1: return("M(1)");
case PERIOD_M5: return("M(5)");
case PERIOD_M15: return("M(15)");
case PERIOD_M30: return("M(30)");
case PERIOD_H1: return("H(1)");
case PERIOD_H4: return("H(4)");
case PERIOD_D1: return("D(1)");
case PERIOD_W1: return("W(1)");
case PERIOD_MN1: return("MN(1)");
default:return("Unknown timeframe");
}
}
__________________
You need proffesional mql coder?
Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................