Pivot Trendlines with Divergence Scanner Strategy filters signals with three configurable moving averages, Stochastic RSI, a higher-timeframe Stochastic RSI, and optional RSI divergence. A session window can restrict trading, and a toggle controls whether every signal is taken. Exits use ATR multiples for the target and stop, with an optional close at the end of the session. Higher-timeframe data is read with lookahead enabled.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Session Times
bool
true
use_sess_time
sess_time
session
0700-2100
sess_time
Exit at End Of Session
bool
false
exit_at_eos
Take Every Signal
bool
true
take_every_signal
Target ATR
float
2.25
tgt_atr
Stop ATR
float
3.00
stop_atr
MA 1
int
8
ma1_length
ma1_type
string
EMA
ma1_type
MA 2
int
14
ma2_length
ma2_type
string
EMA
ma2_type
MA 3
int
50
ma3_length
ma3_type
string
EMA
ma3_type
Show all 31 settings
Setting
Type
Default
Variable
K
int
3
smoothK
D
int
3
smoothD
RSI Length
int
14
lengthRSI
Stochastic Length
int
14
lengthStoch
RSI Source
source
close
src
Stoch Buy Below
int
75
stoch_buy
Stoch Sell Above
int
25
stoch_sell
Timeframe
timeframe
240
mtf_stoch_tf
K
int
3
mtf_smoothK
D
int
3
mtf_smoothD
RSI Length
int
14
mtf_lengthRSI
Stochastic Length
int
14
mtf_lengthStoch
RSI Source
source
close
mtf_src
RSI Length
int
14
rsiLengthInput
RSI Source
source
close
rsiSourceInput
RSI Buy Below
int
70
rsi_buy_lvl
RSI Sell Above
int
30
rsi_sell_lvl
Use RSI Divergence In Signals
bool
true
use_rsi_div
RSI Divergence Length
int
5
rsi_div_length
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This strategy executes long positions by combining a 200-period EMA trend filter, Stochastic RSI oversold crosses, and Williams Alligator retracements, supplemented by RSI divergence detection. It triggers long entries when the price trades above the 200 EMA w
This strategy plots a range filter and high and low target bands on the price chart, and colors bars from filter direction. Inputs cover a backtest date window, WaveTrend Cipher B channel and average lengths, overbought and oversold levels, divergence threshol
The TQQQ MA+TSI strategy executes trades based on triple simple moving average alignment combined with True Strength Index (TSI) divergence or momentum filters. Designed primarily for intraday stock trading, it evaluates price accumulation across fast, mid, an
The strategy calculates the Stochastic oscillator using specified K and D periods, then detects bullish and bearish divergences between price pivots and the D line. Bullish signals occur when price forms lower lows while Stochastic forms higher lows within the
MACD + Divergences [Alorse] is a momentum strategy that calculates the MACD oscillator and identifies regular and hidden divergences using pivot high and low points. It filters trade signals with dual Exponential Moving Averages (EMA 150 and 600) to ensure tra
A trading strategy that uses an RSI state machine tracking 50-level crossovers, pullbacks, and hidden divergences. Entries require confirmation from optional confluence filters, including an EMA touch, Fibonacci retracement zones, and Ichimoku cloud conditions