With the Ultimate Strategy Template, I shared a template to connect any indicator to this template and get backtesting results in less than a few minutes
Now sharing another template ... many traders ask me to develop for them a screener/scanner based on a custom indicator on TradingView.
The current TradingView screeners are great but don't allow for much customization; as we can only select pre-defined filters
I don't know when we'll be able to natively screen among hundreds of assets with a custom indicator... then.... I created this template for the time being.... which should
A whole new world
The Ultimate Screener Template screens over 38 securities.
What's very cool is that you'll only need to create 1 alert to scan over 38 securities: Explanation with this image here
I totally understand that not all TradingView accounts have a lot of alarms; with this template, you can multiply the number of custom alerts you're initially allowed to.
What if I need to set alerts on more than 38 securities?
Pretty straightforward... you can create alerts only if the indicator is added to your chart first.
So if you need let's say 100 securities, add this indicator 3 times on your chart (38*3 > 100) and then... edit the securities for your 3 indicators
How to update your Screener settings
As per Pinescript reference, this template allows setting the alert frequency
Possible values are:
- alert.freq_all (all function calls trigger the alert)
- alert.freq_once_per_bar (the first function call during the bar triggers the alert)
- alert.freq_once_per_bar_close (the function call triggers the alert only when it occurs during the last script iteration of the real-time bar when it closes).
All-time-high and All-time-low
This template shows how to capture ATH and ATL alerts across many securities
I used the functions from Quantnomad:
Whenever a new ATH or ATL is made, the screener will send a personalized alarm with a personalized text based on the security triggering this alarm
The code is pretty straightforward and shows you the part you'll need to update to transform your favorite custom indicator into a powerful screener.
If anything is unclear in the code, please leave a comment and I'll respond as soon as possible
All the best
@Daveatt (or anyone else) would you be able to provide an example for a function with arguments?
i.e if my function is:
How would I change the "h1, l1" line (73) to return the rsx value for t1?
Thanks in advance!
is that a kind of RSI?
Perhaps the security values need to be assigned to variables first, then calling the function using those?
my_rsx = rsx(close, len) // assuming you want the security of the same period than the chart rsx1 = security(t1, timeframe.period, my_rsx) rsx2 = security(t2, timeframe.period, my_rsx) ... rsx38 = security(t38, timeframe.period, my_rsx)
See the line number 64 and 65
Not having custom indicator support makes the screener 1/10th as useful for me.
FYI, if anyone wants to upvote this as a feature request on the Tradingview Reddit, here's the link. ;)
This idea but for 40 assets.