Strategy · Pine Script v6 · On the chart

ES Professional Fade (Execution Gap Modeled)

by knectardev

This strategy fades ES opening gaps during the New York regular session and plots on the price chart.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code181
Settings16inputs
LicenceNone stated
Last update9 months ago14 Jan 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

ES Professional Fade (Execution Gap Modeled) records the prior regular close, overnight high and low, and a five, fifteen, or thirty minute opening range. Long and short fade entries require the gap to pass percentage, point, and optional ATR minimums, then a TICK breadth veto and a daily trade cap. An optional penalty adjusts fills near the open. Positions close through a take-profit and stop-loss exit, a maximum bar hold, or the session end. The excerpt does not show the exact trigger prices.

Details

Published by

knectardev on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Sessions & time, Mean reversion, Support & resistance

Markets

Indices

Timeframes

M1-M5

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
Backtest Start Datetimetimestamp("2025-10-01 00:00")startDateInput
Backtest End Datetimetimestamp("2026-01-08 23:59")endDateInput
Min Gap %float0.20gapMinPctInput
Opening Range (Min)intOR_LENGTH_15MINopeningRangeLengthInput
Breadth Filter (TICK extreme)intDEFAULT_TICK_FILTERtickFilterInput
TICK veto lookback (bars)intDEFAULT_TICK_LOOKBACKtickLookbackInput
TICK veto countintDEFAULT_TICK_VETO_COUNTtickVetoCountInput
Max Hold (Bars, 5m)intDEFAULT_MAX_HOLD_BARSmaxHoldBarsInput
Max Trades Per DayintDEFAULT_MAX_TRADES_DAYmaxTradesDayInput
Use ATR gap filterbooltrueuseAtrFilterInput
ATR Length (chart TF)intDEFAULT_ATR_LENGTHatrLengthInput
Min Gap in ATRsfloatDEFAULT_GAP_ATR_MULTgapAtrMultInput
Show all 16 settings
SettingTypeDefaultVariable
Min Gap PointsfloatDEFAULT_MIN_GAP_POINTSminGapPointsInput
Apply execution penalty near openbooltrueuseExecPenaltyInput
Penalty window after open (mins)intDEFAULT_EXEC_WINDOWexecWindowMinsInput
Execution penalty (ES points)floatDEFAULT_EXEC_PENALTYexecPenaltyPointsInput
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

3C QFL Mean Reversal

by hasnocool
106 stars

3C QFL Mean Reversal is a strategy based on the Quickfinger Luc (QFL) trading methodology. It identifies breakdown buying opportunities below established price base levels and enters mean-reversion trades. The strategy includes multi-safety order DCA scaling,

Strategy v5 Mean reversionSupport & resistance Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3C QFL Mean Reversal
5 stars

This strategy enters one long trade when the bar low comes within a set point tolerance of the prior day's low and the close finishes above that level. Entries are allowed only inside a UTC session and are blocked after a Friday cutoff hour. It stays flat unti

Strategy v5 Support & resistanceMean reversion Repaints
Updated 4 months ago · MIT GitHub repository of PDL — Prior Day Level Retest (Bull)

Gap Filling Strategy

by regalouisei
2 stars

This strategy detects daily opening gaps and trades them on the price chart. It marks an up or down gap from the current open and close versus the previous bar, then stores the prior extreme as the fill level. By default it buys down gaps and shorts up gaps, e

Strategy v4 Mean reversionSessions & time Repaints
Updated 8 months ago · None stated GitHub repository of Gap Filling Strategy
1 stars

This strategy identifies Initial Balance periods on NQ and ES futures charts using user-defined start and end hours in Eastern Time. It classifies days as narrow or wide based on average range lookback and skips narrow or trending days per settings. Entries tr

Strategy v6 Mean reversionSupport & resistance
Updated 7 months ago · MIT GitHub repository of IB Mean Reversion Fade

XSP Daily Lotto

by majohnst
1 stars

This strategy models a zero-days-to-expiration (0DTE) Opening Range fade system on the price chart, designed around Mini-SPX index options. It calculates an opening range box and gauges directional sentiment from an external symbol like ES futures. Bullish con

Strategy v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of XSP Daily Lotto

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