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
Market Structure + OTE reads a 1-hour EMA stack for bias, waits for a close through the latest confirmed swing to mark a market structure shift, then draws the 0.62 to 0.79 Fibonacci optimal trade entry zone of that leg. A signal plots entry, stop, break-even and two target levels with a dot whose tooltip lists the checklist. Optional filters cover fair value gaps, order blocks, sweeps, killzones and ADX.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
REQUIRE HTF trend alignment
bool
true
reqTrend
Trend timeframe
timeframe
60
htfRes
Fast EMA
int
50
emaFastLen
Slow EMA
int
100
emaSlowLen
Swing pivot strength (bars each side)
int
4
piv
Pullback must arrive within N bars of the MSS
int
15
maxWait
OTE entry level
float
0.79
oteFib
Draw the OTE zone (0.62-0.79)
bool
true
showZone
ATR length
int
14
atrLen
Stop buffer beyond leg origin (ATR x)
float
0.15
stopBuf
Filter out setups below a minimum R:R
bool
true
useMinRR
Minimum R:R
float
2.0
minRR
Show all 40 settings
Setting
Type
Default
Variable
TP2 (final) mode
string
Fixed R:R
tp2Mode
TP2 fixed R:R (Fixed mode)
float
2.5
targetRR
Opposing-liquidity lookback (Liquidity mode)
int
40
targetLook
TP1 R:R (first partial)
float
1.0
tp1RR
Move stop to break-even after TP1
bool
true
moveBE
Detect FVG / Order Block inside the OTE zone
bool
true
usePD
REQUIRE an FVG or OB in the OTE zone (top-tier only)
bool
false
reqPD
R:R premium for a confluence (tooltip info)
float
3.0
rrPremium
Fresh-pullback window (bars, tooltip info)
int
8
freshBars
Mark a liquidity sweep at the leg origin
bool
false
useSweep
...and REQUIRE it (not recommended)
bool
false
reqSweep
Sweep swing lookback (bars)
int
20
sweepLook
REQUIRE London/NY killzone
bool
false
reqSess
London killzone
session
0200-0500
londonSess
New York killzone
session
0700-1000
nySess
Session timezone
string
America/New_York
sessTz
REQUIRE no-chop (ADX)
bool
false
reqChop
ADX length
int
14
adxLen
ADX smoothing
int
14
adxSmooth
Minimum ADX (not choppy)
float
20
adxMin
Account ($)
float
50000
acct
Risk per trade (%)
float
1.0
riskPct
$ per point (MNQ=2, NQ=20, MES=5, ES=50)
float
2.0
pointVal
Signal dot (green=buy, red=sell)
bool
true
showDot
Grade label (A / A+)
bool
true
showGrade
Entry/Stop/BE/TP1/TP2 lines (latest signal)
bool
true
showLines
Mark the MSS break
bool
true
showStruct
Info panel
bool
true
showPanel
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 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 Pine Script indicator plots a ZigZag on the price chart. It identifies reversal points when price moves more than a set percentage from the last pivot. The script calculates forecasts using zigzag data and labels detected geometric patterns including harm
This indicator plots market structure on the price chart by identifying swing highs and lows. It connects these points with lines to visualize trend direction and detect Break of Structure (BOS) when price breaks a prior swing in the current trend. Change of C
This indicator implements the Fractal Model concept to plot market structure shifts, liquidity sweeps, and Change in State of Delivery (CISD) levels. It overlays custom higher-timeframe candle previews, open prices, and time markers directly on the price chart
BigBeluga Smart Money Concepts identifies and overlays market structure and volumetric order blocks directly on the price chart. It analyzes market swings, trend sweeps, and mapping structure using customizable pivot lengths and calculation modes. The indicato
Apex Trend & Liquidity Master calculates a trend cloud using customizable moving averages expanded by a volatility multiplier directly on the main price chart. It identifies dynamic support and resistance liquidity zones from swing high and low pivots, extendi