A Session-Structured Market Bias Engine Inspired by Febex Digital Amplitude
FEBEX HDA is an advanced market-bias engine that analyzes the Forex market using a combination of:
This hybrid model captures both directional structure (session bias patterns) and true candle amplitude (range/volatility magnitude) โ creating a unique โmarket heartbeatโ signal.
The HDA system is designed for:
- Session-based market analytics
- Trend strength detection
- Market bias visualization
- Pattern-driven momentum modeling
- Direction-volatility hybrid analysis
Traditional indicators treat price direction and volatility separately.
FEBEX HDA combines them.
It integrates:
- Binary Session Outcome (0/1)
- Digital Amplitude (3-day pattern logic)
- ATR-Normalized Volatility Amplitude
- Directionally-Weighted Strength Score
This creates a single, readable signal that shows:
- When sessions are strongly bullish
- When sessions are weak or indecisive
- When volatility confirms or contradicts direction
- When structural reversals begin forming
Each session is encoded into:
- 1 = bullish / upward bias
- 0 = bearish / downward bias
- Doji = inverse of previous binary (to avoid directionless disruption)
Digital Amplitude evaluates the last 3 session outcomes.
011 โ +1
111 โ +1
100 โ -1
000 โ -1
otherwise โ 0
Interpretation:
- +1 = structural bullish tendency
- -1 = structural bearish tendency
- 0 = noise / mixed pattern
Each sessionโs price amplitude:
range = high - low
amplitude = range / ATR(14)
This gives volatility in units of average range:
- 0.5 = half ATR
- 1.0 = average session
- 2.5 = strong expansion
Volatility must respect direction.
So the amplitude is signed:
strength = amplitude * ( +1 or -1 depending on session direction )
The final signal adds pattern logic + volatility strength:
HDA = DigitalAmplitude + StrengthScore
Examples:
- Strong bullish pattern โ +3.0
- Weak mixed candle โ 0
- Violent bearish reversal โ โ4.2
This is the core "Hybrid Amplitude Wave".
Febex-HDA/
โ
โโโ data/
โ โโโ forex_session_data_blocks.csv # Stored session data
โ
โโโ modules/
โ โโโ amplitude.py # Core amplitude & HDA logic
โ โโโ data_input.py # Input system for binary & OHLC data
โ โโโ plotting.py # Digital + Hybrid amplitude charts
โ โโโ utils.py # File checks, date helpers, etc
โ
โโโ main.py # CLI menu program
โ
โโโ README.md # Documentation
Python 3.8+
pandas
matplotlib
numpy
pip install pandas matplotlib numpypython main.pyYou will see:
--- FEBEX HYBRID DIGITAL AMPLITUDE ---
1. Input Data Block
2. View Amplitude Chart
3. Exit
Select:
1 โ Input Data Block
Youโll provide:
- Date range
- Session set (Asian / London / NY / Tokyo)
- 3-digit binary pattern
- OHLC values
The system automatically:
- Skips weekends
- Stores into CSV
- Prepares for amplitude computation
Select:
2 โ View Amplitude Chart
Youโll see a dual-plot:
- Digital Amplitude (classic Febex)
- Hybrid Digital Amplitude (volatility-weighted)
The result shows:
- Market structure shifts
- Session-specific volatility expansions
- Reversal signals
- Trend continuation patterns
- Cyan = Digital Amplitude (ยฑ1)
- Yellow = Hybrid Digital Amplitude (continuous wave)
Interpretation:
- Spikes = volatility bursts
- Smooth curves = structural trends
- Divergence = early trend-change warning
The system architecture supports future upgrades:
- Automatic OHLC extraction from TradingView CSV
- Direct OHLC from MT5 Terminal
- Probability map for digital patterns
- Forecasting model using hybrid distributions
- Heatmap of HDA ranges per session
- AI-based session bias predictor (LSTM/Transformer)
- Web dashboard (Plotly Dash)
Pull requests, refinements, and analytics enhancements are welcome.
If you build advanced Febex-based indicators, feel free to contribute!
MIT License โ free to modify and distribute.
Please star the repository โ it helps!