breakout

Breakout: buy the new high, stop under the base.

The breakout is OptAlgo's default example because it is simple to state, easy to test honestly and hard to overfit when you keep the parameters fixed. Buy a new 20-bar high, place a stop 2 ATR below, trail it. The engine's demo card is exactly this strategy.

Official Binance broker · Non-custodial · Live only when you confirm · Updated

01

What it is

A Donchian-style entry on a close above the highest high of the last N bars, an initial stop measured in ATR, a trailing stop that follows new highs, and an exit when the trail is hit. Optional filters: volume above average, higher-timeframe trend up.

02

What the backtest must get right

The entry is at the bar after the breakout close, not the breakout bar; the stop fills on the 1-minute path; fees and funding on the hold; and the lookahead check, because a breakout rule that peeks at the current bar's high looks perfect and is worthless.

03

A prompt that builds one

This is the sentence from the OptAlgo home page.

“Backtest a BTC breakout: buy a new 20-bar high on 4h, 2 ATR stop, trail it.”
04

From one coin to a basket

Run the same rules on BTC, ETH and SOL together with equal capital. The grade is the worst symbol's and the overfit check counts the basket as one more variant. Then walk-forward it; a breakout that survives three windows is worth paper trading.

faq

Breakout strategy FAQ

What is a good N for the breakout?

There is no universal value; 20 on 4h and 50 on daily are common starting points. Testing several values on the same data is overfitting unless the overfit check sees all of them, which on OptAlgo it does.

Does the trailing stop execute on the exchange?

Live, OptAlgo places stops as native exchange orders and moves them as the trail updates, so the stop is on the exchange even if the connection drops.

Do I need to code this?

No. Describe the rules to Claude or ChatGPT through the OptAlgo connector and the assistant writes the strategy against the OptAlgo SDK, validates it for free and backtests it. You can read and download the code.

How do I know the backtest is not overfit?

Every run returns an overfit verdict based on how many variants you tried. Then ask for a walk-forward or a holdout: the strategy must keep its edge on data it never saw before it is worth paper trading.

Backtest the breakout in one sentence.

Start free, no card

50 backtest units a month on the Free plan.