for multi time frame option in pine script:
==> Use this assignment in definition and it creates a time frame input option to do all the calculation from that time frame.
study("Test", resolution = "")
try this but i dont know if is much correctnot use frequently pine
//@version=5 indicator("My Indicator", overlay=true) TF1 = timeframe.period // Specifica il timeframe per TF1 TF2 = timeframe.period // Specifica il timeframe per TF2 var int LatBarTime = na if ta.timeframe.isseconds TF1 := timeframe.period * 60 if ta.timeframe.isminutes TF2 := timeframe.period * 60 if ta.timeframe.isdaily TF2 := timeframe.period * 60 * 24 if ta.timeframe.isweekly TF2 := timeframe.period * 60 * 24 * 7 if ta.timeframe.ismonthly TF2 := timeframe.period * 60 * 24 * 30 if ta.timeframe.isyearly TF2 := timeframe.period * 60 * 24 * 365 if ta.change(time) and ta.time(timeframe.period, "0") LatBarTime := time i = barssince(LatBarTime) Sig_A = ta.barssince(ta.time(timeframe.period, i)) plot(Sig_A)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code.
Hover your mouse over your post and select "edit" ...![]()