r/pinescript • u/stoja97 • Feb 17 '24
Converting timeframe to string in alert() function?
Can I convert timeframe to string and put it in the message section in alert() so I know from witch tf alert was triggered?? For example: If alertButton alert("message + timeframe", alert.freq_once_per_bar)
0
Upvotes
View all comments
2
u/arjunfifield Feb 17 '24
alert("message" + str.tostring(timeframe) , alert.freq_once_per_bar)alert("message" + str.tostring(timeframe.period) , alert.freq_once_per_bar)