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
KC Integration plots upper, middle, and lower channel bands directly on the main price chart to identify potential breakout and mean-reversion setups. Position management and risk controls are governed by customizable profit-to-loss ratios, maximum loss percentage rules, and break-even profit protection thresholds.
Dual Keltner Channel calculations for trend and counter-trend modes
Configurable risk-reward ratios and maximum loss percentage settings
Break-even and profit protection threshold rules
On-chart overlay of upper, middle, and lower Keltner Channel bands
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
開始時間
time
timestamp("1 Jan 2022 00:00 +0800")
startTime
結束時間
time
timestamp("1 Jan 2024 00:00 +0800")
endTime
順勢 KC天數
int
310
kc_length_same
順勢盈虧比
float
2.0
P_L_ratio_same
逆勢 KC天數
int
170
kc_length_convert
逆勢盈虧比
float
1.0
P_L_ratio_convert
KC1順勢乘數
float
1.0
mult1_same
KC2順勢乘數
float
1.5
mult2_same
KC1逆勢乘數
float
1.5
mult1_convert
KC2逆勢乘數
float
3.5
mult2_convert
開啟套保門檻(%)
int
5
trail_threshold
開啟套開倉門檻(%)
int
2
tao_kai_cang
Show all 13 settings
Setting
Type
Default
Variable
單筆最大虧損率(%)
float
10.0
max_loss_rate
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 standard Bollinger Bands and identifies band expansion breakouts where upper and lower bands move in opposite directions. It enters long positions when price breaks above the upper band with a high candle body percentage, and enters short positions
This strategy executes pullback trades based on internally computed Bollinger Bands and candle price action directly on the main price chart. It tracks breakout and pullback states to trigger long and short entries. Users can select among three distinct take p
This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a
This strategy fades opening gaps on ES during the New York regular session and draws on the price chart. It checks the gap against a minimum percentage, a minimum point size, and an optional ATR multiple, then uses a five-, fifteen-, or thirty-minute opening r
A strategy that first classifies the market using ADX and a Bollinger-inside-Keltner squeeze check, then switches between two sub-strategies. In ranging conditions it fades asymmetric Bollinger Band extremes with a 200 EMA trend filter. In trending conditions
The strategy detects range expansion by comparing the previous bar's range to its ATR multiple. It places pending stop entries above highs of up bars or below lows of down bars. On trigger it enters positions with take profit and stop loss in ticks using OCA g