Skip to content

TJ Options Signal

Component Type: ATAS C# Custom Indicator (TraderJan.Indicators)
Source Files: Options Signal.cs, GexEngine.cs, Options Flow.cs
Python Parity Twin: Backtesting/backtest_options.py
Downstream Consumer: Options Strategy.cs


🟢 Part 1: Layman & Trader Guide

1. What is TJ Options Signal?

TJ Options Signal (known as Engine B) bridges institutional options market data (Gamma Exposure or "GEX") with futures price action on the CME (e.g., NQ / MNQ).

Major institutional option market makers constantly rehedge their positions by buying and selling underlying futures contracts. This creates massive invisible zones of support, resistance, and price magnetism: * Call Walls & Put Walls: Levels where dealer hedging forces the market to slow down and reject (fade setups). * Magnets (Max Pain & Charm): Levels toward which price is mathematically pulled as option contracts approach expiration.

TJ Options Signal monitors these institutional options levels in real time and automatically signals trades when futures price action tests them.

2. Core Setups Explained

      â–² Price
      │      [ Call Wall Resistance ]  ◄── Dealer Gamma Wall
      │         ▲
      │        ╱ ╲
      │       ╱   ▼  SIGNAL: Wall Sweep Fade (Short)
──────┴──────┴────────────────────────────────────────
  1. Wall Sweep (Fade Setup):
  2. Price rapidly sweeps into a major Call Wall or Put Wall.
  3. Market makers absorb the order flow, and price fails to penetrate through the wall.
  4. Options Signal triggers a mean-reversion "fade" trade targeting a return back toward fair value.
  5. Magnet Orbit (Drift Setup):
  6. Price enters the gravitational orbit of Max Pain or an intraday Charm magnet level.
  7. Options Signal takes directional drift trades anticipating price pinning into the close.

3. Understanding the Regimes & Displays

  • Positive Gamma Regime (+GEX): Market makers trade against the trend (buying dips, selling rips). Markets are typically low-volatility and range-bound. Wall Sweep fade trades thrive in this regime.
  • Negative Gamma Regime (-GEX): Market makers trade with the trend (selling dips, buying rallies). Volatility expands dramatically, and wall breaks cause explosive momentum moves.

4. Interactive HUD & Controls

The indicator features an integrated heads-up display: * Horizon Selectors: Toggle Daily, Weekly, or Monthly options expiration walls. * Performance HUD: Realized/unrealized PnL, win rate, and remaining daily risk allowance.


💻 Part 2: Expert & Developer Specification

1. Mathematical Architecture & GEX Level Lookups

A. Gamma Wall Gating & Entry Invariants

A Wall Sweep entry at bar $i$ requires satisfying: 1. Wall Proximity Constraint: $$|\text{High}i - \text{CallWallPrice}| \le \text{sweep_tolerance_ticks} \times \text{TickSize}$$ 2. Rejection & Reversal Confirmation: $$\text{Close}_i < \text{Open}_i \quad \text{and} \quad \text{Close}_i < \text{CallWallPrice}$$ 3. Regime Filter: $$\text{NetGEX}{\text{horizon}} > 0 \quad (\text{if } \text{require_pos_gex} == \text{true})$$

B. Embedded Payload Architecture (GetLevelsForDate)

To prevent visual toggles in the HUD from disrupting mathematical execution, Options Signal embeds an unmanaged instance of Options Flow internally: * Calls GetLevelsForDate(sessionDate) to retrieve immutable point-in-time gamma structures. * Decouples the UI state buffer from signal generation logic.

2. Execution Bus: 9-Series DataSeries Contract

The signal exposes an identical communication interface to Engine A, allowing Options Strategy to plug into either engine seamlessly:

Series Index Name Semantics
0 SignalDirection +1.0 (Long), -1.0 (Short), 0.0 (None)
1 TargetPrice Target level (e.g. Opposite Wall, Magnet, or ATR multiple)
2 StopPrice Defensive stop price placed beyond the gamma wall
3 TrailingOffset Dynamic trailing stop distance
4 BreakevenTrigger Ticks into profit to advance protective stop to BE
5 BreakevenOffset Ticks above entry for BE stop buffer
6 MaxRiskTicks Absolute maximum risk allowed per contract
7 DailyCircuitState 0 = Active, 1 = Daily Stop Hit, 2 = Target Reached
8 GenomeHash FNV-1a identifier of active Engine B parameters

3. Replay Parity & Backtest Synchronization

Signals are 100% reproducible in Python using Backtesting/backtest_options.py. * Static vs Dynamic Mode: * Static Mode: Uses point-in-time chain snapshots frozen at morning session open (08:30 CT). * Dynamic Mode: Steps across 15-minute _HHMM snapshot slices during regular trading hours. * CLI Reconstruction: BuildCliCommand() outputs the exact CLI string required to run the Python backtest for any historical signal on the chart.