Sie sind auf Seite 1von 1

TSD v1.1 TSD v1.

// Lot Management
/////////////////////////////////////////////////
// Lot Management
///////////////////////////////////////////////// If MM < -1 then
{
If MM < 0 then If FreeMargin < 5 then Exit;
{ LotMM = Floor(Balance*Leverage/1000);
LotMM = Round(Balance*Leverage/10000)/10; If LotMM < 1 then LotMM = 1;
If LotMM > LotMax then LotMM = LotMax; LotMM = LotMM/100;
If LotMM > LotMax then LotMM = LotMax;
}; };
If MM = -1 then
If MM = 0 then LotMM = lots; {
if MM > 0 then If FreeMargin < 50 then Exit;
LotMM = Floor(Balance*Leverage/10000);
{ If LotMM < 1 then LotMM = 1;
LotMM = LotMM/10;
LotMM = Round(Balance*Leverage/10000)/10; If LotMM > LotMax then LotMM = LotMax;
If LotMM > 1 then LotMM = ceil(LotMM); };
if LotMM < 1 then LotMM = 1; If MM = 0 then
If LotMM > LotMax then LotMM = LotMax; {
}; If FreeMargin < MarginChoke then Exit;
LotMM = lots;
Q&A: why does v.1 use Round and v.2 uses Floor };
– what is the difference? If MM > 0 then
Also v.2 uses the terms FreeMargin and the term {
MarginChoke – what are those for? If FreeMargin < 500 then Exit;
If you Round off the value 1.6 if will give you a LotMM = Floor(Balance*Leverage/100000);
result of 2, the nearest integer. If LotMM < 1 then LotMM = 1;
If you Floor the value 1.6 it will give you a result If LotMM > LotMax then LotMM = LotMax;
of 1, the lowest integer. };
FreeMargin & MarginChoke are used to determine
If you have enough margin in your account
otherwise the EA will not let you enter any trades.

Das könnte Ihnen auch gefallen