I understand that request.security() is optimized for higher timeframe data calls and for lower the request.security_lower_tf(). However in the inputs section i want to show only one input.timeframe and code the strategy to toggle between higher and lower security calls by itself automatically.
longMTF_HT = request.security(syminfo.tickerid, inputTimeframe, longCondition[1], barmerge.gaps_off, barmerge.lookahead_on)
shortMTF_HT = request.security(syminfo.tickerid, inputTimeframe, shortCondition[1], barmerge.gaps_off, barmerge.lookahead_on)
longMTF_LT = request.security_lower_tf(syminfo.tickerid, inputTimeframe, longCondition)
shortMTF_LT = request.security_lower_tf(syminfo.tickerid, inputTimeframe, shortCondition)
longMTF = timeframe.period < inputTimeframe ? longMTF_HT : longMTF_LT
shortMTF = timeframe.period < inputTimeframe ? shortMTF_HT: shortMTF_LT
The above code returns the error:
line 39: Cannot call 'operator ?:' with argument 'expr2'='shortMTF_LT'. An argument of 'bool[]' type was used but a 'series bool' is expected
Looking for a solution