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.
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
- 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 would like to insert the screener function for "MACD histogram slope up/ slope down".
Basically I am quoting a MACD slope indicator script by tmyerskerr, as below:
I'm having a bit of an issue replacing the example functions with my own.
@Daveatt (or anyone else) would you be able to provide an example for a function with arguments?
i.e if my function is:
rsx(src, _length)
How would I change the "h1, l1" line (73) to return the rsx value for t1?
Thanks in advance!
Daveatt
⋅
@AtomOfScent, what is the result returned by rsx?
is that a kind of RSI?
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)
I would like to insert the screener function for "MACD histogram slope up/ slope down".
Basically I am quoting a MACD slope indicator script by tmyerskerr, as below:
//@version=3
study(title="Moving Average Convergence/Divergence Slope", shorttitle="MACD Slope", precision=8)
source = close
radians_to_degrees=180/3.14159265359
fastLength = input(12, minval=1), slowLength=input(26,minval=1)
signalLength=input(9,minval=1)
lookback_period=input(defval=5,title="Lookback periods",type=integer)
smoothing=input(defval=8,minval=2,title="Smoothing",type=integer)
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
macd = fastMA - slowMA
signal = ema(macd, signalLength)
histogram = macd - signal
macd_slope = radians_to_degrees*atan((macd[0]-nz(macd[lookback_period]))/lookback_period)
signal_slope = radians_to_degrees*atan((signal[0]-nz(signal[lookback_period]))/lookback_period)
histogram_slope = radians_to_degrees*atan((histogram[0]-nz(histogram[lookback_period]))/lookback_period)
plot(linreg(macd_slope, smoothing, 0), color=#FF0099, transp=0, title="MACD Slope")
plot(signal_slope, color=teal, transp=0, title="Signal Slope")
plot(linreg(histogram_slope, smoothing, 0), style=area, color=white, transp=95, title="Histogram Slope")
hline(0, color=white)
May I know how to insert into your script above?
Many Thanks in advance.