1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Inputs cover a backtest date window, WaveTrend Cipher B channel and average lengths, overbought and oversold levels, divergence thresholds, money-flow settings, and an optional exponential moving average. The visible code begins long and short conditions from the filter but does not show exit rules. Position size defaults to full equity and no stop loss is defined.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
FromMonth
int
1
FromMonth
FromDay
int
1
FromDay
FromYear
int
2020
FromYear
ToMonth
int
1
ToMonth
ToDay
int
1
ToDay
ToYear
int
9999
ToYear
Source
source
close
src
Sampling Period
int
9
per
Range Multiplier
float
1.9
mult1
EMA Timeframe
timeframe
5
res5
EMA1 Length
int
100
len5
Enable EMA?
bool
true
enableema
Show all 40 settings
Setting
Type
Default
Variable
WT Channel Length
int
9
wtChannelLen
WT Average Length
int
12
wtAverageLen
WT MA Source
source
hlc3
wtMASource
WT MA Length
int
3
wtMALen
WT Overbought Level 1
int
53
obLevel
WT Overbought Level 2
int
60
obLevel2
WT Overbought Level 3
int
100
obLevel3
WT Oversold Level 1
int
-53
osLevel
WT Oversold Level 2
int
-60
osLevel2
WT Oversold Level 3
int
-75
osLevel3
Not apply OB/OS Limits on Hidden Divergences
bool
true
showHiddenDiv_nl
WT Bearish Divergence min
int
45
wtDivOBLevel
WT Bullish Divergence min
int
-65
wtDivOSLevel
WT 2nd Bearish Divergence
int
15
wtDivOBLevel_add
WT 2nd Bullish Divergence 15 min
int
-40
wtDivOSLevel_add
MFI Period
int
60
rsiMFIperiod
MFI Area multiplier
float
150
rsiMFIMultiplier
MFI Area Y Pos
float
2.5
rsiMFIPosY
RSI Source
source
close
rsiSRC
RSI Length
int
14
rsiLen
RSI Oversold
int
30
rsiOversold
RSI Overbought
int
60
rsiOverbought
RSI Bearish Divergence min
int
60
rsiDivOBLevel
RSI Bullish Divergence min
int
30
rsiDivOSLevel
Use Log?
bool
true
stochUseLog
Use Average of both K & D
bool
false
stochAvg
Stochastic RSI Source
source
close
stochSRC
Stochastic RSI Length
int
14
stochLen
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 draws on the price chart and manages long and short entries around pivot trendlines. It filters signals with three configurable moving averages, Stochastic RSI, a higher-timeframe Stochastic RSI, and optional RSI divergence. A session window can
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