New Alerts Allow for Dynamic Messages

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.
If 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 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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.