here it is
Period()
The_N:
Hello. I wonder how to get timeframe on which EA or indicator is executing?
Hello. I wonder how to get timeframe on which EA or indicator is executing?
Use this:
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 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
Hello. I wonder how to get timeframe on which EA or indicator is executing?