Feature guide · 5 min read
HTF Candle Overlay
Puts the last few higher-timeframe candles in the blank space to the right of price, so you get an HTF read without changing the chart period.
- Settings toggle
- Enable HTF Candle Overlay
- NinjaTrader 8 name
- ToredaHtfOverlay
- Ships enabled
- No
What it does
Draws the last `Number Of Candles` higher-timeframe candles in the chart's blank right margin, so an HTF read is available without changing the chart's period or opening a second chart.
The rightmost candle is the live forming HTF bar and moves with price on every tick. The others are the most recent closed HTF bars.
The extras
- Open line — a dashed horizontal from the forming candle's open, so you can see at a glance whether the HTF bar is currently up or down on its own open.
- Sweep lines — drawn where a candle takes out the prior candle's high or low on a reversal: at the prior low when a bear→bull candle undercuts it, or at the prior high when a bull→bear candle exceeds it.
- TF label and time label — the period, and the forming candle's open time.
Give the chart room
The candles are drawn into the chart's right margin, so set one first: chart properties → Right side margin. Start Offset then positions the block inside that space.
Inputs
| Input | Default | Meaning |
|---|---|---|
| HTF Minutes | 60 | Higher-timeframe period, used when Auto TF is off. |
| Number Of Candles | 6 | Candles drawn, including the forming one. |
| Start Offset (bar slots) | 25 | Gap between the last chart bar and the first HTF candle, in bar widths. |
| Spacing (bar slots) | 1 | Gap between HTF candles. |
| Draw Visuals | On | Master drawing switch. |
Style inputs
| Input | Default | Meaning |
|---|---|---|
| Body Up / Body Down / Wick Color | #008000 / #808080 / #808080 | Candle colors. |
| Show Open Line / Style / Color | On / Dashed / #FFFFFF | Horizontal line at the forming candle's open. |
| Show Sweep Lines / Style / Color | On / Solid / #FFFFFF | Line at the prior candle's low when a bear→bull candle undercuts it, or at the prior high when a bull→bear candle exceeds it. |
| Show TF Label / Show Time Label | On / On | Period label and the forming candle's open time. |
| Label UTC Offset (hours) | −4 | Offset applied to the time label. |
Auto timeframe
With Auto TF on, the higher timeframe is picked from the chart period rather than fixed, so the overlay stays a sensible step up as you change charts.
| Chart period | HTF minutes |
|---|---|
| < 5m | 5 |
| < 15m | 15 |
| < 1H | 60 |
| < 4H | 240 |
| < 1D | 1440 |
| < 1W | 10080 |
| ≥ 1W | 43200 |
Adding it to a chart
- Right-click the chart → Indicators… → find ToredaHtfOverlay, 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.
- Give the chart some right margin (chart properties → Right side margin) so the candles have room. Start Offset positions them inside it.
- The indicator runs On Each Tick by default so the forming candle is live. Switching it to On Bar Close still works, but the forming candle then updates only at chart-bar closes and is excluded from sweep detection.
Notes and limitations
- Open-line and sweep-line styles are accepted but always rendered solid.
- The time label is a fixed UTC offset, not a timezone, so adjust it across DST changes if you want it exact.
For strategy builders
NinjaTrader 8 only
No shipped strategy consumes this indicator, but its plots are available to your own. 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, and flags are 1/0.
| Plot | Meaning |
|---|---|
| HtfOpen / High / Low / Close | The live forming HTF bar. Under On Each Tick these move with price. |
| PrevHtfOpen / High / Low / Close | The last closed HTF bar. |
| SweepUp | 1 once the current HTF bar has taken the prior bar's low. Latched for the HTF bar, so its rise is the entry edge. |
| SweepDown | 1 once it has taken the prior bar's high. |
| SweepLevel | The swept price. NaN when neither has fired. |
| MinutesIntoHtfBar | Elapsed minutes into the forming HTF bar. |
This content is for educational purposes only and is not financial advice. Trading involves substantial risk of loss. See our risk disclosure for details.