METATRADER TO NINJATRADER TRADE COPIER

 


This is the user guide for 'MetaTrader to NinjaTrader ' Trade Copier.


This trade copier for 'MT4/MT5 -> NinjaTrader NT8' consists of two parts:

  • Trade signal transmit utility EA - 'MT4ToNinjaTrader' or 'MT5ToNinjaTrader'
  • Trade copier strategy app at NinjaTrader NT8 - 'MTNT8Copier'


Please note NinjaTrader uses 'netting' trade mode, i.e. LONG and SHORT trades cannot coexist.  Please ensure your MT4/MT5 account or trades operations follow this.



1. Install 'MT4ToNinjaTrader' or 'MT5ToNinjaTrader' 


Put “MT4ToNinjaTrader .ex4” or “MT5ToNinjaTrader.ex5” to \MQL4\Experts\ or \MQL5\Experts\ folder. 


At MT4 or MT5, “Menu” → “Tools” → “Options”, at below selection, click “Allow DLL Import” - as this EA needs network authentication for use.


Open any chart and attach this Signal EA to chart. At the first EA variable, please enter your license key



Please ONLY attach ONE MT Signal EA to ONE chart at ONE MT4/MT5 terminal.  It will scan all trade activities.  If you attach it to multiple charts, the copied signals will be at wrong order.


2. Back to NT8 side.  Please import this NT8 Copier Strategy to your NT8.


At NT8 'Control Center', select 'Tools' -> 'Import' -> 'NinjaScript Add-On'.  



Then select MTNT8Copier.zip'.  During this zip import, NT8 will pop up like below.  This copier needs to use your computer internal data interchange to synchronize data with that bridge app.  Please click 'OK' to proceed.




4. If you want to copy MT4/MT5 US500 trades to NinjaTrader's MES 03-25, open an MES 03-25 at NinjaTrader.  Right click the chart and select 'Strategies..'


At Strategies page, select and add Strategy 'MTNT8Copier' and then click apply.






5. NinjaTrader has more restrictions on multiple instruments from different brokers. 

If you want to copy trades to more than one instrument at NinjaTrader, open that instrument chart and apply this Copier strategy again. 

For instance, if you want to copy to NinjaTrader MNQ 03-25, open a new MNQ 03-25 chart with this Copier strategy.


6. Click 'Enabled' at Strategy page:  


PLEASE REMEMBER TO DO THIS STEP - OTHERWISE IT WON'T GET STARTED AT NINJATRADER.




7. This Copier strategy app also auto output the log messages to NinjaTrader 'NinjaScript Output' window.  For actual trade result, you could observe the order/position/log pages of NinjaTrader.




Please be aware - if you manually close any trades made by this strategy (or closed by ATM), NinjaTrader will auto stop the strategy operation.  This is the expected behavior of any NinjaTrader strategy operation.


Special Note: 

This copier was initially sold at MetaQuotes Market that requires 'file data exchange' method by default.  But this method will degrade data exchange efficiency if you attach copier bot on many NT8 charts (e.g. more than 3 charts).  If you need lower copy latency, there is an alternative data exchange method by computer internal memory that won't have this degrade issue.  To use this alternative method,

(a) download 'RelayBridge.zip' from 'Misc' subfolder of shared link

(b) unzip that zip file and run 'RelayBridge.exe' from unzipped folder

(c) set 'Use Relay Bridge?' variable of MT signal ea to true

(d) enable 'Use Relay Bridge?' variable of NT8 copier bot



MT4/MT5 signal EA variable instructions


1. Symbol map list - if NinjaTrader's instrument name is different with MetaTrader's, please input as below format (MT4/MT5's symbol name first, comma, then NinjaTrader's then semi-colon)

assume your MT4/MT5 symbol name is XAUUSD while NinjaTrader symbol full name is MGC 12-24 (i.e. micro gold futures of contract month 12/2024)

input

XAUUSD,MGC 12-24;

if two pairs,

XAUUSD,MGC 12-24;USTECH,NQ 12-24;


* NinjaTrader futures symbol full name should carry its contract month. You could get the exact symbol full name on NinjaTrader chart that you have opened.  That could vary among different futures brokers, e.g. MGC DEC24 or MESZ4


2. Lot multiplier list - NinjaTrader's lot is at least one and it should be integer.  It won't take the lot of 0.01 that should be multiplied in advance.

For instance, input

US500,1;US30,5;

If simply input

2

All trade lots at MT4/MT5 will be multiplied by 2.


3. Order magic number list - you could assign specific magic number for trade signaling.

For multiple magic, separate each with comma.

For instance, 3413434,1343292

Default is a blank string, i.e. applying on all trades.


Special reminder:

If you put your ea's magic number and want to limit the copy to it, e.g. magic number 3421243

Then MT4/MT5 signal ea will only scan orders with magic number = 3421243

Kindy be aware MT4/MT5 manual order's magic number is 0.

If you want to have that signal ea cover BOTH manual orders and your own ea orders, it should be set like

0,3421243

i.e. include 0 at magic number list


4. Applicable symbol list - you could restrict to specific symbol/instruments.  Separate each with comma, e.g. EURUSD,XAUUSD,USOIL

Default is a blank string, i.e. applying on all symbols.


5. Applicable comment list - you could restrict to specific order comment.  Separate each with comma.


6. Reverse trade - if setting true, it will reverse the trade signal to NinjaTrader. 

For instance, a LONG trade will be signaled as a SHORT trade.


7. Session time - default is from 00:00-24:00


8. Alert and panel settings - that should be self explanatory.


9. If you have two more MT4/MT5 inside one computer to send trade signals to NinjaTrader, you could set 'Copy group id string' variable (e.g. ABCD, LONDON, INST) at MT4/MT5 signal EA.  At NinjaTrader side, set the same string texts at NinjaTrader Copier's 'Copy group id string' as well.  Then this MT4/MT5 and NinjaTrader will become a specific copy pair. 


