我想根据我们所处的时间范围设置一个变量
像这样:
a = 0
//if it was 5m time frame a=1
//if it was 15m time frame a=2
//if it was 45m time frame a=3
//if it was 60 time frame a=4
a = is5mTimePeriod ? 1 : is15mTimeperiod ? 2 : .............
我知道条件运算符,只想知道允许我获取时间框架的函数,而不是我上面写的假函数:is5mTimePeriod,is15mTimeperiod。