Request A Free Quote
MT4 → NinjaTrader Conversion

Convert MT4 Expert Advisors & Indicators to NinjaTrader

We rewrite MT4 Expert Advisors as NinjaTrader strategies and MT4 indicators as NinjaScript indicators — and if the instrument changes too, we adapt sizes, price distances and sessions. The result is checked against criteria agreed with you.

MT4 EA to NinjaTrader StrategyMT4 Indicator to NinjaTraderMQL4 to NinjaScriptRewritten by Hand
3,000+ Projects Delivered
Fixed Scope & Price Before Work
Full NinjaScript Source Code
Checked Against Agreed Criteria
Overview

What MT4 to NinjaTrader Conversion Means

MT4 to NinjaTrader conversion means rewriting MQL4 code in NinjaScript, NinjaTrader’s C#-based language: an Expert Advisor becomes a NinjaTrader strategy and an indicator becomes a NinjaScript indicator. The move can keep the same market or change it — for example from a CFD to a futures contract. If the instrument changes, trade sizes, price distances, sessions and rollover are adapted as well.

From
MQL4 on MetaTrader 4
To
NinjaScript (C#) on NinjaTrader 8
Expert Advisor
NinjaTrader strategy
Indicator
NinjaScript indicator
You receive
NinjaScript source code and everything needed to run it
Method
Rewritten by hand, no automatic converters
Expert Advisors

Convert an MT4 Expert Advisor to a NinjaTrader Strategy

An MT4 Expert Advisor and a NinjaTrader strategy automate the same kind of trading, but they work with different instruments, sizes and positions. Converting an EA keeps its trading rules and rebuilds the trade handling for NinjaTrader.

Entries & Exits

Entry, exit and close rules are rebuilt with NinjaScript order methods — the managed approach, or the unmanaged one where the logic needs it — including scaling in, partial exits and reversals.

Instrument Mapping

Each MT4 symbol is matched to a NinjaTrader instrument. If the instrument changes — for example from a CFD to a futures contract — the strategy is adapted to its tick size, tick value and contract months.

Lots to Contracts

Lot-based sizing becomes the quantity the NinjaTrader instrument uses — contracts, units or shares — and is checked against your risk rules.

Positions & Accounts

Each MT4 trade becomes an entry inside the strategy’s own position, with its exits tied to it. NinjaTrader tracks the strategy’s position separately from the account’s, so how it runs alongside other strategies and manual trades — and what it does if a position is already open at start — is agreed in advance.

Stops & Targets

Protective orders are set in ticks or prices through NinjaScript — or an ATM strategy. An ATM version is checked on simulation or Playback: ATM strategies don’t run in backtests.

Sessions & Rollover

Trading hours templates are set up for the instrument you trade, and contract rollover for futures.

Strategy Analyzer results won’t match the MT4 Strategy Tester exactly: the platforms use different data — sometimes for a different instrument — and model fills differently. We check that entries and exits follow the agreed rules.

Indicators

Convert an MT4 Indicator to NinjaTrader

Converting an MT4 indicator to NinjaTrader means rebuilding its calculations in NinjaScript and how it draws on the chart. We convert standard, custom and multi-timeframe indicators, as well as panels and dashboards.

Calculations & Plots

Calculations are rebuilt in NinjaScript; buffers become plots, and fills, shapes and labels use drawing tools or custom rendering. Any visual differences are agreed in advance.

iCustom Calls

Calls to other custom indicators through iCustom are rebuilt in NinjaScript as well, so we need their source too.

Built-In Indicators

Calls to built-in indicators use NinjaTrader’s own versions where their values match; where the platforms calculate differently, we write the calculation ourselves.

Bar Types

If you need the indicator on tick, volume, range or Renko bars, that is agreed and checked — logic tied to minutes or session boundaries may need adapting.

Alerts & Notifications

Alert conditions become NinjaTrader alerts with sound, and other notifications where needed.

Improvements on Request

New settings or functions, several indicators combined into one, or the indicator turned into a strategy.

Platform differences

MQL4 to NinjaScript: What Changes and How We Handle It

MetaTrader 4 and NinjaTrader trade different instruments and handle code in different ways. These are the differences that decide whether a converted script behaves like the original — and what we do about each of them.

Instruments

Forex, CFDs, stocks or futures from your MT4 broker

Futures, forex or stocks from your NinjaTrader connection

If the instrument changes, we agree which one replaces each MT4 symbol and adapt sizes, price distances and sessions.

Trade size

Lots

Contracts, units or shares

Sizes are recalculated for the NinjaTrader instrument and checked against your risk rules.

Positions

Several separate order tickets at once

The strategy’s own position, tracked separately from the account’s overall position

We map each entry and its exits, and agree how the strategy works alongside other strategies, manual trades and positions already open at start.

Trading hours and time zone

Your MT4 broker’s server time and sessions

The trading hours template, such as RTH or ETH, and the platform time zone

We compare sessions, bar timestamps and the time zone each version’s logic uses — matching chart clocks alone isn’t enough.

Calculation

Indicators and EAs react to new ticks; the exact behaviour depends on the code

Calculation mode is set per script; on history, bars are processed on close unless intrabar data is added

The calculation mode, the historical data and the way intrabar signals are checked are chosen to match the original’s logic.

Built-in indicators

MetaTrader’s own calculation

NinjaTrader’s own calculation, which can differ in details

We compare the values and use our own calculation where the two platforms differ.

Other timeframes

Read directly from any timeframe

Added as extra data series and processed bar by bar

Values from other timeframes are aligned with the chart’s bars, as in the original.

What may not carry over one to one

Some things depend on the platform itself: symbols with no matching NinjaTrader instrument; DLLs and libraries the code uses, which are checked one by one — NinjaScript can use .NET libraries, others need a replacement; and tester settings specific to MetaTrader. We point these out before work starts and agree the closest NinjaTrader equivalent with you.

Why manual

Manual vs. Automatic Conversion

A converter or an AI pass can produce NinjaScript quickly. The risk is not the tool but an unchecked result: code can compile and still trade differently, because MetaTrader and NinjaTrader work with different instruments, sizes and positions. We start from how the MT4 version behaves and rebuild it for NinjaTrader.

Automatic conversionManual conversion at Nordman Algorithms
Starting pointOften the MQL syntax, statement by statementHow the MT4 version behaves
Platform differencesOften found later, if at allIdentified before work starts and agreed with you
Instruments and sizesMT4 symbols and lots copied as they areMatched to the NinjaTrader instrument, adapted if the market changes

Where unchecked conversions usually go wrong

  • Lots copied as contractsA size of 0.10 lots copied as a quantity of 0 or 1 contract changes the risk completely — the size has to be recalculated for the instrument.
  • Pips copied as ticksA 20-pip stop copied as 20 ticks is a different distance on a futures contract — distances have to be converted with the instrument’s tick size.
  • Signals on the wrong data seriesWith extra data series, NinjaScript runs the code for each series in turn; code that doesn’t check which series is updating acts on the wrong one.
  • Calculation mode switched without changesMoving from on-bar-close to on-each-tick changes when the code runs; logic not adapted to it fires signals at different times.
  • Entries and exits mismatchedAn MT4 EA that manages several trades separately needs each entry tied to its own exits; mapped wrongly, the strategy closes the wrong size or applies one stop instead of individual ones.
  • Trades at the wrong momentWhen a signal is calculated, when the order is sent and when it fills depend on the order type and settings on each platform; transferred wrongly, they shift entries and exits.

Have an MT4 EA or indicator you want in NinjaTrader?

Send it to us — we review it and give you a fixed price and timeline before work starts.

Discuss Your Project
Checking the result

How We Check the Converted Script

We run the MT4 original and the NinjaTrader version on the same timeframe, with matching trading sessions and bar timestamps, and compare them against acceptance criteria agreed with you:

  • Calculated values on selected bars
  • Signal timing — on which bar a signal appears, inside the bar or after it closes
  • Entry and exit conditions for strategies
  • Agreed deviations — differences accepted in advance, such as visual layout or broker-specific execution

If the instrument stays the same, we compare values and signal timing directly. If it changes — say, from a CFD to a futures contract — the data differ, so we check that the agreed rules are followed and the risk is recalculated correctly, rather than expecting identical values or trades. If something doesn’t match, we find the cause — price data, platform behaviour or the code.

What you receive

  • NinjaScript source code — the full code of the strategy or indicator
  • Everything needed to run it in NinjaTrader 8; we help with installation if you need it
  • Settings agreed with you before work starts
  • Fixes for bugs and differences from the agreed specification after delivery
Process

How an MT4 to NinjaTrader Conversion Works

  1. Send the MQL4 code

    Share the .mq4 source with its .mqh include files, the source of any custom indicators it calls and your .set file if you have one — plus a short description.

    You sendSource + dependencies
  2. Review and fixed quote

    We analyse the code, agree the NinjaTrader instrument and sessions — the same market or a new one — and agree settings, acceptance criteria, price and timeline.

    You getFixed price + criteria
  3. Rewrite in NinjaScript

    The EA or indicator is rebuilt as a NinjaScript strategy or indicator, including any extra features you asked for.

    We buildThe NinjaTrader version
  4. Check against the criteria

    The NinjaTrader version is checked against the acceptance criteria agreed in step 2.

    We checkValues, signals, trades
  5. Delivery and support

    Bugs and differences from the agreed specification are fixed after delivery.

    You getSource + files to run
Scope

What Affects the Price and Timeline

Every EA and indicator is reviewed before we quote. These are the main factors.

Size of the Code

How much logic the code contains and how many parts depend on each other.

Trade Handling

For EAs: how orders, positions, stops, scaling and partial exits are managed.

Instruments & Sessions

Which NinjaTrader instruments the strategy will trade — the same market or a new one — and the sessions and rollover they need.

Visual Elements

Objects, panels and dashboards drawn on the chart.

DLLs & External Libraries

Each dependency is checked: whether it can be used in NinjaTrader as it is or needs a replacement.

Only an .ex4 File?

Conversion needs the .mq4 source. Without it, recreating the EA or indicator from your description is assessed separately.

Alternative

Alternative to Full Conversion: Copy MT4 Trades to NinjaTrader

If your EA already works in MetaTrader 4 and you want its trades on a NinjaTrader account, you may not need a conversion at all.

Nordman Algorithms product

MT4 to NinjaTrader Trade Copier

Copies trades from your MetaTrader 4 account to NinjaTrader. Your EA keeps running in MT4.

  • Your EA keeps running unchanged in MT4
  • No conversion of your code needed
  • Included in the All-Access Subscription, with a 5-day free trial
View the MT4 to NinjaTrader Copier

Choose a conversion if

  • you want the strategy to run inside NinjaTrader on its own
  • you want to change or extend the logic in NinjaScript
  • you want to backtest it in NinjaTrader’s Strategy Analyzer

Choose the trade copier if

  • your EA already works well in MT4
  • you want to start trading in NinjaTrader without development
  • you keep developing your EA in MQL4
FAQ

MT4 to NinjaTrader Conversion — Common Questions

No. NinjaTrader runs NinjaScript, written in C#; MQL4 code — .mq4 or .ex4 — has to be rewritten.

Yes. The EA’s trading rules are kept and its trade handling is rebuilt for NinjaTrader — instrument, contract sizes, protective orders and position handling — with sizing and risk agreed with you.

If its logic suits the new instrument, yes. Sizes, price distances, trading sessions and contract rollover are adapted, and how the strategy behaves on the futures contract is checked against the agreed rules — a different market can give different results. If you stay on the same market, none of this is needed.

On the same market, values can come close but not always match exactly: your MT4 broker and your NinjaTrader connection provide different prices, and some built-in indicators are calculated slightly differently. If the instrument changes, identical values aren’t the goal — we check that the agreed rules are followed and the risk is recalculated correctly.

Yes, when trade management is written in the strategy’s own code: it then runs in NinjaTrader’s Strategy Analyzer for backtesting and optimisation. ATM strategies don’t run in backtests, so an ATM version is checked on a simulation account or in Playback.

Conversion needs the .mq4 source code. Without it, we can assess recreating the EA or indicator from your description, settings and examples of how it behaves — but an exact match with the original can’t be promised in advance.

No. Our developers write the NinjaScript version themselves, based on how the MT4 version behaves.

Yes. NinjaScript strategies and indicators can be rewritten in MQL4; parts that rely on NinjaTrader-only features, such as ATM strategies or futures-specific logic, are agreed before work starts. See our NinjaTrader to MT4 conversion page.

It depends on the size of the code, the trade handling, the instruments and sessions involved and any external libraries. After reviewing your .mq4 code we give you a fixed price and an estimated timeline before work starts.

Send Your MQL4 Code for a Quote

Share the .mq4 source code with its include files and the custom indicators it uses, and a short description of what it does and which instrument it should trade in NinjaTrader. We will review it and give you a fixed price and timeline before work starts.

Free Technical Assessment
Fixed Price Before Work
Source Code Ownership