OPEN-SOURCE SCRIPT
已更新 New Alerts Allow for Dynamic Messages

tradingview.com/blog/en/our-new-alerts-allow-for-dynamic-messages-22588/
Following the last example from the link above, I added a function return to plot the calculated RSI value for each ticker.
For this, I added the expression of the rsi bult-in function in the security call, to send as a return to the plot function.
Ps. I purposely inverted the crossunder/crossover calls for testing here.
Following the last example from the link above, I added a function return to plot the calculated RSI value for each ticker.
For this, I added the expression of the rsi bult-in function in the security call, to send as a return to the plot function.
Ps. I purposely inverted the crossunder/crossover calls for testing here.
發行說明
As I commented in line 6, 66, 68, 74 ad 92If we could call security using series[string], we could set a string array with the choosed symbols as the line belows..
then
Then we could make a loop using a for procedure to set some other arrays, as the e.g. below
I tried to convert tostring the ticker array, before calling the function securitybut it was not possible too
It would save a lot of code lines
It would sabe 15 lines in this example code
發行說明
I've noticed that the sma croosunder/over was getting the wrong data.I've just corrected it and did some updates, described below:
Inserted the inputs to allow the user choose the source and the length of each indicator.
Checkbox to activate or deactivate the indicator allert.
Added the variable to get the price source from mom securtiy function to plot the value in the allert correctly.
The comments about the seies[string] in security is just to show how would let easier to code if it was possible to use.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。