Request A Free Quote
NinjaTrader → MT4 Conversion

Convert NinjaTrader Strategies & Indicators to MT4

We rewrite NinjaScript strategies as MT4 Expert Advisors and NinjaScript indicators as MT4 custom indicators — rebuilding positions as MT4 order tickets, adapting sizes and sessions to your MT4 account, and checking the result against criteria agreed with you.

NinjaTrader Strategy to MT4 EANinjaTrader Indicator to MT4NinjaScript to MQL4Rewritten by Hand
3,000+ Projects Delivered
Fixed Scope & Price Before Work
.mq4 Source Code & .ex4 File
Checked Against Agreed Criteria
Overview

What NinjaTrader to MT4 Conversion Means

NinjaTrader to MT4 conversion means rewriting NinjaScript in MQL4: a NinjaScript strategy becomes an MT4 Expert Advisor and an indicator becomes an MT4 custom indicator. MT4 brokers mostly offer forex and CFDs, so the move often changes the market as well — for example from ES futures to a US500 CFD. If the instrument changes, trade sizes, price distances and sessions are adapted too.

From
NinjaScript (C#) on NinjaTrader 8
To
MQL4 on MetaTrader 4
Strategy
MT4 Expert Advisor
Indicator
MT4 custom indicator
You receive
.mq4 source code and .ex4 file
Method
Rewritten by hand, no automatic converters
Strategies

Convert a NinjaTrader Strategy to an MT4 Expert Advisor

A NinjaScript strategy and an MT4 Expert Advisor automate the same kind of trading, but they track positions, size trades and react to new data differently. Converting a strategy keeps its trading rules and rebuilds its trade handling for MT4.

Entries & Exits

Managed or unmanaged NinjaScript order logic is rebuilt with MT4 orders — including scaling in, partial exits, exits tied to specific entries by signal name, and reversals: a managed entry against an open position reverses it in NinjaScript, while in MT4 the EA closes the opposite tickets itself before opening the new one.

Positions & Order Tickets

MT4 keeps every entry as a separate order ticket, and the EA finds its own trades by magic number. Named NinjaScript entries are mapped to tickets with their own exits, and how the EA works alongside other EAs, manual trades and orders already open at start is agreed in advance — as are FIFO rules, if your broker applies them.

Contracts to Lots

Contract or unit sizing becomes lots for the MT4 symbol, rounded to its lot step and checked against your risk rules.

ATM Strategies

Trade management that relies on NinjaTrader ATM strategies — stops, targets, trailing and scaling out — is rebuilt as the EA’s own rules, since MT4 has no ATM strategies.

Instrument & Sessions

Each NinjaTrader instrument is matched to an MT4 symbol. If the instrument changes, the EA is adapted to its tick size, tick value and sessions in your broker’s server time. Since a trading hours template decides which data the chart uses, the RTH or ETH data set, bar and trading-day boundaries and session resets are checked too.

Calculation & New Bars

On-bar-close logic runs once per new bar. On-each-tick and on-price-change logic is rebuilt for MT4’s tick events — on-price-change with an explicit filter that skips updates at an unchanged price. An MT4 EA receives ticks only for its chart symbol, and ticks that arrive while one is being processed are skipped, so the agreed calculation mode is reproduced and intrabar behaviour is checked.

MT4 Strategy Tester results won’t match the Strategy Analyzer exactly: the platforms use different data — sometimes for a different instrument — and model fills differently, and the MT4 tester runs one symbol at a time on ticks modelled from 1-minute bars. We check that entries and exits follow the agreed rules. ATM-based logic doesn’t run on history in NinjaTrader, so its original behaviour is compared on Simulation or Playback.

Indicators

Convert a NinjaTrader Indicator to MT4

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

Calculations & Plots

Calculations are rebuilt in MQL4; plots become indicator buffers, and colours that change from bar to bar are drawn with separate buffers. Any visual differences are agreed in advance.

Custom Rendering

Charts drawn with SharpDX are redrawn with MT4 chart objects; the agreed information is kept and the look is agreed separately.

Additional Data Series

Extra data series become data read from other timeframes or symbols, keeping the original’s behaviour — from the forming bar or from confirmed bars only. MT4 has nine standard timeframes, so other periods are built from them.

Bar Types

Tick, range or Renko bars are built on an offline chart or in the code’s own calculation; for strategies, signals come from these bars while orders go to the broker’s real symbol. Volume bars need traded volume, which MT4 doesn’t provide — it shows tick volume — so building them from tick volume changes the original logic and is agreed separately.

Order-Flow Data

Indicators built on volumetric data need trade prices, volumes and trade direction. MT4 provides only tick volume, so such indicators usually can’t be rebuilt one to one; the closest approach is agreed before work starts.

Built-In Indicators & Alerts

Calls to NinjaTrader’s built-in indicators use MT4’s own indicators where their values match — otherwise we write the calculation — and alerts become MT4 alerts and notifications.

Platform differences

NinjaScript to MQL4: What Changes and How We Handle It

NinjaTrader and MetaTrader 4 trade different instruments and run 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

Futures, forex or stocks from your NinjaTrader connection

Mostly forex and CFDs from your MT4 broker

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

Trade size

Contracts or units

Lots, rounded to the symbol’s lot step

Sizes are recalculated for the MT4 symbol and checked against your risk rules.

Positions

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

A separate order ticket for every entry, found by magic number

We map each entry and its exits to tickets, and agree how the EA works alongside other EAs, manual trades and orders already open at start — and with FIFO rules, if your broker applies them.

Trading hours and time zone

The trading hours template and the platform time zone

Your broker’s server time and the symbol’s sessions

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

Calculation

Calculation mode per script: on bar close, on each tick or on price change

An EA reacts to ticks of its chart symbol; ticks that arrive while one is being processed are skipped

We reproduce the agreed calculation mode and check intrabar behaviour — for multi-symbol strategies, also how data for other symbols is read.

Bar types

Tick, volume, range, Renko and other bar types

Nine standard time-based timeframes; other bars through offline charts or code

We agree how non-time bars are built — and, for strategies, that signals use them while orders go to the broker’s real symbol.

Backtesting

Strategy Analyzer, with order fill resolution settings

Strategy Tester: one symbol at a time, ticks modelled from 1-minute bars

We agree the tester settings and history, so both backtests are compared on similar assumptions.

What may not carry over one to one

Some things depend on the platform itself: NinjaTrader add-ons and third-party indicators the code relies on need their source or a replacement; .NET libraries need an MQL4 equivalent or a DLL — MT4 is a 32-bit platform, so each is checked one by one; and order-flow data, which MT4 doesn’t provide. We point these out before work starts and agree the closest MT4 equivalent with you.

Why manual

Manual vs. Automatic Conversion

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

Automatic conversionManual conversion at Nordman Algorithms
Starting pointOften the C# code translated, statement by statementHow the NinjaTrader version behaves
Platform differencesOften found later, if at allIdentified before work starts and agreed with you
Positions and sizesContracts and signal names copied as they areRebuilt for MT4 lots and order tickets

Where unchecked conversions usually go wrong

  • Contracts copied as lotsOne contract copied as 1.0 lot is a different exposure — the size has to be recalculated for the MT4 symbol and its lot step.
  • Ticks copied as pointsA 10-tick stop copied as 10 points is a different distance — distances have to be converted with the symbol’s tick size.
  • Exits that lose their entryNinjaScript exits tied to named entries need their own ticket tracking in MT4, or they close the wrong trades or the wrong size.
  • Bar-close logic firing on every tickAn EA runs on every tick; logic written for on-bar-close fires many times per bar unless new bars are detected.
  • Stops rejected by the brokerMT4 brokers set a minimum stop distance and a freeze level; a stop placed closer, as NinjaTrader allows, is rejected or can’t be modified.
  • Opposite trades under FIFO rulesWith FIFO rules, a broker doesn’t allow opposite trades on one symbol and closes trades in the order they were opened; logic that expects otherwise fails.

Have a NinjaTrader strategy or indicator you want in MT4?

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 NinjaTrader original and the MT4 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 futures contract to a CFD — 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

  • .mq4 — full MQL4 source code
  • .ex4 — compiled file, ready to use in MetaTrader 4; 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 a NinjaTrader to MT4 Conversion Works

  1. Send the NinjaScript code

    Share the .cs files, any custom indicators or add-ons the code uses, and your strategy settings or ATM templates — plus a short description.

    You sendSource + dependencies
  2. Review and fixed quote

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

    You getFixed price + criteria
  3. Rewrite in MQL4

    The strategy or indicator is rebuilt as an MT4 Expert Advisor or custom indicator, including any extra features you asked for.

    We buildThe MT4 version
  4. Check against the criteria

    The MT4 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 get.mq4 + .ex4 files
Scope

What Affects the Price and Timeline

Every strategy 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 strategies: order methods, ATM-based management, positions, scaling and partial exits.

Bar Types & Data Series

Non-time bar types and additional data series the code relies on.

Custom Rendering

Charts drawn with SharpDX that need MT4 chart objects.

Add-Ons & Libraries

NinjaTrader add-ons, third-party indicators or .NET libraries the code uses — each is checked and replaced where needed.

Only a Compiled Assembly?

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

Alternative

Alternative to Full Conversion: Copy NinjaTrader Trades to MT4

If your strategy already works in NinjaTrader and you want its trades on an MT4 account, you may not need a conversion at all.

Nordman Algorithms product

NinjaTrader to MT4 Trade Copier

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

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

Choose a conversion if

  • you want the strategy to run inside MT4 on its own
  • you want to change or extend the logic in MQL4
  • you want to backtest it in the MT4 Strategy Tester

Choose the trade copier if

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

NinjaTrader to MT4 Conversion — Common Questions

No. MetaTrader 4 runs MQL4; NinjaScript code has to be rewritten.

Yes. The strategy’s rules are kept and its trade handling is rebuilt for MT4 — lots, order tickets, protective orders and any extra trade management — with sizing and risk agreed with you.

If its logic suits the new instrument, yes. Sizes, price distances and trading sessions are adapted, and how the EA behaves on the new instrument is checked against the agreed rules — a different market can give different results.

MetaTrader 4 has no ATM strategies. Trade management that relies on them — stops, targets, trailing and scaling out — is rebuilt as the EA’s own rules. Because ATM strategies don’t run on history in NinjaTrader, the original behaviour is compared on Simulation or Playback.

MetaTrader 4 charts use nine standard time-based timeframes. Tick, range or Renko bars can be built on an offline chart or in the code itself, and a strategy calculates its signals on these bars and places orders on your broker’s real symbol. Volume bars need traded volume, which MT4 doesn’t provide, so they are agreed separately.

On the same market, values can come close but not always match exactly: your NinjaTrader connection and your MT4 broker provide different data, 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, in the MT4 Strategy Tester, which tests one symbol at a time on ticks modelled from 1-minute bars. Results won’t match the Strategy Analyzer exactly — the platforms use different data and model fills differently — so we agree the tester settings and check that entries and exits follow the agreed rules.

Yes — that’s the reverse route, MT4 to NinjaTrader conversion. The same approach applies, with instruments, sizes and positions mapped the other way.

It depends on the size of the code, the trade handling, custom drawing, bar types and any add-ons the code relies on. After reviewing your NinjaScript code we give you a fixed price and an estimated timeline before work starts.

Send Your NinjaScript Code for a Quote

Share the .cs files with any custom indicators or add-ons they use, and a short description of what the strategy or indicator does and which MT4 symbol it should trade. 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