Warrior_EA/Expert/Topology
仓库文件(优先显示最新提交)
文件名 最新提交消息 最新提交日期
AnimateDread 98f485b901 fix(gate): the payoff horizon ended before the pivot it was measuring
The first cut measured payoff over SwingLifespanEstimate() bars. That is
PIVOT_LABEL_TOLERANCE_BARS - a constant of the TARGET describing how many bars
share one pivot event - and it is the wrong horizon for what a call is worth.

The label fires when a pivot lands WITHIN that window. So at that horizon the
pivot may only just have committed, and a perfectly correct call can still show
a negative forward move because the turn it predicted has not had one bar to
run. Measuring only there would understate the payoff of a signal working
exactly as designed, and could inflip its sign.

Measures two horizons and reports both:

  SHORT = PIVOT_LABEL_TOLERANCE_BARS      "has the pivot arrived" - a control
  HOLD  = that + the median ZigZag leg    the pivot PLUS the leg it opens,
                                          which is how long a trade on this
                                          call would actually be held

Adds CTopology::SwingLegMedianBars(). It is deliberately NOT the same thing as
SwingLifespanEstimate() and the declaration says so: the lifespan is a constant
of the target and is what the effective-sample-size deflation divides by, while
the leg median is a measurement of the chart and is how long the move runs.
Conflating them is what produced the wrong horizon in the first place.

Non-const and lazily measured, because a model that adopted its .cfg never
walked the chart and would otherwise report HISTORY_BARS_FALLBACK as if it were
a measurement - the same lazy pattern DeriveHistoryBars() already uses.

Reporting both horizons is also the guard against picking one and calling it
the truth. A break-even conclusion here has already been overturned once purely
by getting a horizon wrong.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 07:19:40 -04:00
..
AIBaseTopologyView.mqh Enhance Feature and Topology Interfaces with Bulk Operations and Cache Management 2026-08-25 22:51:50 -04:00
AIBaseTopologyViewImpl.mqh Enhance Feature and Topology Interfaces with Bulk Operations and Cache Management 2026-08-25 22:51:50 -04:00
ITopologyView.mqh Enhance Feature and Topology Interfaces with Bulk Operations and Cache Management 2026-08-25 22:51:50 -04:00
Topology.mqh fix(gate): the payoff horizon ended before the pivot it was measuring 2026-08-27 07:19:40 -04:00