Discussing the article: "Hedge (Multiplicative Weights): Blending a Handful of Simple Trading Rules Online"

Check out the new article: Hedge (Multiplicative Weights): Blending a Handful of Simple Trading Rules Online.

We implement a Hedge (multiplicative-weights) ensemble in MQL5 that combines five simple experts: MA cross, RSI reversion, Bollinger and Donchian breakouts, and a MACD histogram flip. The EA updates weights bar by bar from realized direction, with an optional regret-based learning rate. We wire it into trade logic, logging weights and enforcing risk controls, then compare Hedge to equal-weight and single-expert modes across multiple symbols and timeframes to show how to tune η and evaluate impact.

Every trader who's ever coded more than one rule has hit the same wall: the MA cross catches trends, the RSI reversion catches chop, and neither one works when the market decides to switch character halfway through your backtest window. The usual fix is to pick one and live with its blind spots, or to hardcode some kind of regime filter that's really just another rule guessing at the market's mood.

An older idea from online learning handles this more honestly. Instead of picking a winner up front, you let a small set of simple rules vote every bar, track how each one has actually performed across the whole run, and shift trust toward whichever ones have been right most consistently - without ever needing to know in advance which regime you're in. The algorithm is called Hedge, sometimes written as the multiplicative-weights method. It was introduced by Freund and Schapire in the mid-1990s as a way to combine expert predictions with a worst-case performance guarantee, and it later became one of the building blocks behind AdaBoost. The guarantee that matters here: over any sequence of outcomes, Hedge's cumulative loss can't fall too far behind the single best expert in hindsight, no matter how adversarial the sequence looks - you don't need to know which rule will be right ahead of time, only that the algorithm will find out fast enough not to matter much.

Author: Adedayo David Gbadebo