Opens in a new tab
Skip to content
Find my broker

MetaTrader 4 vs NinjaTrader for your currency strategy

With MetaTrader 4, you can run an MQL4 robot on your account’s feed. To test the same rules in NinjaTrader, identify the futures contract and feed, rebuild the logic in desktop NinjaScript and check when orders trigger.

You have a currency strategy running on your desktop and want to see whether it behaves the same way on another platform. For a MetaTrader 4 vs NinjaTrader comparison, write down what your strategy reads and what it asks the account to do. That gives you a way to tell whether a difference comes from the instrument, the prices or the order rules you rebuilt.

What to match in MetaTrader 4 vs NinjaTrader

Start with the exact symbol from MetaTrader 4 (MT4) and the futures contract you would use in NinjaTrader. Check the contract month, how much currency one contract represents and which prices your account can receive. If either the instrument or the price feed changes, record that before you compare the results of a historical test.

A symbol is the account’s identifier for the instrument. MT4’s Market Watch shows symbols from your account server, the bid and ask, and details such as contract size, volume step and trading sessions. The bid is the price at which buyers are quoting and the ask is the price at which sellers are quoting. The volume step is the smallest increment in order quantity. Write those details down for the actual symbol your robot uses.

A futures contract is an agreement with a standard size and an expiry. In NinjaTrader, record the exact currency contract and expiry, the size of one contract and the unit used to quote its price. An amount entered as a lot on your MT4 symbol and the same number entered as a count of contracts can represent different amounts of currency. Compare the exposure, meaning the amount of currency the order represents, before copying any quantity. The guide to risk and position sizing gives you more context for that check.

The table shows where your existing rules and order instructions fit on each platform.

Desktop strategy and order support
What you’re checking MetaTrader 4 NinjaTrader
Instrument and feed Forex symbols and prices from your account server Futures contract and expiry with the data your account can access
Strategy code MQL4 Expert Advisor compiled in MetaEditor C# NinjaScript on Windows desktop
Historical test MT4 Strategy Tester Standard or High historical fill resolution
Order instructions Market, buy limit, sell limit, buy stop, sell stop Market, limit, stop-market, stop-limit

For a NinjaTrader backtest, you need historical data for the contract and the strategy you want to test. Before placing a live order, check trading permissions and real-time data access for that contract. Check plan charges, commissions, exchange fees and clearing fees separately.

How to rebuild the order rules

In MT4, an Expert Advisor is a program that can submit orders according to rules you write in MQL4. You can compile it in MetaEditor and run it against historical prices in MT4 Strategy Tester. An MT4 buy stop triggers on the ask, and a sell stop triggers on the bid. The tester uses stored bid prices and models the ask using the spread, the gap between bid and ask. Record the spread setting before investigating a missing buy trigger. For a NinjaTrader futures test, implement the logic in desktop NinjaScript, which uses C#, and compare when each order becomes active and when it fills.

NinjaTrader offers futures trading on Web and Mobile as well as Desktop. For a strategy rebuild in NinjaScript, use the Windows desktop application.

If your robot sends an alert, record the condition and the action separately. An MT4 terminal alert can play a sound when the ask rises above a chosen price. A NinjaTrader Desktop chart alert can show a message or submit an order, depending on the action you select. For alerts written into the robot itself, have the strategy log when the condition is met. MQL4’s alert function stays silent in Strategy Tester, and NinjaScript’s alert function runs only in real time.

  1. Write the signal as a sentence. Name the source of the price, the side of the quote and whether the rule reads a completed bar or reacts to changes within that bar. A bar summarises prices over an interval. Match the start and end of the interval in the same time zone. MT4 labels a time bar by its opening time. NinjaTrader labels it by its closing time. After you convert both clocks to UTC, the MT4 hour starting at 02:00 UTC corresponds to the NinjaTrader hour ending at 03:00 UTC.
  2. Describe the order the signal creates. A market order seeks execution at the available price. A limit order sets the highest price you’ll pay to buy or the lowest price you’ll accept to sell. A stop-market order becomes a market order at its trigger. A stop-limit order becomes a limit order at its trigger and can remain unfilled. Write down which behaviour the rule needs, along with direction and quantity.
  3. Compare the first order that behaves differently. In each historical simulation, note the price and time that produced the signal, the order instruction the code sent, and what the test reports as triggered or filled. If the signals differ first, check the data and timing. If the signals agree and the fill differs, check the order instruction and how the test models execution.

If your rule uses a moving average, a line calculated from a series of prices, record which price it averages, how many bars it uses and which type of average it calculates. The guide to moving-average types explains the settings you’ll want to compare before inspecting orders.

What an hourly chart can tell you about the first trigger

An hourly bar shows the open, high, low and close for that hour. If two trigger levels sit between the low and high, those four prices can leave their order unresolved. You can check the problem on eight hourly EUR/USD bars from 5 February 2026, using prices in USD per EUR from a single MetaTrader 5 feed.

