you can change or add new symbol in input section.
in my code i have made defined and printed last close price when downtrend was true.
1. downtrend = (close,55)< (close,144) and (close,144)< (close,388) and (close,388)<ema(close,576) and close<ema(close,388)
if the indicator is printing DOWNTREND=TRUE or UPTREND=TRUE then the corresponding stock is in currently in that trend out of the stocks listed in the code
in one code only 40 (max) stocks can be called.
to add more stocks I copied same code and changed the stocks in the code, now you can screen 80 stocks at a time.
This code runs on each bar and checks if the stocks is in uptrend or down trend.
you can customize this screener according to your requirement.
after trading View announced alert() function , now it is possible to set alert for all this screener. Once you set up alert , you will be informed of the new symbol coming in the screener.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
Why is there a restriction to 40/80 positions?
By aim is to develop a screener for stock exchanges (selected by user input) based on the RSL (relative strength index from Levy/available as pine script).
As a result a table with 2 columns (share_name and rsl-value), sorted by rsl value, should be listed.
Tanks for any ideas and tips.
The restriction is because of maximum number of security functions and variable limit exceeds if i use more than 40 symbols.
to coustomize according to your requirement you can make changes in function "screenerFunc() " in the code.