View on GitHub

Envelope Band Ladder Strategy Diagram

Русский | 中文 | Español | Deutsch | Português | 日本語

This diagram trades five-minute Bollinger-band mean reversion with a two-rung entry ladder, bounded reversals, middle-band exits, and scheduled cancellation of resting orders.

schema

Strategy Overview

  • Finished five-minute candles feed Bollinger Bands with Length 20 and Width 1.5. Strict comparisons detect a close below the lower band or above the upper band only after the indicator is formed.
  • Entries are accepted from 00:00:00 through 16:59:59 UTC. From flat, the first rung is a one-unit market order and the second is a resting one-unit limit at 2 × lower − middle for a buy or 2 × upper − middle for a sell.
  • A signal against an existing one- or two-rung position cancels the stale limit and submits a three-unit market order. That maps either permitted exposure to one or two units in the new direction without placing another far rung.
  • A return through the middle band has lower priority than a simultaneous opposite-band entry. The exit cancels the resting rung and chains two one-unit ReduceOnly market actions, so the second action executes only when a second unit remains.
  • Outside the entry window, a daily Flag activates both mass and targeted cancellation. Open exposure is not closed by time; middle-band exits remain active throughout the day.

Entry and Exit Rules

  • Long entry: During the UTC entry window, Close < lower band and Position ≤ 0 form a buy candidate. From flat it submits a one-unit market buy plus a deeper one-unit limit at 2 × lower − middle; from a short it cancels stale limits and buys three units to reverse the bounded position.
  • Short entry: During the UTC entry window, Close > upper band and Position ≥ 0 form a sell candidate. From flat it submits a one-unit market sell plus a higher one-unit limit at 2 × upper − middle; from a long it cancels stale limits and sells three units to reverse the bounded position.
  • Exit: When no higher-priority opposite entry exists, a long exits after Close > middle band and a short exits after Close < middle band. Pending rungs are cancelled first; two chained one-unit ReduceOnly market actions remove up to two filled rungs without crossing through flat. The time filter cancels orders but does not force a position exit.

Parameters

Parameter Default Description
Candles 00:05:00 Time frame of the finished candles used by every signal calculation.
Bollinger Length 20 Lookback period of the formed-only Bollinger Bands indicator.
Bollinger Width 1.5 Number of standard deviations used for the upper and lower bands.
Entry Start 00:00:00 UTC Inclusive UTC start of the fixed entry window.
Entry End 16:59:59 UTC Inclusive UTC end of the fixed entry window; resting limits are cancelled afterward.
Rung Volume 1 Quantity of each ordinary ladder rung and each ReduceOnly exit step.

Diagram Details

  • The Candles block emits finished five-minute candles and can build them from packaged minute history. An Indicator block calculates the three Bollinger lines.
  • Converter, Comparison, and Logical condition blocks extract Close and enforce the strict band, position, session, and priority gates.
  • The Working time block is a fixed schema filter. Formula and Variable blocks calculate and snapshot both far-rung prices and the three-rung reversal quantity at the instant of entry.
  • Six Order registering blocks cover flat market entries, bounded market reversals, and the two resting limits. Mass order cancellation blocks mark every cancellation boundary, while two targeted Order cancellation blocks retain and cancel the active far rungs.
  • Two Modify position blocks perform the sequenced ReduceOnly exit. The Chart panel displays candles, all three bands, and the Strategy trades stream.

Usage

Import the .json file into Designer, run it in the backtester on historical data, then adjust the parameters or the blocks themselves to fit your instrument before trading it live.