spec.md 2.0 KB

ADDED Requirements

Requirement: Glued weak-rebound block subtype SHALL be explicitly classifiable

The strategy facade SHALL classify buy_block_glued_high_weak_rebound into explicit subtype labels using the existing threshold set.

Scenario: Weak-rebound subtype evaluation

  • WHEN strategy evaluates a glued buy candidate
  • THEN weak-rebound subtype is resolved as one of:
  • high_zone_weak_b1
  • mid_zone_very_weak_b1
  • ql_rebound_weak_followthrough
  • AND empty subtype indicates no weak-rebound block hit

Requirement: Probe-gated pending lifecycle SHALL be supported

The strategy SHALL support a probe-gated pending lifecycle for blocked glued weak-rebound candidates, without changing day-0 block behavior.

Scenario: Candidate bar is blocked but queueable in probe branch

  • WHEN weak-rebound subtype is hit on a glued entry bar
  • AND probe config enables pending for that subtype
  • AND no active glued pending exists
  • THEN pending state is queued
  • AND current bar still returns buy_block_glued_high_weak_rebound

Requirement: Pending confirmation SHALL require explicit followthrough repair

Pending glued followthrough confirmation SHALL require explicit followthrough conditions before delayed buy can fire.

Scenario: Pending candidate gets confirmed

  • WHEN pending is active
  • AND bars waited >= 1 and <= confirmation window
  • AND no kdj_sell and no ql_sell
  • AND ql_buy=True
  • AND close > signal_close
  • AND b1 - signal_b1 >= config threshold
  • THEN strategy emits BUY
  • AND reason prefix is glued_followthrough_reentry_buy:confirmed_
  • AND pending state is cleared

Requirement: Pending state SHALL be cleared on terminal conditions

Pending glued followthrough state SHALL clear on terminal conditions.

Scenario: Pending invalidation

  • WHEN pending is active
  • AND any of:
  • in position
  • kdj_sell=True or ql_sell=True
  • bars waited exceeds confirmation window
  • real buy triggered
  • real sell triggered
  • THEN pending state is cleared