Main Settings
extern string ChannelID = "F5AC-11DB-BBA8" | |||
CopyTool uses ChannelID to build virtual bridge between master side and
slave side. So ChannelID is unique string value through CopyTool instance. Are you going to run another separate instance of CopyTool? Read "How to install another instance of CopyTool" topic located in installation.html file. |
|||
extern int Timer.msec = 1000 | |||
Timer.msec param defines a frequency of main script loop in
units of
milliseconds. Low values of the timer (0 - 500) can increase CPU usage with unsafe result. High values (10 000 - ...) can cause the slow processing of signals. We recommend you to avoid modification of this param exept you are experienced user only. Hint:
|
|||
extern bool MapSymbols = false | |||
true: read MapSymbolsFile and process symbol-to-symbol
mapping between master side and slave side. false: trade symbols provided by master side without any mapping. |
|||
extern string MapSymbolsFile = "MapSymbols.txt" | |||
MapSymbolsFile will help you to build symbol-to-symbol map in case
master and slave terminals have different names of symbols. There are 2 columns: source symbols for master side and destinition symbols for slave side. Case A:
|
|||
Lot Section
extern string
_LotType_format1__
= "[MS: Master] [FX: fixed] [BP: balance pcnt]"
extern string _LotType_format2__ = "[EP: equity pcnt] [FMP: free margin pcnt]" extern string _LotType_format3__ = "[MRT: martingale] [C: custom]" extern string LotType = "MS" |
|
LotType specifies the way of lot calculation on slave side. Valid LotType values are "MS", "FX", "BP", "EP", "FMP", "MRT", "C". |
|
extern double MS.LotRatio = 2.0 | |
MS.LotRatio used in case LotType = "MS".
Slave lot calculated as master lot multiplied by MS.LotRatio. Sample:
|
|
extern double FX.FixedLot = 0.1 | |
FX.FixedLot used in case LotType = "FX".
Slave lot is equal to FX.FixedLot. |
|
extern double
BP.BalancePcnt
= 10.0
extern double BP.BalanceBasis = 1000.0 |
|
BP.BalancePcnt and BP.BalanceBasis used in case LotType = "BP".
Slave lot calculated as AccountBalance()/BP.BalanceBasis * BP.BalancePcnt/100. Sample:
|
|
extern double
EP.EquityPcnt
= 15.0
extern double EP.EquityBasis = 1000.0 |
|
EP.EquityPcnt and EP.EquityBasis used in case LotType = "EP".
Slave lot calculated as AccountEquity()/EP.EquityBasis * EP.EquityPcnt/100. |
|
extern double
FMP.FreeMarginPcnt
= 20.0
extern double FMP.FreeMarginBasis = 1000.0 | |
FMP.FreeMarginPcnt and FMP.FreeMarginBasis used in case LotType = "FMP".
Slave lot calculated as AccountFreeMargin()/FMP.FreeMarginBasis * FMP.FreeMarginPcnt/100. |
|
extern double MRT.LotRatio = 2.0 | |
MRT.LotRatio used in case LotType
= "MRT".
CopyTool will increase lots volume after every loss so that the first win would recover all previous losses plus win some profit. Read more about martingale theory... Sample:
| |
extern double MinLot = 0.1 | |
Minimum permitted amount of a lot. |
|
extern double MaxLot = 5.0 | |
Maximum permitted amount of a lot. |
|
extern int LotDigits = 1 | |
NormalizeDouble function rounds calculated lot value to the given
precision. Set LotDigits = 1 for standard accounts (minimum lot is 0.1) Set LotDigits = 2 for mini accounts (minimum lot is 0.01) Sample:
|
|
Trade Params
extern int AccDigits = 5 | ||
Set AccDigits = 4 if your broker provides 4-digit quotes. Set AccDigits = 5 if your broker provides 5-digit quotes. ![]() ![]() |
||
extern bool MarketExecution = false | ||
true: two-steps open mode. (1) open new
order without sl and tp. (2) add sl and/or tp. false: standard one-step open mode. There are 3 kinds of execution - Instant Execution, Request Execution and Market Execution. Market execution forbids to set sl and tp with new order because open price is undefined. Instead, a market order should be placed and then a take profit and/or stop loss added to the position. |
||
extern string
_CopyMode_format__
= "[A: absolute] [P: pips]"
extern string StopLossCopyMode = "A" extern string TakeProfitCopyMode = "A" |
||
"A": absolute mode. sl and tp values will be copied from master side
as is. "P": pips mode. sl and tp values will be adjusted. (1) absolute values transformed to pips, (2) pips applied to calculate new sl and tp on slave side. Sample:
|
||
extern tern bool
OverwriteStopLoss
= false
extern int NewStopLoss = 200 |
||
true: use NewStopLoss as stoploss of open orders. false: ignore NewStopLoss, use stoploss from master side. |
||
extern bool
OverwriteTakeProfit
= false
extern int NewTakeProfit = 200 |
||
true: use NewTakeProfit as takeprofit of open orders. false: ignore NewTakeProfit, use takeprofit from master side. |
||
extern bool
OverwriteComment
= false
extern string NewComment = "" |
||
true: use NewComment as the comment of open orders. false: ignore NewComment, use the comment from master side. |
||
extern int RepeatN = 5 | ||
Slave terminal will repeat unsuccessful
OrderSend,
OrderModify,
OrderClose,
OrderDelete
commands RepeatN times. |
||
extern int Slippage = 3 | ||
Maximal allowed difference between the price on brokers side and the
price requested by trader, pips. Low values of Slippage will cause offten requotes. High values can be the cause of disadvantageous open price. 2-5 is optimal range. |
||
Filters
extern bool CheckMinMaxPriceDiff = true |
true: check minimal and maximal price difference between open price
on master side and market price on slave side. false: ignore minimal and maximal price difference. |
extern int
MinPriceDiff.StopLossSide
= 0
extern int MaxPriceDiff.StopLossSide = 1000 |
MinPriceDiff.StopLossSide and MaxPriceDiff.StopLossSide parameters
define Buy zone for Buy orders and Sell zone for Sell orders in
units of pips. Only
StopLoss side of orders takes part in check.
CopyTool waits while orders are not in Buy/Sell zone. Buy or Sell performed once an order gets to allowed zone. So this feature makes it possible to open an order at better price. |
extern int
MinPriceDiff.TakeProfitSide
= 0
extern int MaxPriceDiff.TakeProfitSide = 1000 |
MinPriceDiff.TakeProfitSide and MaxPriceDiff.TakeProfitSide parameters
define Buy zone for Buy orders and Sell zone for Sell orders in
units of pips. Only
TakeProfit side of orders is checked.
CopyTool waits while orders are not in Buy/Sell zone. Buy or Sell performed once an order gets to allowed zone. So this feature makes it possible to open an order at better price. ![]() |
extern bool CopyClose = true |
Orders on slave side can be closed by Close command from master
side, by StopLoss, by TakeProfit or manually. true: copy Close operation from master side. false: ignore Close operation from master side. |
Logs
extern bool LogMasterTrades = false |
Log information about open trades from master side. |
extern bool LogMasterHistoryTrades = false |
Log information about closed trades and cancelled orders from master
side. |
extern bool LogSymbolNotFound = true |
If a copied symbol not found in the market watch window on slave
terminal then a warning will be added to the log. |
extern bool LogOrderAlreadyCopied = true |
Log information in case an order already copied and closed but CopyTool trying to open this order second time. |
extern bool LogMinMaxPriceDiff = true |
Log information on MinMaxPriceDiff filter triggered. |
Labels
extern int
Timer.Corner
= 1
extern int Timer.X = 20 extern int Timer.Y = 20 extern string Timer.FontName = "Arial Narrow" extern int Timer.FontSize = 24 extern color Timer.FontColor = Gold |
A corner, horizontal and vertical position, font name, font size and
font color of Timer label object on MetaTrader chart window. Valid corner values are 0, 1, 2 or 3. ![]() |
extern int
Error.Corner
= 1
extern int Error.X = 20 extern int Error.Y = 60 extern string Error.FontName = "Arial Narrow" extern int Error.FontSize = 18 extern color Error.FontColor = Red= Red |
A corner, horizontal and vertical position, font name, font size and
font color of Error label object on MetaTrader chart window. Valid corner values are 0, 1, 2 or 3. |
extern tern int
About.Corner
= 3
extern int About.X = 20 extern int About.Y = 15 extern int About.dY = 14 extern string About.FontName = "Verdana" extern int About.FontSize = 9 extern color About.FontColor = Silver |
A corner, horizontal and vertical position, distance between rows, font name, font size and
font color of About label object on MetaTrader chart window. Valid corner values are 0, 1, 2 or 3. |
© 2005-2009 BJF Trading Group http:// www.iticsoftware.com |