Institutional Impulse + Muzzle Mode

5. Institutional Impulse + Muzzle Mode

One of the defining mechanisms of the system. It detects institutional impulses (sudden, violent moves generated by large capital) and immediately changes the system’s behaviour.

Impulse Detection

On every new bar on Inp_Impulse_TF (default M1):

  1. Calculates average range and average volume over the last Inp_Impulse_AvgPeriod (20) candles
  2. Fetches ATR
  3. Calculates velocity = |current_close - prev_close| / prev_close
  4. Impulse detected if candle range > Inp_Impulse_Min_Range_Points (50 pts) AND at least ONE of the following is true:
  • velocity > Inp_Impulse_Velocity (0.5% price change)
  • current_range > RangeMult × avg_range (2× average)
  • current_range > ATRMult × ATR (2× ATR)
  • current_volume > VolMult × avg_volume (1.5× average volume)

Log: "Institutional Impulse Detected! Activating MUZZLE MODE for 15 mins."

Muzzle Mode — How the System’s Characteristics Change

After an impulse is detected, the system enters Muzzle Mode:

ParameterNormal ModeDuring Impulse (Muzzle Mode)
Min. Smart DI candle body2 pts150 pts
CCI block levelInp_Block_CCI_Level (350)Inp_Muzzle_CCI_Block_Level (130)
SELL signalsAllowedBlocked if Channel_Down = 0
Price channelStandard Dynamic ChannelMuzzle Box (anchored at impulse price)

Key point: When Inp_Muzzle_Channel_Points_Down = 0, the system operates exclusively as BUY ONLY during an impulse — selling is completely blocked. This allows the system to ride the momentum after a breakout move.

Dynamic Muzzle Channel

At the moment an impulse is detected, the system saves the current BID price (g_Muzzle_BasePrice). All subsequent signals must fall within:

  • Upper: base_price + Muzzle_Channel_Points_Up
  • Lower: base_price - Muzzle_Channel_Points_Down (or -DBL_MAX when Down = 0)

Muzzle Mode Deactivation

Muzzle Mode expires only when ALL of the following conditions are met:

  1. Cooldown elapsed: (current_time - impulse_time) > Impulse_Cooldown_Mins × 60
  2. Market has calmed: current_range ≤ 1.5 × avg_range AND current_volume ≤ 1.5 × avg_vol
  3. A local peak or trough has formed: the previous candle has a higher high (peak) or lower low (trough) than its neighbours

Log: "Market calmed down. MUZZLE MODE deactivated."

Architecture & Module Connections

1. Architecture & Module Connections

The system is composed of five header files included into the compiled main file _AHS_Main.ex5:

_AHS_Main.ex5
  ├── AHS_Inputs.mqh      → All input parameters, enumerations, global state variables
  ├── AHS_Filters.mqh     → Market filters (The Shield): Macro Matrix, Impulse, Channel, ADX/MA, SmartDI, MTF, 3Candles
  ├── AHS_Strategy.mqh    → Multi-Core Engine: position sizing, order execution
  ├── AHS_Management.mqh  → Position management: TSL BB, Hard BE, Neg BE, Dynamic TP, EOD Terminator
  └── AHS_Panel.mqh       → Graphical information panel: status, MTF dashboard, positions list

OnTick() Flow — Step by Step

Every incoming tick passes through a strictly defined sequence in the main loop:

OnTick()
  1.  License check (CLicenseManager.IsExpired)
  2.  Session schedule check (IsScheduleAllowed)
  3.  EOD Terminator (CheckForEODClose) → emergency close all positions
  4.  Daily P/L update and daily reset
  5.  Account Protection checks:
        → DailyLossReached?    → block new orders
        → DrawdownFreeze?      → block new orders
        → DailyTargetReached?  → block new orders
  6.  Equity Trailing Lock (master equity trailing SL)
  7.  Institutional Impulse Detection (CheckInstitutionalImpulse)
  8.  Dynamic Channel Update (UpdateDynamicChannel) every X hours
  9.  News Filter → freeze before/after news events
 10.  ManageAllPositions() → manage all open positions
 11.  Cooldown check + position count limit check
 12.  EvaluateStrategies() → Multi-Core Engine searches for a signal
 13.  Information panel update

All stages are independent — position management (step 10) runs regardless of whether new signals are being sought (step 12). Even when new orders are blocked, open positions are always managed.

Adaptive Hybrid System - Multi-Core Strategy Engine -US100
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.