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 indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
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
Black Box Continuation [Risk Filtered] uses a state-machine model to detect price fakeouts beyond structural pivots, looking for pullbacks and subsequent secondary re-crossings. Setups are filtered using an exponential moving average for macro trend alignment, an ATR multiplier for minimum sweep depth, and a maximum risk point limit. The indicator plots trend lines, state tracking visuals, and rejected setups directly on the price chart.
Structural pivot high and low detection
State machine tracking for fakeouts and re-entry points
ATR-based bait depth filter for volatility validation
Macro trend alignment filter via exponential moving average
Maximum risk distance threshold to filter wide stop loss setups
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Pivot Left Bars
int
15
leftBars
Pivot Right Bars
int
15
rightBars
Max Bars for Fakeout
int
4
maxFakeoutBars
Max Bars to Wait for 2nd Crossing
int
8
maxWaitBars
Require Minimum Bait Depth
bool
true
useAtrBait
Bait Depth (ATR Multiplier)
float
0.4
atrBaitMult
Require Macro Trend Alignment (EMA)
bool
true
useEmaFilter
EMA Length
int
200
emaLength
ATR Length
int
14
atrLength
ATR Stop Padding (Multiplier)
float
0.5
atrStopPadding
Max Stop Loss Distance (Points)
float
20.0
maxRiskPoints
Show Rejected Setups on Chart
bool
true
showRejected
Show all 14 settings
Setting
Type
Default
Variable
Black Box Color
color
color.new(color.gray, 70)
blkBoxCol
Show Tracked Levels
bool
true
showLines
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 indicator detects market accumulation phases and bottom formations over time rather than generating single-point buy signals. It evaluates five scoring components: trend loss, range formation, volatility compression, liquidity behavior, and early bullish
Imagegpt Test 1 is a comprehensive chart overlay indicator that plots buy, sell, and reversal signals along with supply and demand zones. It calculates key levels using volume pivots and features integrated Bollinger Bands alongside entry, exit, stop-loss, and
Market Dominance + Liquidity Sweep + OB is an overlay indicator that identifies Smart Money Concepts market structure elements directly on the price chart. It detects market dominance shifts, order blocks, order block touches, and liquidity sweeps based on con
A SuperTrend-style indicator built on ATR and RMA bands that prints buy and sell signals when the direction flips, optionally filtered by a 9 and 21 EMA cross. It draws two ATR-based take profit levels, background colour and a stats table that scores past sign
This indicator detects equal highs and lows by comparing prices within user-defined left and right bars using a tolerance percentage. It plots horizontal lines on the price chart for equal highs in one color and lows in another. A screener allows input of mult
This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high