Skip to main content

Featured

Single Buy vs. Genuine Cluster

Insider buying alerts get treated as a single, uniform signal, but a single purchase and a genuine cluster of independent purchases carry very different informational weight — and the distinction is checkable in public filings well before it becomes a headline. The Surface Issue Stock-screening tools flag "insider buying" whenever any officer or director makes an open-market purchase, with no distinction between a routine, isolated transaction and a genuinely unusual pattern. That flattening is what makes the raw alert an unreliable signal on its own. The Structural Cause Insiders buy shares for reasons that often have nothing to do with a near-term view on the stock — personal financial planning, routine plan participation, diversification timing. A single purchase can't be distinguished from these ordinary reasons. Multiple, independent insiders buying within a short window is much harder to explain away as coincidence or routine planning. 144TICKJOURNAL · TR...

Designing an Early Hard Stop — Cutting Losses Before the Grid Fills

Fixing the risk-reward imbalance in the grid was one problem. But even with a better-balanced structure, the exit logic still had a deeper issue: the only way to trigger a stop-loss was to let the grid fill completely first. That meant the system was sitting in a deteriorating trade, deploying more capital at every step, and waiting until the very last stage before pulling the plug. This post covers what I built to solve that — a hard stop mechanism that exits early, before the grid is done filling.



The Problem With Waiting for the Grid to Finish



Under the original structure, a stop-loss only fired after all grid stages had been filled and the price had then continued to fall past a final threshold. On paper, this made the average cost as low as possible before exiting. In practice, it meant the worst-case outcome involved the maximum possible capital deployed at the moment of maximum loss — the exact combination you want to avoid.



Beyond the financial cost, there was an opportunity cost too. While the system sat in a stalling position buying stage after stage, other, better setups were passing by unaddressed. A mechanism that could exit earlier — before full deployment — would free up capital faster and reduce both the size of losses and the time spent trapped in bad trades.



The Core Idea: Two Signals at Once



The hard stop is built around a single principle: if the trade has reached the midpoint of the grid (past a defined stage threshold) and multiple warning signals appear at the same time, exit immediately — don't wait for the final stop-loss level.



Using two simultaneous signals, rather than one, is deliberate. A single signal is too easy to trigger on normal price noise — the kind of movement that looks alarming for a moment but reverses on its own. Requiring two signals to coincide before acting dramatically reduces false exits (called whipsaws) while still catching the situations where the trade is genuinely breaking down. One signal is a warning; two at the same time is a pattern worth acting on.



A Bug That Took Days to Find



The first implementation of the hard stop had a bug that was difficult to isolate because it produced no error — the system simply never fired the stop, no matter what the price did.



The problem turned out to be in how the lowest price point was being tracked. The logic was built around detecting a "bounce" — a small recovery from the recent low — as confirmation that a new leg down had begun. Each time a bounce was detected, the reference low was supposed to reset to the current price. But the code was resetting it every time any upward tick occurred, including tiny fluctuations of a few cents. Because these micro-ticks happened constantly, the reference low was resetting on nearly every price update, which meant the conditions required to fire the hard stop could never accumulate long enough to trigger.



The fix was straightforward once the root cause was clear: separate the logic that tracks the running low from the logic that detects a meaningful bounce. The running low updates continuously. A bounce is only recognized when the price rises a minimum percentage (for example, 0.3%) above that running low — not just any upward tick. Once that threshold is crossed, the running low resets to the current price. This way, small noise is ignored while genuine partial recoveries are properly tracked.



What the Bug Actually Taught



This particular bug was useful beyond just the fix. It illustrated something that shows up repeatedly when building trading systems: a logic error that produces no exception, no crash, and no obvious malfunction — just a silent failure to fire when it should. These are the hardest bugs to catch because there's no error message pointing to the problem. The only way to find them is to watch the live behavior, notice that something expected isn't happening, and trace backwards through the logic until the discrepancy surfaces.



The broader lesson holds for any complex conditional system: if a mechanism is supposed to fire under certain conditions, you need to verify not just that it fires correctly when conditions are met, but also that conditions can actually accumulate to the point of being met in the first place.



Today's Investing Insight — Whipsaws and How to Reduce Them



A whipsaw happens when a price crosses a threshold — triggering a stop or an entry signal — and then immediately reverses. For stop-loss strategies, a whipsaw means you exited a trade that would have recovered. For entry strategies, it means you entered a trade that promptly went the other way. Whipsaws are especially common when trigger thresholds are too tight, or when a single indicator is used in isolation. The most widely used approach for reducing whipsaws is requiring multiple independent conditions to align before acting — exactly the two-signal logic used in the hard stop described above. No approach eliminates whipsaws entirely, but raising the bar for what counts as a valid signal consistently reduces their frequency.



---



This post documents a personal journey of building an algorithmic trading system and is not a recommendation of any specific strategy. All investment decisions and their outcomes are the sole responsibility of the investor.

Comments