{
  "_about": "Rules for tools/ib_backtest.py: the Nasdaq 'Initial Balance' breakout as stated on Raj Shamani's Figuring Out FO414 (26:48-29:12). Edit here, then re-run `.venv/bin/python tools/ib_backtest.py run`. Times are New York local time (DST-aware). Prices are index points.",
  "source_quote": [
    "The first 30 minutes candle is called initial balance.",
    "If the high break of 30 minutes candle is there, I will buy. If the low break is there, I will sell.",
    "as soon as the price will tap above 102, it will be 102.1, I will buy it ... stop loss ... 100 rupees. Because it was open 100.",
    "under open or under the low of the market, my stop loss will be below the low ... point of no return",
    "stop loss of 3 rupees ... target of 6 rupees. So 1 is to 2 risk to reward ratio.",
    "this has a win rate of 60-70% ... over the years ... in a week, you will get 2-3 trades."
  ],

  "data": {
    "symbol": "USATECHIDXUSD",
    "signal_side": "BID",
    "_signal_side_note": "IB high/low and breakouts are read off the BID chart, as MT4/MT5 and most CFD charts display it."
  },

  "ib_start": "09:30",
  "ib_minutes": 30,
  "exit_at_session_close": true,
  "_exit_note": "Flat at the NYSE close from the exchange calendar (16:00, or 13:00 on half-days) if neither stop nor target was hit.",
  "last_entry_time": null,

  "entry": {
    "type": "stop_order",
    "buffer_points": 0.0,
    "_note": "A resting stop order at the IB extreme. Long: triggers when BID trades above the IB high and fills at the ASK (level + that minute's spread). Short: triggers when BID trades below the IB low, fills at the BID. If a minute opens beyond the level, the fill is at that minute's open (worse)."
  },

  "costs": {
    "spread": "from Dukascopy BID/ASK candles (each order fills on its executable side)",
    "slippage_points_per_market_fill": 0.5,
    "_slippage_note": "Added against us on every stop-order fill (entry and stop-loss) and on the end-of-day market exit. Limit (target) fills get none.",
    "commission_points_round_trip": 0.25,
    "_commission_note": "About $5 per NQ futures contract round trip at $20/point; most NAS100 CFD accounts charge spread only."
  },

  "min_risk_frac_of_ib_range": 0.10,
  "_min_risk_note": "Skip a trade whose stop distance is under 10% of the IB range (only possible with stop = 09:30 open, when the open sits right at the breakout level). Skipped trades are counted.",

  "same_minute_rule": "stop_first",
  "_same_minute_note": "If stop and target are both inside one 1-minute bar, assume the stop was hit first. On the entry minute itself, a stop touch counts as a loss; a target counts only if that minute CLOSED beyond the target.",

  "risk_per_trade_pct": 1.0,
  "start_equity": 10000,

  "grid": {
    "stop": ["ib_other_end", "open"],
    "target_r": [1, 2, 3],
    "mode": ["first_break", "reverse_after_stop"],
    "filter": ["none", "ib_direction"]
  },
  "_grid_note": "stop: ib_other_end = IB low for longs / IB high for shorts ('point of no return'); open = the 09:30 open price. mode: first_break = one trade a day, first side broken; reverse_after_stop = if that trade is stopped out, also take a later break of the other side (max 2 a day). filter: ib_direction = only trade in the direction of the 30-minute IB candle (long if it closed above the open, short if below), from his 'trade only in its favor'.",

  "headline_variants": [
    "stop=ib_other_end|target=2R|mode=first_break|filter=none",
    "stop=open|target=2R|mode=first_break|filter=none",
    "stop=ib_other_end|target=2R|mode=reverse_after_stop|filter=none",
    "stop=open|target=2R|mode=reverse_after_stop|filter=none",
    "stop=ib_other_end|target=2R|mode=first_break|filter=ib_direction",
    "stop=open|target=2R|mode=first_break|filter=ib_direction"
  ]
}
