Python-based options strategy decision engine
Multi-timeframe trend, momentum, and volatility classifier
Outputs structured strategy guidance through Discord-based alerting
Strategy Picker is a rule-based decision engine that classifies market conditions and maps them to the options structure most aligned with the current regime. It evaluates trend agreement, directional strength, price position versus EMA 8, and volatility state to produce a strategy recommendation rather than a trade execution signal. camunda
The engine is designed for intraday strategy selection across major index products, futures, ETFs, and other liquid underlyings. Its role is to identify whether current conditions favor a credit spread, an iron structure, a directional debit structure, or a no-trade state.
The engine routes market conditions into one of several strategy classes:
This design allows the strategy output to adapt to both directional trend quality and premium regime, rather than relying on a single indicator or fixed market assumption.
Strategy Picker is organized into five core layers:
This layered model separates raw indicator interpretation from final strategy recommendation, making the engine easier to reason about and more consistent across symbols.
Strategy Picker uses a Triple Screen-style multi-timeframe model inspired by Alexander Elder’s framework, combining higher-timeframe trend context with lower-timeframe timing and confirmation. The engine evaluates three timeframes in a classic multi-horizon structure:
| Timeframe | Role |
|---|---|
| 60-minute | Primary directional anchor |
| 15-minute | Intermediate confirmation layer |
| 5-minute | Short-term timing and early-shift context |
This structure allows the engine to distinguish between broader directional context and shorter-term tactical movement. The 60-minute and 15-minute layers drive the confirmed trend state, while the 5-minute layer acts as an early signal context rather than a primary trend determinant.
The current Python implementation uses the following core inputs:
| Indicator | Role |
|---|---|
| MACD | Momentum direction and confirmation |
| EMA 8 | Short-term directional filter and price-position context |
| ADX | Trend-strength gate |
| DI+ / DI- | Directional pressure bias |
| VIX | Options volatility regime classifier |
These indicators are evaluated numerically and converted into rule-based state decisions rather than discretionary interpretations.
Each timeframe is scored independently using four directional tests:
A bullish score is assigned when enough bullish conditions are present. A bearish score is assigned when enough bearish conditions are present. Otherwise, the timeframe remains neutral. The Python version uses a threshold-based score model, requiring a minimum number of aligned directional conditions before classifying a timeframe as bullish or bearish.
This scoring approach reduces the influence of any single input and emphasizes directional agreement within each timeframe.
The confirmed trend state is derived primarily from the 60-minute and 15-minute timeframes. When both agree, the engine classifies the environment as bullish or bearish. When they disagree, the model can either defer to the 60-minute bias or fall back to neutral, depending on configuration.
A 2-bar confirmation layer smooths rapid state changes by requiring the raw directional state to persist before the confirmed trend flips. This helps reduce churn during noisy transitions and supports more stable regime routing.
EMA 8 serves both as a scoring input and as a positional context marker. For each timeframe, price is classified as above EMA 8, below EMA 8, or approximately at EMA 8.
This positional layer helps distinguish between trend continuation, pullback conditions, and indecision zones. In practice, aligned price-above-EMA states reinforce bullish structure, aligned price-below-EMA states reinforce bearish structure, and clustered at-EMA states often correspond to transitional or coiling behavior.
ADX functions as the engine’s trend-strength gate. When ADX exceeds the configured threshold, directional strategies gain priority because the market is showing stronger trend persistence. When ADX remains below threshold, the environment is treated with greater caution and neutral or debit structures become more relevant.
DI+ and DI- provide the directional bias behind that trend energy. This allows the engine to distinguish between strong bullish pressure, strong bearish pressure, and weaker non-directional conditions.
VIX is used to classify the options premium environment and determine which structure type is most appropriate. The current logic supports different response bands for low-volatility debit preference, neutral iron-structure windows, and higher-volatility credit-spread regimes.
This regime layer is important because the strategy recommendation is not based on trend alone. A strong trend with insufficient volatility may favor a different structure than a similar trend under richer premium conditions.
The final strategy recommendation is produced by combining:
When directional trend is confirmed, ADX is supportive, and the volatility regime is sufficient, the engine routes toward a bullish or bearish credit spread framework.
When the environment is neutral and ADX is not supportive of a strong trend, the engine can route toward iron condor or iron butterfly logic depending on the active volatility band and the enabled configuration.
When volatility is relatively low or directional context is incomplete for premium-selling structures, the engine can route toward bullish or bearish debit-spread guidance.
When trend, strength, and volatility do not combine into a coherent regime, the engine outputs a pause state. This is a deliberate no-trade classification rather than a missing signal.
The Python implementation publishes structured Discord alerts based on strategy and trend evaluation state. Alerts can include:
The current engine also distinguishes between open-state alerts, trend-change alerts, ADX regime flips, and strategy-change alerts, which gives the output layer more context than a simple one-line status message.
The current symbol mapping supports major index and futures products including SPX, ES, NQ, MES, MNQ, YM, RTY, CL, GC, BTC, and ETH, with additional support for other liquid symbols through the same market-data workflow.
Strategy Picker is a strategy-routing engine built to:
The engine is not a brokerage execution layer and is not intended to function as a direct order-management system. Its purpose is regime classification, options-structure selection, and alert-driven decision support.
Strategy Picker is designed for:
The rewritten version should remove outdated references to Pine
Script visuals, chart tables, overlay behavior, and Pine-specific alert
constraints because those describe the earlier implementation rather
than the current Python engine. It should also update the version
framing from the older v2.1 description to reflect the currently running
Python version lineage shown in your code as
VERSION = "2.7".
If you want, I can next do one of two things: - produce a
final polished TastyDayTraders About page that ties all
four bots together, or - turn these four rewritten bot sections into
ready-to-paste HTML page content for
home/about/*.html.