Feature guide · 5 min read
Demand/Supply Boxes
Tracks recent swing highs and lows as dotted level lines. When price breaks through one, it marks the area the move came from as a demand or supply box.
- Settings toggle
- Enable Demand/Supply Boxes
- NinjaTrader 8 name
- ToredaFractalDS
- Ships enabled
- No
What it does
The indicator tracks the most recent confirmed swing high and swing low as dotted level lines — teal above, maroon below. When price breaks through one of those levels, it draws a box:
- A break up through the swing-high level draws a demand box where the move began, and fires
LongSignal. - A break down through the swing-low level draws a supply box where the move began, and fires
ShortSignal.
Each level can only fire once, so a level that has already done its job cannot keep signalling while price chops around it.
How to read it
The box marks the area the breakout move originated from — the last of the old direction before the market turned. That is why it is worth watching if price comes back to it.
The signal fires on the break bar's close
With the default WickBody break type, the entry bar may already have retraced part of the move by the time the bar closes. Body mode waits for a close through the level instead, which is slower but cleaner.
Inputs
| Input | Default | Meaning |
|---|---|---|
| Periods | 5 | How much confirmation a swing level needs. Higher = fewer, more significant levels. Max 100. |
| Break Type | WickBody | WickBody breaks on High/Low, so a wick counts. Body breaks on Close only. |
| Change Box Color On Close | Off | When on, a demand box that price closes below flips to supply colors and vice versa, so a failed zone shows as the opposite type. |
| Max Boxes | 100 | Oldest boxes are removed beyond this count. |
| Show Swing Markers | On | Draws a × at each confirmed swing high and low. |
| Demand/Supply Background & Border | Green / Red | Box colors. Backgrounds are drawn at 80% transparency. |
| Swing High/Low Color | Yellow | Marker colors. |
| Draw Visuals | On | Master drawing switch. |
Adding it to a chart
- Right-click the chart → Indicators… → find ToredaFractalDS, click Add, set the inputs, click OK.
- Color inputs shown as #RRGGBB are typed as hex text, e.g.
#6FA8DC. An invalid value falls back to a default and prints a note in the NinjaScript Output window rather than failing the indicator. - Boxes are drawn on the bar the break happens and never move. The level lines run from the swing point to the current bar until they are broken.
Notes and limitations
- The signal fires on the break bar's close, so with WickBody the entry bar may already have retraced part of the move.
For strategy builders
NinjaTrader 8 only
Every plot is registered transparent, so it changes nothing on a chart until you color it in the indicator dialog. Levels are NaN when there is no value — never 0, which would compare as a real price — and flags are 1/0.
| Plot | Meaning |
|---|---|
| LongSignal / ShortSignal | 1 on the bar a demand / supply box fires, else 0. |
| FractalTop / FractalBottom | The live swing break levels — the dotted lines. NaN until the first swing confirms. |
| DemandTop / DemandBottom | Bounds of the most recent demand box. NaN until one exists. |
| SupplyTop / SupplyBottom | Bounds of the most recent supply box. |
This content is for educational purposes only and is not financial advice. Trading involves substantial risk of loss. See our risk disclosure for details.