NINJATRADER TO METATRADER TRADE COPIER
This is the user guide for 'NinjaTrader to MetaTrader' Trade Copier
Quick Note:
This copier only copies position change event from NinjaTrader. That means TP/SL prices or limit/stop orders won't be copied. However, this signal bot will send out market order entry if that NinjaTrader limit/stop order gets fulfilled - or send market order close if that NinjsTrader order get closed by hitting its TP/SL prices.
However, at MT4/MT5 copier ea side, there are a number of TP/SL, trailing, breakeven features that you could apply at copied trades.
This trade copier for 'NinjaTrader NT8-> MT4/MT5' consists of two parts:
- Trade copier EA 'NT8ToMT4' or 'NT8ToMT5' at MT4/MT5
- 'NinjaTrader NT8 Trade Signals' bot - 'NT8TradeSignals'
1. Install MT4 or MT5 copier EA.
Put “NT8ToMT4.ex4” or “NT8ToMT5.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 license check through network.
Open any chart and attach this Copier EA to chart. At the first EA variable, please enter your license key.
3. Please remember to enable 'auto trading' at MT4 or MT5. That button is located at MT4/MT5 tool bar. MT5 auto trading button is called 'Algo Trading'.
> Please ONLY attach to ONE MT4/MT5 chart and ONE NinjaTrader chart - otherwise copy performance will be degraded. This copier design can accommodate multiple symbol trades simultaneously. If you want several copier pairs, please refer to 'Copy Group ID String' setting section below.
4. At NinjaTrader side, please import 'NT8TradeSignals.zip'.
> how to import: At NT8 'Control Center', select 'Tools' -> 'Import' -> 'NinjaScript Add-On'.
This 'bot' is made by NT8 indicator format. After import, you can find it at NT8 indicator list.
The reason to make this 'bot' by indicator approach is to allow users to make manual trades as well as ATM strategy. If this 'bot' is made by NT8 strategy approach, those activities will hold it up.
5. Open any chart and attach this 'NT8TradeSignals' and input your NT8 account name at the first variable:
It will also show the latest position info of your NT8 account at chart lower right corner:
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 ea on many MT4/MT5 (e.g. more than three MT4/MT5). 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 copier ea to true
(d) enable 'Use Relay Bridge?' variable of NT8 signal bot
6. As most NT8 symbol names differ with MT4/MT5, it's essential to set up 'Symbol Mapping List' variable at MT4/MT5 copier side.
Below are the variable explanations of MT4/MT5 copier EA:
- Symbol mapping list - If your NinjaTrader symbol name differs with MT4/MT5's, please set this mapping variable.
Format:
MetaTrader symbol name
comma
NinjaTrader symbol name
semi-colon
e.g.
US500,MES 09-23;
if for 2 pairs,
US500,MES 09-23;US30,MYM 09-23;
* Please use the complete NT8 symbol with contract month, e.g. MES 09-23
- Lot option - 2 options to choose: 'Follow NinjaTrader Trade Lot' and 'Fixed Lot'. default is 'follow' mode.
If 'fixed lot' mode is selected, the copier ea will use 'fixed lot' variable as signal lot size for order entry and close copy.
The lot size will be further multiplied by 'Lot Multiplier List' as mentioned below.
- Lot Multiplier List
This variable is applicable to both 'lot follow' and 'fixed lot' mode. Default is 1.
It can be set with any numeric value, e.g. 1, 2, 0.5, 0.01.
For instance, if set as 0.5, NinjaTrader order lot will be multiplied with 0.5 to MetaTrader.
The lot multiplier can be specified by symbols.
Format: MetaTrader symbol name, comma, lot multiplier, semi-colon
For instance,
US500,0.1;XAUUSD,0.2;
The copied lot to MetaTrader US500 will be multiplied by 0.1
and to XAUUSD to be multiplied by 0.2
- Applicable symbol list - if you want to restrict the trade copy to certain symbols, please add MetaTrader symbol name plus comma. For instance, XAUUSD,US30
- Reverse trade - reverse any trade from NinjaTrader. if enabled, MT4/MT5 side will place SHORT trade if NinjaTrader has a LONG trade.
- Order magic number - order identification for those trades placed by this copier ea.
- Each order's take profit & stop loss in point - default is zero - that means this feature is disabled. unit is in point.
- Each symbol's take profit & stop loss in $ - default is zero - that means this feature is disabled. it calculates each symbol's trades profit or loss in $.
- Total take profit & stop loss in $ - default is zero - that means this feature is disabled. it calculates all trades profit or loss in $. kindly note all above mentioned profit & loss calculations are limited to the same magic number set at this EA.
- Trailing stop and Breakeven - defaults are disabled. If enabled, EA will use its profit start and moved point to set. Trailing stop will keep moving stoploss price if more profits are gained - while Breakeven just moves stoploss price once.
Copy Group ID String -
If you have two more NT8 accounts to send signals to MT4/MT5, you could set 'Copy Group ID String' variable (e.g. ABCD, LONDON, INST) at MT4/MT5 copier EA. At NT8 side, set the same string texts at 'Copy group id string' variable as well. Then this MT4/MT5 and NT8 will become a specific copy pair.
----
One signal 'master' can serve multiple copier 'followers'.
If you want to use another NT8 accounts, that means it will require to set up the second signal 'master'.
1. Open another NT8 chart
2. Attach that NT8 signal bot on that new NT8 chart
3. Input different NT8 account name and write a string at 'Copy Group ID String' variable (e.g. PARIS)
4. at MT4 or MT5, open another MT4 or MT5 chart
5. Attach that MT copier ea on that chart
6. Input the same string at copier ea's 'Copy Group ID String' variable (e.g. PARIS)
7. Set a different order magic number at copier ea. Please also set 'symbol mapping list' at that copier ea
If you have third or 4th NT8 account, repeat above steps with different 'Copy Group Id String' at NT8 & MT4 copier side. And also assign different 'order magic number' at that copier ea.
- 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 copier EA will keep checking whether MT4/MT5 global variable named
NTMTCOPYDISABLE
is 1 or not. If that equals 1, MT4/MT5 copier EA will hold up. It doesn't equal or that global variable is not set, MT4/MT5 copier EA will keep running.