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
Minervini VCP + SmartMCDX US enters on pattern completion when required conditions such as full TPR or VCP squeeze are met and exits via partial profit targets at 5% and 10%, ATR-based stops, breakeven moves, and optional trailing stops. Settings control entry requirements, volume multipliers, buffer percentages, and risk parameters like stop loss and position sizing. It draws trend lines, base patterns, and signals directly on the price chart for US equity trading.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Require Full TPR (7/7) for Entry
bool
true
req_tpr
Require VCP Squeeze for Entry
bool
false
req_vcp
Require Volume Surge on Breakout
bool
true
req_vol_surge
Volume Surge Multiplier
float
1.5
vol_mult
Breakout Buffer % Above Line
float
0.3
bo_buffer_pct
Use ATR-Based Stop Loss
bool
true
use_atr_stop
ATR Stop Multiplier
float
2.0
atr_sl_mult
Fallback Hard Stop Loss %
float
4.5
sl_pct
Take Partial Profit (Sell 50% at TP1)
bool
true
use_partial_tp
TP1 Target %
float
5.0
partial_tp_pct
Runner Limit at TP2
bool
true
use_partial_tp2
TP2 Target %
float
10.0
partial_tp2_pct
Show all 40 settings
Setting
Type
Default
Variable
Move Stop to Break-Even
bool
true
use_breakeven
Break-Even Trigger %
float
4.0
be_trigger_pct
Use 21-EMA Trailing Stop for Runner
bool
true
use_trail
Activate Trail After % Profit
float
3.0
trail_activation
Min Base Duration (Bars)
int
15
min_base_bars
Require Min VCP Contractions
bool
true
req_contractions
Min Contractions in Base
int
2
min_contractions
Min Stock Price ($)
float
5.0
min_price_usd
Min Avg Daily Volume (shares)
int
500000
min_avg_vol
Require Banker for Entry
bool
false
use_mcdx_entry
Min Banker % for Entry
float
0.0
mcdx_entry_val
Smart Exit: Sell if Banker Drops
bool
false
use_mcdx_exit
Exit Danger Threshold %
float
0.0
mcdx_exit_val
Require Bull Market (SPY > 200 SMA)
bool
true
use_mkt_regime
Require Stock Outperforms SPY
bool
true
use_rs_filter
RS Lookback Period (Bars)
int
63
rs_period
Benchmark Symbol (S&P 500 ETF)
symbol
AMEX:SPY
bm_sym
21 EMA Length
int
21
len_ema21
50 SMA Length
int
50
len_sma50
150 SMA Length
int
150
len_sma150
200 SMA Length
int
200
len_sma200
21 EMA Color
color
color.new(color.yellow, 50)
c_ema21
50 SMA Color
color
color.blue
c_sma50
150 SMA Color
color
color.orange
c_sma150
200 SMA Color
color
color.red
c_sma200
Table Position
string
Top Left
table_pos_input
Table Size
string
Small
table_size_input
Dashboard: TPR Condition Breakdown (C1-C7)
bool
false
show_tpr_detail
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 identifies breakout momentum by combining Bollinger Bands and Keltner Channels with volume confirmation. It opens long positions when the upper Keltner Channel crosses above the upper Bollinger Band and volume exceeds its moving average. Converse
This overlay strategy looks for gold scalps from break of structure and change of character. It enters long when a bullish break, a bullish character change, and an optional volume filter align, and short on the opposite set. Optional RSI levels can block trad
This strategy overlays Bollinger Bands on the price chart and trades a long squeeze setup. It enters long when band width is below 0.022 and volume is at least the seven-bar average, using a stop order at the lower band. It places a short order when close cros
BB Squeeze Breakout is a volatility breakout strategy that identifies consolidation squeezes using Bollinger Band width percentile ranking. When the band width drops below its 25th percentile and price crosses above or below the bands with optional volume conf
This strategy backtests opening-range breakouts on the price chart for New York, London, Asia, or a custom session. Simple mode follows the opening-range direction when relative volume is high enough. ICT mode can require a fair value gap, displacement, and an
This strategy detects Bollinger Band squeezes by measuring band width against a threshold. It waits for a confirmed breakout in either direction when bands expand, using optional volume confirmation. Long and short signals trigger on breakout after squeeze. Po