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
Contra v6 buys when price stretches down into the band and sells when price stretches up, using touch, reversal or both triggers. Entries support pyramiding with configurable steps in points, percent or ATR and a max pyramid count. Targets, stop losses and trailing stops can be set in points or percent. Filters include opening range breakout, ADX strength and optional ATR or EMA conditions. It plots the Pivot SuperTrend, entry markers and other diagnostics in a separate pane below the price chart. Notable limits are that it uses fixed position sizing without automatic stop loss and can pyramid multiple times in the same direction.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Enable BUY (long fade)
bool
true
enLong
Enable SELL (short fade)
bool
true
enShort
Fire signal on
string
Both
trigMode
Qty per entry (first + each pyramid)
float
1.0
baseQty
Pivot point period
int
2
ppPrd
ATR factor
float
3.
ppFactor
ATR period
int
10
ppAtrLen
Use ORB filter
bool
true
useOrb
ORB length (first N candles of session)
int
3
orbBars
DI length
int
14
diLen
ADX smoothing
int
14
adxSm
Min ADX to enter
float
20
minAdx
Show all 27 settings
Setting
Type
Default
Variable
Use ATR filter
bool
false
useAtr
ATR length
int
14
atrLen
ATR must be greater than
float
10
atrThr
Use EMA filter
bool
true
useEma
EMA length
int
50
emaLen
Number of pyramids after first entry
int
2
numPyr
Pyramid step type
string
Points
pyrType
Pyramid step (in unit above)
float
20
pyrVal
Target type
string
Points
tgtMode
Target value
float
60
tgtVal
SL type
string
Points
slMode
SL value
float
40
slVal
Trailing type
string
Off
trlMode
Trailing distance
float
30
trlVal
Plot ATR (own scale)
bool
false
showAtrP
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.
Calculates a historical dip level based on the lowest low over a specified lookback period. It enters a long strategy position when the current bar close falls below the previous dip level. Positions are managed with take profit and stop loss exits placed at f
This strategy combines two sets of Bollinger Bands with a Laguerre RSI oscillator plotted on the price chart. It generates buy and sell signals when price touches the upper or lower bands or zones. The strategy allows enabling or disabling entries and includes
DP2 is a price-chart strategy that looks for a short dump between the chosen from and to prices, optionally requiring a break of a multi-day low while ignoring moves larger than a dump cap. It can enter through classic, two-close, break-and-retest, ATR-stop, a
This strategy implements a Quickfinger Luc mean-reversion trading model tailored for automated execution. It calculates base support levels and volume moving averages across timeframes to identify sharp price dips below established base levels. The script incl
This strategy plots Bollinger Bands directly on the price chart. It computes the middle band as the simple moving average of the close price over the input length and the upper and lower bands by multiplying the standard deviation by the multiplier and adding
The ES Professional Fade strategy trades overnight price gaps during regular trading hours on intraday charts. It establishes an opening range and enters counter-trend positions when price fails near overnight extremes. Positions target the previous day's clos