Using MetaTrader with Collective2

If you use MetaTrader, you can automatically send your trades from your MetaTrader into a Collective2 trading system that you manage.

This means other people can "subscribe" to your trading system and pay you. Your subscribers can AutoTrade your system at any C2-compatible broker. They do not need MetaTrader, and they do not need to use a MetaTrader broker.

What is it?

The C2/MT Interface is software that you install on the same computer as your MetaTrader (MT).

What it's not

This is not meant to take C2 trade signals from other people's systems that you subscribe to here on C2, and then pipe them into your MetaTrader broker account. (In other words, this is not a "MT4 AutoTrade" product. Rather, this is a tool for people who want to offer their own trading system to the public, and who use MetaTrader to generate their buy/sell signals.)

If you are interested in using your MetaTrader account to AutoTrade other people's systems, you can learn more about AutoTrading here.

Two Ways to Connect your MetaTrader

There are two possible ways to send signals from your MT4 to Collective2. The first way is the most simple. You use an Expert Advisor on your computer called C2MT4Connector. The C2MT4Connector watches changes in your MT4 trading account and sends any changes it notices to your Collective2 trading system.

The second option is to modify your MT4 script using our Collective2 library. This allows you to send specific buy/sell actions to Collective2. This second method offers better performance and a higher level of control. It is relatively simple for people familiar with MT4 scripting.

Regardless of whether you want to use the Expert Advisor, or whether you want to call Collective2 functions directly from your script, the installation procedures are the same.

You can learn about Method #2 (Modifying your Scripts) here. But you still need to install the software, as described below, before you begin.

Installation

Now start your MetaTrader and set up the following configuration options.


Use C2MT4Connector Expert Advisor, open its properties and make sure you have set options "Allow DLL imports" and "Allow import of external experts":



Configuring the MT4 Expert Advisor called C2MT4Connector

  • Parameters

    • C2SystemID = the unique system id associated with your Collective2 trading system

    • C2Email = Email address you use to logon to Collective2

    • C2Password Your C2 Data Services password This is not the password you use to log in to Collective2. Learn about your C2 Data Services Password.

    • C2LotMultiplier = a value to multiply the lot size traded within MetaTrader prior to sending to Collective2. For example, if MetaTrader is trading in lots 0.10, a multiplier of 10 would tell Collective2 to trade 1 lot. A lot at Collective2 needs to be at least 1 and a whole number (i.e. no fractional or decimal portion).

    • C2MT4AccountID = MT4 account ID used for Collective2 trading. If you are going to use more accounts in MT4, this info prevents unexpected behaviour. (But it is a good idea to always stop C2MT4Connector before you will change an account ID in MT4.)

    • RoundDownLots = this will round down the above calculation so it will send thru to Collective2. Note that if this is set to true, your lots may not exactly match up.

    • SecondsBetweenPolling = the interval for the script to wait before examining your account to see if there is any trading activity. This can be any value, but the lower the value is, the more likely your Terminal may be locked up.

    • LockToChartSymbol = if this is set to true, only the symbol associated with the chart to which the EA is attached will be sent.

    • C2nterfaceHost = IP address or a host name where the Collective2 interface is running. Do not change. Used for customer help only.

Logging

Performed actions are logged to text files. You can find them in one of these directories:

- c:\Users\[YOUR LOGIN]\AppData\Local\VirtualStore\Program Files (x86)\MetaTrader 4\logs ( Where  [YOUR LOGIN]  is your Windows user name. )

- c:\Program Files (x86)\MetaTrader 4\experts\logs