Replay a Price-Level Hypothesis
replay_candle_hypothesisReplay one already stated price hypothesis as round trips. Entry is the level, and only after a candle opens on the near side and trades through it. A candle that opens through the level is an unfilled gap. Exit is the target, the invalidation, or the final close if the horizon ends. Both prices in one candle stay unknown and are left out of the sum. feePctPerSide defaults to 0.1 percent and is charged on entry and exit. The clock still starts at the anchor. Under 10 touches the verdict is INSUFFICIENT_DATA. Returns NO_TRADE. This is not a win rate, a search over stops, or a replacement for RLXBT.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| f | No | Horizon in bars, counted from the anchor. Default 10 | |
| q | No | Pattern length preset. Default 5 | |
| symbol | No | BTCUSDT, ETHUSDT or SOLUSDT. Default BTCUSDT | |
| anchorTs | No | Optional historical snapshot time in Unix milliseconds | |
| interval | No | Chart timeframe. Default 1h | |
| levelPrice | Yes | Entry level the caller named. Required. Do not invent it from a band. | |
| targetPrice | Yes | Price beyond the level that closes the round trip as a target | |
| feePctPerSide | No | Percent of notional charged on entry and again on exit. Default 0.1 | |
| invalidationPrice | Yes | Price on the other side of the level that closes the round trip as an invalidation |