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
Lucid 100K — Prop Bot Optimizer Harness (MES 5m) generates long and short signals through trend-pullback or mean-reversion logic, filtered across multiple timeframes and trading sessions. Risk controls include ATR-based stop losses, profit targets, optional trailing stops, and mandatory end-of-session flattening. Position sizing expands across profit milestones, while daily loss limits and consecutive loss thresholds restrict execution. Trading halts once daily limits are breached.
Multi-timeframe trend pullback and mean reversion modes
Phase-based position sizing based on accumulated profit
Daily loss, consecutive loss, and trade count guardrails
ATR-based stop loss, profit target, and trailing stop
Regular trading hours session filter with auto-flattening
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Algo Mode
string
Auto (Regime)
mode
MTF Filters
string
15m + 60m
mtfMode
Direction
string
Both
tradeDir
Session Filter
bool
true
useSession
RTH Window (Exchange TZ)
session
0830-1515
sessWindow
Flatten End
bool
true
flattenEnd
Phase Sizing
bool
true
usePhaseSizing
Qty Phase 1
int
2
qtyPhase1
Qty Phase 2
int
5
qtyPhase2
Switch to Phase 2 after Profit ($)
float
3100
phase2ProfitUsd
Max Trades/Day
int
3
maxTradesPerDay
Max Daily Loss ($)
float
600
maxDailyLossUsd
Show all 31 settings
Setting
Type
Default
Variable
Max Consecutive Losses
int
2
maxConsecLosses
Fast EMA
int
9
fastLen
Slow EMA
int
21
slowLen
Trend EMA
int
200
trendLen
RSI
int
14
rsiLen
ATR
int
14
atrLen
Use ADX
bool
true
useAdx
ADX Len
int
14
adxLen
ADX Min
float
16.0
adxMin
Use Volume
bool
true
useVol
Vol MA
int
20
volLen
Vol Mult
float
1.0
volMult
Reversion Dist (ATR)
float
1.4
revDistATR
Reversion RSI Low
int
35
revRsiLow
Reversion RSI High
int
65
revRsiHigh
Stop ATR
float
1.5
slATR
Target ATR
float
2.2
tpATR
Use Trail
bool
true
useTrail
Trail ATR
float
1.0
trailATR
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.
Andean Scalping is a Pine Script v5 strategy template designed for backtesting trading signals. It features session and date-range filtering, directional trade toggles for long and short entries, and optional trend filtering tools including higher-timeframe EM
This overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail
This intraday strategy implements session-based trading rules tailored for gold on short timeframes. It tracks the Asian session price range, VWAP, 20-period EMA, and previous day high and low levels to identify liquidity sweeps during London and New York trad
This strategy identifies price consolidation ranges during Asia session hours and trades mean-reversion reclaims following liquidity sweeps. It marks an initial range box, measures sweep depths past box boundaries using ATR multiples, and enters trades when pr
This strategy identifies trend continuation and accumulation setups on 5-minute charts. It enters long or short positions based on an aligned moving average stack, rising or falling price grinds within a lookback period, and a maximum bar size threshold to avo
This strategy enters long positions every Monday at 00:00 UTC on the 15-minute chart. It computes quantity as 10 percent of current equity divided by the bar close, rounded to three decimal places for stability. Market orders open the position and it flattens