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
A static channel is kept alongside a live one that starts after price closes outside the channel and locks when its correlation falls below a threshold. When enabled, trades use a fixed stop loss and take profit measured in points with one contract per trade. Deviation width, breakout bars and regression mode are adjustable.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Start Time
time
timestamp("2024-01-01 00:00")
startTime
End Time
time
timestamp("2024-12-31 23:59")
endTime
Ignore Wicks
bool
false
ignoreWicks
Price Source
source
close
priceSource
Regression Mode
string
Both
regressionMode
Upper Deviation
bool
true
showUpperChannel
upperDeviation
float
3.0
upperDeviation
Lower Deviation
bool
true
showLowerChannel
lowerDeviation
float
3.0
lowerDeviation
Breakout Confirmation Bars
int
1
breakoutConfirmation
Lock R Threshold
float
0.85
lockRThreshold
Min Bars Before Lock
int
5
minBarsBeforeLock
Show all 22 settings
Setting
Type
Default
Variable
Max Bars Timeout
int
50
maxBarsTimeout
Enable Strategy
bool
true
enableStrategy
Stop Loss (Points)
float
10.0
stopLossPoints
Take Profit (Points)
float
20.0
takeProfitPoints
Uptrend Color
color
#26a69a
uptrendColor
Downtrend Color
color
#ef5350
downtrendColor
Fill Transparency
int
93
fillTransparency
Line Width
int
2
lineWidth
Show Statistics Table
bool
false
showStatsTable
Table Position
string
Top Right
tablePosition
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 divides a fixed price range between an upper and a lower limit into equally spaced grid levels and plots them on the price chart. It marks a buy when price crosses down through a grid and a sell when price crosses up through a grid, using either
The Chained Linear Regression Reversal Strategy plots linear regression channels with upper and lower standard deviation bands directly on the price chart across a user-defined time window. When price breaks out of the static channel for a confirmed number of
3C QFL Mean Reversal is a strategy based on the Quickfinger Luc (QFL) trading methodology. It identifies breakdown buying opportunities below established price base levels and enters mean-reversion trades. The strategy includes multi-safety order DCA scaling,
This strategy builds a spot grid between user-set high and low prices and draws it on the price chart. It splits that range into ten levels and places up to five long limit orders at the lower levels, sizing each from current equity. Orders already below price
Calculates the distance between the current price and the opposite end of the latest fair value gap, entering trades on the expectation that price will partially fill the gap. It incorporates risk management with customizable stop loss, take profit based on ri
This strategy identifies Wyckoff consolidation ranges directly on the price chart to trade potential spring and upthrust events. It calculates highest highs and lowest lows over a customizable lookback period, filtering setups by average volume spikes and ATR