Skip to main content

Function: timeframe()

timeframe(tf, bars?): Htf

Declare a higher timeframe of the chart symbol ("15" "60" "240" "D", up to 1 day, "W" from Monday, "M" a calendar month). Call at module top level, at most 10 contexts per script. It must be an exact multiple of the chart timeframe (max 1500x), else every value is na (with a warning in the log). bars = how many HTF bars of history you need (drives warmup loading).

Parameters​

tf​

string

bars?​

i32 = 0

Returns​

Htf