El Pendulo PDH PDL Fade [Artillery] — Strategy by ArtilleryTrades

By ArtilleryTrades

Performance Metrics

Description

El Pendulo is an evening-session mean-reversion strategy that fades tests of the previous day's regular-session high and low (PDH/PDL). The idea: when the overnight market probes yesterday's RTH extremes - common resting-liquidity levels - and immediately prints a rejection candle, price often swings back toward the middle of yesterday's range like a pendulum. This is a canonical republication of the earlier "El Pendulo v1.0" script with an English-first ASCII title and no version suffix; the trading logic is unchanged.WHAT IT DOES1) Levels - the script tracks the regular session (9:30-16:00 ET by default) and stores its final high, low and midpoint as PDH, PDL and MID for the following evening.2) Test detection - during the trade window (21:00-23:55 ET by default), a touch within a configurable point-distance of PDH or PDL arms a test and tracks the extreme reached.3) Reversal confirmation - the setup fires only when a reversal candle with a minimum body closes back on the "wrong" side of the level (back below PDH for shorts, back above PDL for longs, within a tolerance). Tests that get no reversal within 10 bars expire.4) Directional filter - VWAP confluence: shorts only above VWAP, longs only below it (optional).5) Entry and exits - entry within a short grace window after confirmation; stop beyond the test extreme with a hard maximum stop distance; target at the smaller of the range midpoint or the R:R multiple; plus a time stop, a session close and a midnight hard flat.6) Guard rails - at most 2 trades per evening (input), one position at a time, no entries after the cutoff time.WHY THESE PARTS TOGETHERFading a level without confirmation is just catching knives; the reversal-candle test demands evidence that the probe failed. The VWAP filter keeps the fade aligned with the session's value drift, the midpoint target encodes the mean-reversion thesis (take what the pendulum gives, not more), and the time stop acknowledges that overnight reversion either works quickly or is not working. All code is original, written with Pine built-ins only.BACKTEST PROPERTIES AND SAMPLE-SIZE CAUTIONThe report uses realistic single micro-contract properties: 50,000 initial capital, fixed 1 contract, 0.62 commission per contract per side, 1 tick of slippage, orders on bar close, no pyramiding. Please note the small trade sample: this is a deliberately rare setup - it needs an overnight test of yesterday's RTH extreme plus a confirmed rejection inside a three-hour evening window, capped at two trades per session - and intraday 5-minute history on TradingView only covers a few months, so the default report contains well under 100 trades. Treat the report as an illustration of behaviour, not as statistical evidence. Test longer periods on higher timeframes or in Deep Backtesting, and remember historical results do not predict future performance. Defaults were built for MNQ on 5-minute bars; the point-based inputs (touch zone, body size, stop buffer) must be rescaled for other symbols.WHAT YOU SEE ON THE CHART- PDH (red), PDL (green) and MID (dotted amber) lines drawn through the evening, with labels- X-cross marks when a level test arms, diamond marks when a reversal confirms- LONG / SHORT labels at entries, the VWAP reference line, the average entry price while in a trade, and a soft tint over the trade window- A dashboard with the current levels, range width, VWAP, test/signal state and the strategy's running resultsBEHAVIOUR NOTESEverything computes on closed bars: no intrabar order generation, no higher-timeframe requests, no lookahead. PDH/PDL are yesterday's finished values, so the levels never repaint; the running session's high/low are only stored after that session ends. Strategies in Pine v6 alert through order-fill events.This is an educational and analytical tool for studying overnight mean reversion around prior-day extremes. It is not financial advice.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView