Back to Dev Log
Hooligan Dev Log Cycles

The Low That Went Unmarked

MANTIS Team
81f1a2c

There’s a rule in the daily-cycle detector that reads, in full: the weekly low IS a daily low.

It exists because the weekly cycle low is by definition the lowest point of its weekly cycle. A daily cycle has to end there. If the detector marks daily lows either side of a weekly bottom and never on it, something has gone wrong — not cosmetically, but structurally.

That is exactly what INJ was doing, and it took someone looking at the chart to see it.

What the chart showed

The daily chain ran from the 5th of June straight to the 18th of August. In between sat the weekly cycle low — the 22nd of June, the actual bottom of the cycle — with no daily mark on it at all.

Worse, the low it had marked on the 5th of June was about fifteen percent higher than the one it skipped. The indicator was pointing at a shallower low and ignoring the real one seventeen days later.

What the rules said

This is the part worth dwelling on, because the answer was never in the parameters.

I spent the first stretch of this doing what you do when something is off: reading configuration. Comparing thresholds. Checking whether some cap or floor was set wrong for this asset and not the others. I found a distance limit that looked guilty, changed it, and watched the fix work.

It also quietly destroyed three other marks going back through the chain, including a perfectly good one from September. Reverted.

The actual answer was in the written ruleset, which I should have gone to first. The rule decides on depth — is the weekly low materially deeper than the normal pick? The code was asking about distance — how many days away is it? Those are different questions, and on this asset they gave different answers.

The bit that was genuinely hidden

There’s a second rule that resolves a mark back to the deepest candle in a run, rather than to whichever candle happened to trigger the confirmation. It exists because confirmation is timed from each candidate individually, so on a slow recovery the deepest low can time out while a shallower one catches the same bounce.

Good rule. But it has a consequence: the low that gets reported and the candle the chain advances from are no longer the same candle. They can be several days apart.

Everything downstream then measures from the advancing candle. So when the detector asked “is this weekly low close enough to belong to the previous daily?”, it measured from the wrong end and got “yes — too close, skip it.” Meanwhile the previous daily had already settled on a date five candles earlier and had no way to claim it.

The weekly low fell into the gap between the two, and was claimed by neither.

The fix, and the check

One question moves. “Does this weekly low belong to the previous daily?” is a question about that daily’s low — not about whichever candle happened to confirm it. The hunt still advances the way it did before, so the rule that created the gap is left completely intact.

Then the part that matters more than the fix: measuring it. The detector is sequential, so every pick seeds the next one, and a change in one place can shunt years of marks sideways without anyone noticing. So it gets run across the entire cohort, before and after, and the two are diffed.

Eight assets. One mark added — the missing weekly anchor on INJ. Nothing removed, nothing moved.

That is the result you want. Not “it fixed the thing I was looking at,” which the first attempt also did, right up until it turned out to have quietly eaten three other marks on its way past.

Why this is in the log

Because the interesting part isn’t the fix. It’s that a rule written down eighteen months of work ago was correct, the code implementing it was subtly asking a different question, and neither the tests nor I noticed — until the chart looked wrong to a human being.

That’s the argument for reading your own charts rather than trusting the panel, and it’s the argument for writing the rules down in plain English somewhere separate from the code. If the ruleset had only existed as the implementation, there’d have been nothing to check the implementation against.

The commit that backs this entry is above the article, and it predates it.