10. Lot mode option.  Default is to use MetaTrader trade lot size.  Another is to use the fixed lot size.  If this option is selected, please also set 'Fixed Lot' variable.

It will later multiply the lot multiplier (if applicable) before sending to NinjaTrader.


11. 'Copy TP/SL Prices'


Default is disabled.  MT4/MT5 signal ea will send market order close to NT8 if MT4/MT5 order hit its TP/SL price.  This is the recommended copy behavior.


If you want to copy MT4/MT5 order TP/SL prices, you could enable this variable.


'Copy TP/SL price mode'


there are two modes: by price distance and by actual price.


Default is 'by price distance'.  NT8 copier bot will calculate MT4/MT5 order TP/SL price distance to its open price and apply this distance on the actual NT8 order open price.


Most CME futures instruments have different price tick value vs. MT4/MT5's.


For instance, ES or NQ has 0.25 tick value while most MT4/MT5 SP500 or NAS uses 0.01 tick.

An MT4/MT5 SP500 TP price, say, 5640.38, will be converted to 5640.50 to be used at NT8 TP/SL order entry.  There will be some minor price differences due to this conversion.


Not recommended to use 'by actual price' mode as there is significant price deviations between MT4/MT5 & NT8 futures instruments.


'No close signals if that dealt order hits TP/SL prices'

Default is disabled.  If MT4/MT5 order gets closed by hitting its TP/SL prices at MT4/MT5, that signal  ea will send out market order close request to NT8 copier bot.  This is recommended as that will be better to keep both sides' order integrity.

If it's enabled, the signal ea won't send out the order close request to NT8 if MT4/MT5 order gets closed by hitting its TP/SL.  Some customers prefer letting NT8 orders hitting its TP/SL at NT8 side.  It's up to your discretion to enable this option or not.


- Please be aware NT8 will cancel NT8 copied TP/SL orders if that copier bot is exited and restarted.  That is the expected behavior of NT8 strategy.

- No support for Limit/Stop order copy: This signal ea will send market order entry request to NT8 copier bot when MT4/MT5 limit/stop order gets fulfilled.


12. Enable partial close signals - default is true.  Partial close signal will be sent to NT8 copier. Partial close feature is only applicable if 'Use MetaTrader Trade Lot Size' lot is selected. If you don't want the partial close signal feature, please disable 'Enable partial close signals' option at MT4/MT5 signal EA side.


13. As there are great variations of customer custom needs of control or filter requirements, this copier use the alternative approach to accommodate.

If enable "Enable Hold-Up Feature?" variable (default is false), MT4/MT5 signal EA will keep checking whether MT4/MT5 global variable named 

NTCOPYDISABLE

is 1 or not.  If that equals 1, MT4/MT5 signal EA will hold up.  It doesn't equal or that global variable is not set, MT4/MT5 signal EA will keep running.

You could self write (or hire a developer) to write an EA or indicator to set value to that global variable with your own control/filter logics.


=====


Setup example for multiple NinjaTrader accounts to copy:


> If your multiple NinjaTrader accounts are taking the *same* copy setup from MetaTrader side


assume you want to copy MT5 EURUSD to NinjaTrader '6E MAR25' of different accounts


 To copy to more accounts, please use Relay Bridge approach that will be faster

Unzip RelayBridge.zip

Run RelayBridge.exe from unzipped folder


- At MT5 side, open one MT5 charts of any symbol.  *One* signal ea can serve multiple NinjaTrader copier bot.

Attach MT5 signal ea

Set EURUSD,6E MAR25; at MT5 signal ea's 'Symbol Mapping List' variable

Set EURUSD,1; at MT5 signal ea's 'Lot Multiplier List' variable

Set 'Use Relay Bridge?' variable as true at both signal ea


- At NinjaTrader side, open multiple 6E MAR25 charts

Attach MTNT8Copier bot to each chart and select different NinjaTrader accounts.

Enable each copier bot at 'Strategies' window



> If your multiple NinjaTrader accounts are taking the *different* copy setup from MetaTrader side


Assume you want to copy MT5 EURUSD to one NinjaTrader account DEMO12345 with lot multiplier 1 and to another NinjaTrader account DEMO98781 with lot multiplier 2.  

NinjaTrader EURO futures symbol name is '6E MAR25'.


- To copy to more accounts, please use Relay Bridge approach that will be faster

Unzip RelayBridge.zip

Run RelayBridge.exe from unzipped folder


- At MT5 side, open two MT5 charts of any symbol

Attach MT5 signal ea to each chart

Set EURUSD,6E MAR25; at 'Symbol Mapping List' variable of both signal ea

> Set EURUSD,1; at first MT5 signal ea's 'Lot Multiplier List' variable

> Set an unique string, e.g. London, at 'Copy Group ID String' variable of first MT5 signal ea

> Set EURUSD,2; at second MT5 signal ea's 'Lot Multiplier List' variable

> Set an unique string, e.g. PARIS, at 'Copy Group ID String' variable of second MT5 signal ea

Set 'Use Relay Bridge?' variable as true at both signal ea


- At NinjaTrader side, open two 6E MAR25 charts

Attach MTNT8Copier bot to each chart

Set London at first copier bot's 'Copy Group ID String', enable 'Use Relay Bridge?', and select account DEMO12345

Set Paris at second copier bot's 'Copy Group ID String', enable 'Use Relay Bridge?', and select account DEMO98781

Enable both copier bot at 'Strategies' window










Popular posts from this blog

FREE EVALUATION WITH LIMITED SYMBOLS

TRADE COPIER USER GUIDE LIST