BTC Volatility Aligned Momentum EngineTitle
BTC Volatility Aligned Momentum Engine
Version and compatibility
Pine Script v6
All request.security calls use lookahead off
Strategy execution uses standard candles only
Signals can update intrabar and settle on close. For conservative workflows, evaluate on bar close
Summary in one paragraph
BTC Volatility Aligned Momentum Engine is a daily first strategy built for liquid crypto, with BTC in mind. It only participates when three independent layers agree: directional state, structural location, and momentum phase. The novelty is not a random stack of indicators, it is a small decision engine that treats momentum as a regime variable and volatility as the unit of risk, so stops and targets scale with the market rather than staying static.
Scope and intent
Markets. Liquid crypto pairs, then liquid indices and FX as secondary use
Timeframes. Intraday through daily. Defaults are tuned for BTC 1D behavior and weekly volatility scaling
Purpose. Filter low quality participation by requiring alignment of state, structure, and phase instead of reacting to one signal
Limits. This is a strategy. Orders are simulated on standard candles only
Originality and usefulness
This is designed as a compact regime filter, not a mashup. Each component solves a different failure mode and the entry requires agreement, not majority voting.
Unique concept or fusion. A three layer gate that separates direction from structure and then confirms with momentum phase, while risk is expressed in weekly ATR units
What failure mode it addresses. Trend filters often enter during late stage drift or chop. Here, the histogram slope is treated as a phase constraint, meaning entries are biased toward continuation when momentum is still improving in the chosen direction
Testability. Inputs map directly to the decision layers, so you can stress test each layer independently without touching the rest
Portable yardstick. Weekly ATR is used as a volatility denominator for risk distances, which reduces the common issue of fixed stops becoming too tight in expansion and too wide in contraction
Protected scripts. The implementation is kept private to prevent cloning of the execution details, while the full method, assumptions, and reproduction settings are disclosed so users can evaluate it transparently
Method overview in plain language
Base measures
Structural location. Price is evaluated relative to an EMA rail, acting as a simple market structure proxy
Directional state. Heikin Ashi candles are used only as a state filter to reduce noisy flips. Execution is still done on standard candles
Momentum phase. A MACD style histogram with an Internal HA calculation is computed and compared to its prior value. The model reads this as phase acceleration or deceleration rather than absolute level
Volatility unit. Weekly ATR defines the distance unit used for stop and target placement
Components
State Gate. Heikin Ashi open and close define a bias state. This is not used for prices, only to avoid trading against the immediate directional state
Structural Rail. A primary EMA defines whether price is operating above or below the model reference structure
Phase Gradient. The histogram slope acts like a gradient test. Longs require improving momentum, shorts require deteriorating momentum. This avoids the classic issue where an oscillator can remain positive while momentum is already fading
Weekly Volatility Engine. ATR is sampled on weekly timeframe and used as an adaptive risk ruler. Stops and targets are expressed as ATR multiples rather than fixed points
Fusion rule
This is a strict gate, not a score. All required conditions must be true.
Directional state must agree with the trade direction
Price must be on the correct side of the structural rail for longs
Momentum phase must be improving for longs and deteriorating for shorts
Risk distances use weekly volatility scaling when enabled
Signal rule
Long entry appears when the HA state is bullish, close is above the primary EMA rail, and the histogram is rising versus the prior bar
Short entry appears when the HA state is bearish, price crosses under the short trigger EMA, and the histogram is falling versus the prior bar
Long exit appears when close drops below the exit rail EMA
Inputs with guidance
Execution Control
Allowed Direction. Both, Long Only, Short Only. Useful for regime isolation and research without changing the core model
Enable ATR Risk Engine. On places ATR stop and target orders. Off disables those orders so you can evaluate pure signal exits
Quantum MACD Engine
Signal Source. Default close
Impulse Length. Typical 8 to 20. Higher means fewer, slower phase changes
Inertia Length. Typical 18 to 40. Higher means less sensitivity to short bursts
Phase Sync Length. Typical 5 to 14. Higher reduces false phase flips but adds lag
Oscillator Kernel and Signal Kernel. EMA reacts faster, SMA is smoother. Mixing kernels changes the histogram texture and can materially change frequency
Trend Rails
Primary Rail Length. Higher reduces churn and increases trend selectivity
Cross Trigger Length. Short side sensitivity. Lower increases short triggers, higher filters them
Exit Rail Length. Controls long exit responsiveness
Volatility Risk Engine
ATR Sample Length. Weekly ATR smoothing. Higher stabilizes risk unit
Loss Guard ATR Mult. Stop distance in volatility units. Typical 1.0 to 3.0
Profit Guard ATR Mult. Target distance in volatility units. Typical 1.0 to 4.0
Usage recipes
BTC daily core
Chart BTC 1D
Allowed Direction Both
ATR Risk Engine On
Defaults for rails and MACD engine
Directional research
Allowed Direction Long Only, then Short Only
Keep everything else unchanged and compare drawdown behavior across regimes
Lower frequency swing
Increase Primary Rail Length
Increase Phase Sync Length
Use a slightly higher Profit Guard ATR Mult while keeping stop conservative
Properties visible in this publication
Initial capital 10000
Order sizing percent of equity with value 5
Pyramiding 1
Commission 0.1 percent per side, round turn is two sides
Slippage 10 ticks
Process orders on close ON
Bar magnifier ON
Recalculate after order is filled OFF
Calc on every tick OFF
All request.security calls use lookahead off
Realism and responsible publication
No performance claims. Past results do not imply future results
BTC can gap and liquidity can thin. Slippage and fills vary by venue and regime
If both stop and target can be hit within one bar, TradingView engine sequencing applies. Interpret single bar outcomes cautiously
This strategy is designed for standard candles and does not claim realistic execution on non standard chart types
Honest limitations and failure modes
Fast volatility shocks can invalidate weekly ATR as a risk ruler for several bars
Choppy ranges can produce alternating state and phase signals, increasing churn
Short logic is structurally different from long logic by design, so symmetry should not be assumed across all regimes
Parameter changes can materially alter behavior. Treat this as a framework and test on out of sample windows
Legal
Education and research only. Not investment advice. You are responsible for your decisions. Test on historical data and in simulation before any live use. Use realistic costs.
Strategy notice
Orders are simulated by the TradingView engine on standard candles. request.security uses lookahead off everywhere. Non standard chart types are not supported for strategies.
Entries and exits
Entry logic. Long when directional state is bullish, price is above the primary EMA rail, and momentum phase is improving. Short when directional state is bearish, price crosses under the short trigger EMA, and momentum phase is deteriorating
Exit logic. Long exits when price drops below the exit rail. ATR stops and targets can be enabled or disabled via inputs
Risk model. Weekly ATR multiple stop and take profit when enabled
Tie handling. If stop and target are both hit in the same bar, TradingView bar resolution rules apply under the chosen magnifier settings
กลยุทธ์ Pine Script®






















