Python-based futures and crypto signal engine
Closed-bar, confluence-driven, ATR-managed alert model
Outputs: Discord, email, and SMS support in development
AS-KBN-Futures is a deterministic signal engine designed for futures and crypto market monitoring. It evaluates confirmed bars, computes a multi-factor indicator stack, scores long and short confluence, and emits structured alerts when a qualified setup or exit condition is detected. utrechtuniversity.github
The design emphasizes closed-bar validation, adaptive risk control, and consistent signal interpretation across symbols and timeframes. Its role is signal generation and state-aware alerting rather than brokerage execution. andreabergia
The engine follows a closed-bar event model:
This structure keeps signal generation stable by avoiding intrabar repaint behavior and by separating indicator evaluation from downstream alert formatting. andreabergia
The engine computes its indicator set internally and converts each enabled factor into a directional vote or gating condition.
VWAP provides institutional bias context.
MACD provides momentum confirmation.
Market structure logic identifies bullish or bearish fair-value gaps within the active lookback window.
Channel position provides relative location and mean-reversion context.
CCI supplies timing confirmation around oversold and overbought transitions.
SuperTrend acts as a regime filter.
VIDYA contributes adaptive trend confirmation.
ADX is used as an optional trend-strength gate.
Each enabled factor contributes one point to the active long or short score. Long and short eligibility are evaluated separately, allowing the engine to measure directional agreement without collapsing all logic into a single composite state.
| Factor | Long contribution | Short contribution |
|---|---|---|
| VWAP | Above VWAP | Below VWAP |
| MACD | Histogram > 0 | Histogram < 0 |
| SMC / FVG | Bullish structure | Bearish structure |
| CCI | Oversold recovery | Overbought rejection |
| ADX | Gate condition | Gate condition |
A setup becomes eligible when its directional score meets or exceeds the minimum score threshold. Because evaluation is based on the most recently closed bar, the resulting signal state is non-repainting by design. tilburgsciencehub
Risk logic is ATR-based throughout, allowing the model to adapt to changing volatility conditions.
SL = entry ± ATR × sl_multTP = entry ± ATR × tp_multentry ± ATR × be_multATR × trail_multThe exit stack is evaluated in a defined order:
Exit checks use bar high and low values to detect threshold interaction with the active position state.
Each symbol maintains its own signal state, including:
This state model preserves signal continuity across bars and supports deterministic interpretation of entries, exits, daily caps, and reset conditions.
The engine tracks separate daily P&L buckets by contract tier:
When a configured cap is reached, the engine emits a
CAP_HIT event, disables new entries for the remainder of
the session, and can optionally apply cascade blocking across higher
tiers. This keeps the signal model aligned with tier-specific daily risk
governance.
The engine emits structured alerts for the following event classes:
| Channel | Status | Purpose |
|---|---|---|
| Discord | Active | Rich embedded signal output |
| Active | Structured text delivery | |
| SMS | In development | Lightweight mobile notification |
Alert payloads can include symbol, timeframe, entry or exit price, realized P&L, tier size, win-rate context, exit reason, timestamp, and strategy version.
AS-KBN-Futures is a closed-bar, multi-factor signal engine built around:
The engine is not positioned as a brokerage execution layer or account-management service. Its primary role is signal generation, stateful event evaluation, alert publishing, and research-grade strategy expression.
AS-KBN-Futures is designed for: