Skip to content
Algo Trade Analytics Docs

timeframe.main_period - Pine Script Variable

A string representation of the script’s main timeframe. If the script is an indicator that specifies a timeframe value in its declaration statement, this variable holds that value. Otherwise, its value represents the chart’s timeframe. Unlike timeframe.period, this variable’s value does not change when used in the expression argument of a request.*() function call.

string

simple