Darth_Analyst
Darth_Analyst

Reputation: 13

Pinescript ATR of Different Timeframe

Is there a way to calculate ATR on a different timeframe than the current chart? For example, I am looking at a 15 minute chart, and I want to see the ATR of the 1 hour chart.

Upvotes: 0

Views: 1038

Answers (1)

bbnm
bbnm

Reputation: 1094

atr14 = atr(14)
atr1hour = security(syminfo.tickerid, "60", atr14)

Upvotes: 2

Related Questions