Momentum Sequence Strategy+ [Herman] by helmans13

By helmans13

Performance Metrics

Description

Momentum Sequence Strategy [Herman] is an open-source, rules-based price-action strategy designed to test momentum continuation following a defined candle sequence.The strategy does not use moving averages, oscillators, volume indicators, or higher-timeframe data. Its signals are derived entirely from the relationship between consecutive OHLC candles.The objective is to identify situations where an initial candle establishes a protected price extreme and is followed by a sequence of candles showing consistent momentum in the opposite direction.How the strategy worksThe model begins with a Main Candle, followed by a user-defined number of consecutive confirmation candles.The number of following candles can be set to:2345The default setting is 5 following candles.Long setupA Long setup requires:The Main Candle to be bearish.Every following candle to be bullish.The low of every following candle must remain strictly above the low of the Main Candle.Each new bullish candle must close higher than the previous bullish candle.No position may already be open.In simplified form:Bearish Main Candle -> Bullish -> Bullish -> ... -> LongThe low of the Main Candle acts as the invalidation level for the sequence.Short setupThe Short setup is the exact inverse of the Long setup.A Short setup requires:The Main Candle to be bullish.Every following candle to be bearish.The high of every following candle must remain strictly below the high of the Main Candle.Each new bearish candle must close lower than the previous bearish candle.No position may already be open.In simplified form:Bullish Main Candle -> Bearish -> Bearish -> ... -> ShortThe high of the Main Candle acts as the invalidation level.Long and Short trading can be enabled or disabled independently.By default:Long Trades: ONShort Trades: OFFThe strategy allows only one open position at a time.Stop LossFor Long trades, the Stop Loss is placed at the low of the Main bearish Candle.For Short trades, the Stop Loss is placed at the high of the Main bullish Candle.This means the candle that begins the sequence defines the structural invalidation point of the trade.Take ProfitThe strategy uses configurable R-based targets:0.5R / 1R / 1.5R / 2RThe default setting is 1.5R.For a Long setup, risk is measured from the closing price of the final confirmation candle to the low of the Main Candle.For a Short setup, risk is measured from the closing price of the final confirmation candle to the high of the Main Candle.The selected R multiple is then applied to that distance to calculate the Take Profit level.Important execution detailThe strategy identifies a completed sequence using confirmed candle data.Under TradingView's standard historical strategy execution model, a market order generated after a confirmed bar will normally be filled on the next available tick, which is typically the open of the following bar.The strategy calculates its R-based target using the close of the signal candle, rather than the eventual simulated market fill price.Because of this, the selected 0.5R, 1R, 1.5R, or 2R setting represents the strategy's target calculation model and may not equal the exact realized risk-to-reward ratio measured from the simulated fill price. Gaps, market movement between bars, commissions, and slippage can further affect actual results.VisualsThe strategy can display:Long setup markersShort setup markersActive Stop LossActive Take ProfitA configurable statistics/settings tableThe table displays the currently selected Take Profit, sequence length, and enabled trade directions.Default configurationThe default script inputs are:Following Candles: 5Take Profit: 1.5RLong Trades: ONShort Trades: OFFEntry Signals: ONStop Loss / Take Profit display: ONThese defaults are provided as a starting configuration for research and are not presented as optimized parameters for any particular market or timeframe.Users are encouraged to evaluate different configurations across sufficiently large datasets rather than selecting parameters solely because they produced favorable historical results.Intended use and limitationsThis is a mechanical backtesting strategy intended for studying a specific candle-sequence behavior.It does not evaluate market regime, trend, volatility, liquidity, volume, news events, session context, support/resistance, or other discretionary information.A valid sequence therefore does not imply that a profitable trade will follow.Historical strategy results are hypothetical and do not predict future performance. Results can vary materially depending on symbol, timeframe, trading costs, liquidity, execution assumptions, and selected parameters.The strategy should be evaluated on standard price-based candlestick charts. Non-standard chart types such as Heikin Ashi, Renko, Range, Kagi, or Point & Figure can produce strategy results that do not correspond to tradable market prices.This version extends that foundation with:Pine Script v6 implementationConfigurable 2-5 candle sequence lengthMirrored Short-side logicIndependent Long/Short controlsConfigurable R-based profit targetsOne-position-at-a-time executionStop Loss and Take Profit visualizationConfigurable on-chart settings tableExpanded user controls and documentationThe script is published open-source so users can inspect the complete methodology, verify its behavior, modify it, and conduct their own research.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView