Copying Trades From Master Terminal To Client Terminals

Discussion in 'MetaTrader' started by wj2000, Mar 13, 2009.

  1. Generally you should perform the following actions step by step.
    1) Copy files.
    2) Tune parameters of the scripts.
    3) Tune ini file settings.
    4) Run client terminal (terminals)
    5) Run master terminal.

    //-------------------
    // Copy files
    //-------------------
    There are 7 files.
    1) mt4dde2_ms.mq4 - copy to experts/scripts folder of your master terminal.
    2) mt4dde2_ńs.mq4 - copy to experts/scripts folder of your client terminal (terminals).
    3) mt4m.ini - copy to a separated folder.
    4) mt4c.ini - copy to a separated folder.
    5) IniFile.dll - copy to experts/libraries folder of master terminal and all the client terminals.
    6) mt4m.dll - copy to experts/libraries folder of master terminal.
    7) mt4c.dll - copy to experts/libraries folder of all the client terminals.

    //-------------------
    // Tune parameters of the scripts
    //-------------------
    1) Define mt4m.ini path for mt4dde2_ms script.
    2) Define mt4c.ini path for mt4dde2_cs script.

    //-------------------
    // Tune ini file settings
    //-------------------
    mt4m.ini
    [Main]
    Timer=1000
    Root=D:\MT4\mc

    [Main]
    Timer - TimeOut value between the each iteration of master script, milliseconds
    Root - Path to an exchange folder. The path to exchange folder should be the same
    for mt4m.ini and mt4c.ini. So at first do create Root directory.

    mt4c.ini
    [Main]
    Timer=1000
    Root=D:\MT4\mc
    MasterAcc=198238
    [Orders]
    Slippage=3
    MaxDeviation=20
    MaxTimeDiff=180
    [MM]
    FixedLot=yes
    Lots=0.1
    kLot=1

    [Main]
    Timer - ...
    Root - ...
    MasterAcc - Number of account working on Master terminal. So Copy Tool supports
    one or more master accounts and one or more client accounts working at the same time.

    [Orders]
    Slippage - the maximum allowable slippage in points
    MaxDeviation - the maximum allowable deviation between the order's open price of master account and
    the current price of client account in points
    MaxTimeDiff - the maximum allowable deviation between the order's open time of master account and
    the current time of client account in seconds
    So MaxDeviation is useful for fast-moving market.
    MaxTimeDiff is useful when client terminal running later on master terminal.

    [MM]
    FixedLot - use fixed Lots value yes/no
    Lots - fixed Lots value
    kLot - use kLot*lot value when FixedLot is false

    //-------------------
    // Run client terminal (terminals)
    //-------------------
    Use drag-and-drop technology or attach mt4dde2_ńs script to any chart.
    The main rule is you should attach only one script per terminal.
    A symbol on the chart maybe arbitrary and a period maybe arbitrary.
    Allow DLL imports.
    Allow import of external experts.
    After attaching of mt4dde2_ńs the timer should appear in the upper left corner of the chart.

    //-------------------
    // Run master terminal
    //-------------------
    Use drag-and-drop technology or attach mt4dde2_ms script to any chart.
    The main rule is you should attach only one script per terminal.
    A symbol on the chart maybe arbitrary and a period maybe arbitrary.
    Allow DLL imports.
    Allow import of external experts.
    After attaching of mt4dde2_ms the timer should appear in the upper left corner of the chart.

    Now you may open new orders using master terminal.
    All the orders will be repeated on client terminal (terminals).

    PS.
    1) Do not login/change symbol or period of the chart when mt4dde2_cs/mt4dde2_ms script running.
    2) See the Journal of your terminal to detect any error messages.

    ENJOY!!!
    下载地址:
    http://www.forexfactory.com/showthread.php?t=129924
     
  2. 谢谢wj2000