I want to create an indicator that depends on the period (M1, M5, M15, etc.). Is there a way to find out the current period? The reason is because I want to display something unique to each Timeframe and in order to do so I need to know what the current TF is. I was hoping for something simple so I can just do a simple if() statement.
If(period == "PERIOD_M1"){
//stuff here
}
If(period == "PERIOD_M5"){
//different stuff here
}
Thanks
EDIT: Solved - Period()
If(period == "PERIOD_M1"){
//stuff here
}
If(period == "PERIOD_M5"){
//different stuff here
}
Thanks
EDIT: Solved - Period()