The bar starting at 02:00 UTC opened at 1.18031 and closed at 1.17849. It ranged from 1.17840 to 1.18048. Take 1.17844 as an illustrative lower trigger and 1.18039 as an upper trigger. Both sit within the bar’s range, on opposite sides of its open and close. A rule that acts on whichever level comes first could take a different action under either sequence.

Eight EUR/USD hourly bars on 5 February 2026. The 02:00 UTC bar contains both example levels, 1.17844 and 1.18039 USD per EUR. The lines show the low, close and high of each bar.

Hourly prices, source and example levels

The source is BrokerCheck’s MetaTrader 5 EUR/USD H1 data. H1 means one hour per bar. The table shows eight hourly bars on 5 February 2026. The feed’s server clock was two hours ahead of UTC that day, so each opening time below is the server time minus two hours. Low, Close and High are quoted in USD per EUR to five decimal places. The two example thresholds sit between the outer ends of the 02:00 UTC bar and its nearest opening or closing price.

EUR/USD H1 on 5 February 2026
Bar start (UTC) Low (USD per EUR) Close (USD per EUR) High (USD per EUR)
01:00 UTC 1.18014 1.18031 1.18076
02:00 UTC 1.17840 1.17849 1.18048
03:00 UTC 1.17821 1.17885 1.17904
04:00 UTC 1.17860 1.17870 1.17904
05:00 UTC 1.17837 1.17894 1.17897
06:00 UTC 1.17839 1.17898 1.17910
07:00 UTC 1.17897 1.17983 1.18028
08:00 UTC 1.17949 1.18022 1.18082

A chart drawn from completed bars makes the levels clear after the fact. It can’t show which level came first during the hour. The EUR/USD prices here illustrate that problem on one feed. If you rebuild the example on your MT4 symbol or a currency futures contract in NinjaTrader, check those levels against the prices from that instrument’s own feed.

How to tell whether your comparison holds

In NinjaTrader, the Standard setting for historical fill resolution models a path through each bar. For an hourly bar with the example’s prices, the open is nearer the high, so Standard would model a move to the high first. The actual sequence is unknown. High can use a finer series for simulated fills. It does not change when the strategy checks its signal. Tick Replay can replay price updates for a strategy written to use them. High fill resolution and Tick Replay cannot run together.

For a rule that only reads completed bars, start by comparing the signals on equivalent inputs. If the rule sends an order within the bar or reacts differently depending on which level comes first, compare the price sequence used for the fill as a separate step. More detailed history can help resolve that sequence where it covers the relevant prices. A simulated fill still tells you how the test handled the data. A triggered stop-limit may stay unfilled if execution would require a price outside its limit.

At the end of the exercise, you can label the result in your own records. A test of the same rules on a different contract tells you how those rules behave on that contract and feed. For a comparison of the two test environments on equivalent exposure, start with matched data and order instructions and work through any remaining difference one order at a time.

Sources — MetaQuotes, MetaTrader 4 Help (Market Watch, Order Types, Alerts and Strategy Tester), Algorithmic Trading and the MQL4 Reference. NinjaTrader, NinjaScript documentation, Help Guide (How Bars Are Built, Using Alerts, Historical Fill Processing and Tick Replay) and Pricing. CME Group, Euro FX Futures contract rules. BrokerCheck, MetaTrader 5 EUR/USD hourly prices.

Questions about MetaTrader 4 and NinjaTrader

Can you run your MT4 robot in NinjaTrader?

You have to rebuild its rules in NinjaScript on NinjaTrader’s Windows desktop application. Your MT4 robot is an Expert Advisor written in MQL4. Take its conditions, order types and quantity rules into the new test as a written specification, then compare the rebuilt behaviour with that specification.

Where do your MetaTrader 4 prices come from?

Your MT4 prices come from the server connected to your account. Use Market Watch to check the bid and ask for the exact symbol alongside its contract size and trading sessions. If you compare it with futures data, write the source of each quote beside the instrument and opening time.

Can you develop a NinjaScript strategy in your browser?

NinjaScript strategy development uses NinjaTrader Desktop on Windows. NinjaTrader Web and Mobile offer futures trading. When you need to move the logic of your robot, plan the rebuild and historical test around the desktop environment.

Does a stop-limit order fill as soon as it triggers?

A stop-limit order can remain unfilled after it triggers. The trigger activates a limit instruction, which sets the highest price you’ll accept for a buy or the lowest for a sell. Keep the trigger and the fill as two separate events when you read a test report.

Which level came first in the example candle?

The EUR/USD hourly bar that started at 02:00 UTC on 5 February 2026 doesn’t tell you which example level came first. Its high and low contain both thresholds, and the opening and closing prices leave room for either sequence. More detailed data for the same instrument could help you establish the order.

Keep reading

MetaTrader 5 Tips & Tricks for Desktop Traders

Best Guide On Trading Psychology

Supply and Demand Zones: How to Draw and Trade Them