Strategy · Pine Script v6 · On the chart

Lucid 100K (MES/MGC/MNQ)

by DexWilder

Lucid 100K is an automated evaluation strategy tailored for micro futures contracts such as MES, MGC, and MNQ on lower timeframes.

View on GitHub

GitHub stars4on the repository
Pine versionv6current
Lines of code620
Settings40inputs
LicenceNone stated
Last updateyesterday27 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 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 (MES/MGC/MNQ) operates a two-phase state machine that moves from an initial risk-averse lock-in phase to an expanded payout phase once target profits are met. Entries rely on trend pullbacks and mean-reversion signals filtered by time windows. Risk parameters include daily profit locks, maximum loss limits, intraday drawdown caps, multi-timeframe trend filters, and phase-dependent position sizing.

Details

Published by

DexWilder on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Trend, Mean reversion, Sessions & time

Markets

Indices, Gold, Oil & commodities

Timeframes

M1-M5, M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Lock Target ($)float3100phase2ProfitUsd
Phase SizingbooltrueusePhaseSizing
Qty P1 (Lock)int2qtyPhase1
Qty P2 (Payout)int5qtyPhase2
Qty Cooldownint1qtyCooldown
Use Phase 2 GatebooltrueusePhase2Gate
P2 Min Recent PFfloat1.1phase2ReqPF
P2 PF Lookbackint25phase2Lookback
Block P2 After Halt DaybooltrueblockP2AfterHalt
Force Trend-only P1booltrueforceTrendP1
P1 Green Lock ($)float600p1GreenLockUsd
P2 Profit Lock ($)float1200p2ProfitLockUsd
Show all 40 settings
SettingTypeDefaultVariable
P2 Profit Lock ActionstringStopp2ProfitLockAction
Session FilterbooltrueuseSession
RTH Windowsession0830-1515sessWindow
Flatten EndbooltrueflattenEnd
Warmup Minsint15warmupMins
Power WindowsbooltrueuseWindows
AM Windowsession0845-1100win1
PM Windowsession1330-1510win2
Rev Blackout Minsint30revBlackout
P2 ModestringAuto (Regime)phase2Mode
P1 MTFstring15m OnlymtfP1
P2 MTFstring15m OnlymtfP2
DirectionstringBothtradeDir
Max Trades/Day P1int2maxTradesP1
Max Trades/Day P2int4maxTradesP2
Max Daily Loss $ P1float600maxDailyLossP1
Max Daily Loss $ P2float1200maxDailyLossP2
Max Intraday DD $ P1float900maxIntradayDDP1
Max Intraday DD $ P2float1800maxIntradayDDP2
Max Weekly Loss $float1500maxWeeklyLoss
Max Consec Lossesint2maxConsecLosses
Intraday DD only after green dayPeakboolfalseddOnlyAfterGreen
Fast EMAint9fastLen
Slow EMAint21slowLen
Trend EMAint200trendLen
RSI Lenint14rsiLen
ATR Lenint14atrLen
Use ADXbooltrueuseAdx
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.

Similar Pine Scripts

8 Whittle Down

by hasnocool
106 stars

This strategy executes short positions during the end-of-day session (14:29–15:00) when the price is below the 200-day simple moving average. If price moves higher against the initial short trade, it scales into the position by submitting a second short order

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 8 Whittle Down
330 stars

This strategy calculates Bollinger Bands and Aroon oscillator values to identify mean-reversion opportunities. It enters a long position using full equity when the closing price crosses below the lower Bollinger Band while Aroon Up remains above a user-specifi

Strategy v5 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of Bollinger bands + Aroon [Alorse]
285 stars

Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish

Strategy v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Strategy
257 stars

Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows

Strategy v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Donald - Test Logic Futures

Bollinger Bands Strategy

by cklose2000
105 stars

This strategy generates buy and sell signals based on Bollinger Band crossovers combined with a simple moving average trend filter. It enters a long position when price crosses above the lower band while trading above the SMA filter line, and enters a short po

Strategy v5 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers