DEV Community

Cover image for The Crossover Is Not Enough
AlgoRover
AlgoRover

Posted on Edited on

The Crossover Is Not Enough

A moving-average crossover happens. SuperTrend turns bullish a few bars later. Does the strategy enter?

No.

That is the most important detail in this system: the crossover and the SuperTrend direction must agree on the same bar.

SMA provides the event

The strategy uses a 20-bar Simple Moving Average and a 50-bar Simple Moving Average.

The fast SMA crossing above the slow SMA creates a possible long event. Crossing below creates a possible short event.

“Fast SMA is above slow SMA” is only a state. A crossover exists on the single bar where their order changes.

SuperTrend provides permission

SuperTrend starts from the midpoint of each bar and places trailing boundaries at a multiple of Average True Range.

ATR measures recent bar travel. The reviewed settings use 10 bars and a multiplier of 3. Wider movement produces a larger band distance; quieter movement produces a smaller one.

This is why the strategy is called adaptive. The volatility-scaled band adapts. The SMA periods do not.

The same-bar rule changes everything

The long condition is:

fast SMA crosses above slow SMA
and SuperTrend is upward now

The short condition mirrors it.

The strategy does not save a rejected crossover. If SuperTrend agrees later, that later agreement does not create an entry by itself.

This avoids turning the filter into a vague permission window. It also means the two indicators can recognize the same broader move at different times and still produce no trade.

The exit is not SuperTrend

After entry, the source places a fixed limit target from the average entry price. The example setting is 1%.

The SuperTrend band is not a trailing exit, and there is no explicit stop-loss in the reviewed source.

This is easy to misimplement because many strategies use SuperTrend both for entry and exit. This one uses it only as an entry-direction filter.

What the parameters actually control

SMA lengths control crossover timing.

ATR period controls how quickly the volatility estimate changes.

The ATR multiplier controls how far the SuperTrend boundary sits from price.

The fixed percentage controls the target distance.

Changing one does not “make the whole strategy more sensitive.” Each parameter changes a different stage.

Where it becomes difficult

The combination is easiest to interpret when directional movement lasts long enough for the crossover and filter to align.

In sideways or rapidly alternating price action, the SMA pair may cross while SuperTrend remains in the opposite state. Later, SuperTrend may flip after the crossover event has already passed.

That is not a delayed confirmation. Under the source rules, it is a missed conjunction.

The takeaway

This is not simply “SMA crossover plus SuperTrend.”

It is “SMA crossover only when SuperTrend already agrees.”

When reviewing a port, check three things:

  1. Is the crossover detected as a one-bar event?
  2. Is SuperTrend read on that same bar?
  3. Is a rejected crossover discarded instead of remembered?

Those details determine whether the implementation is actually the same strategy.

Want to verify these claims? Open ChatGPT or Claude, install AlgoRover (algorover.ai), and ask it to compare SMA lengths 10/50, 20/50, and 20/100; compare SuperTrend multipliers 2, 3, and 4; or check whether a later SuperTrend flip can activate an earlier crossover. Research mode does not require an exchange account.

Prepared by AlgoRover from the strategy logic and example configuration. This explains mechanism and learning method, not individualized trading advice.

Top comments (0)