MT4 → NinjaTrader 8 Indicator Ports
A trader's MetaTrader 4 chart toolkit rebuilt as NinjaScript, plus a custom opening-gap box indicator and drawing tool.
The problem
Traders moving from MetaTrader 4 to NinjaTrader 8 lose the small chart tools they rely on every day. The first client wanted the MT4 toolkit back in NT8. The second wanted a daily opening-gap box drawn automatically on index futures.
What I built
- ADR indicator: average daily range from the day’s open, over a set number of completed days. Lines turn solid red when price touches them, labels dock to the price scale, and old objects are cleared each new day.
- Session boxes: Asia, London and New York plus two custom sessions. Each has its own colours, high/low/mid lines, line extension, range text and timezone handling.
- Daily and weekly levels: previous day and week high and low plus the daily open, drawn with plots and
SessionIteratorso they load with the chart. - Multi-EMA: five configurable EMAs using precomputed smoothing constants.
- RSI overlay system: RSI, an SMA of the RSI and Bollinger Bands in their own panel, with arrow signals.
- Opening-gap box: an indicator that draws the box between the prior session’s close and the first regular-session open, with dividers, a fill opacity setting and range text in points. It also comes as a drawing tool so the box can be drawn by hand.
Details
- The gap box doesn’t hard-code session times. It detects the session break from the time gap on a secondary 1-minute series, so holiday and early-close sessions work, and the indicator runs on any chart timeframe.
- Each box gets a date-stamped tag and is tracked in a set, so recalculating the chart never draws duplicates.
- Indicators that only draw lines use NT8 plots for speed. Ones that need boxes and labels use drawing objects with explicit cleanup, so long charts don’t pile up objects.