Hi Guys,
Does anyone know a workaround for creating a martingale EA that uses a multiplier of less than 2?
Currently when I put 1.25 in the multiplier field the EA will only trade with 1x the lots regardless of the number of trades in the loop.
Ideally I need a way to make the 1.25 multiplication accumulate on past trades, see below;
How i'd like it to trade
Initial trade; 0.01, 2nd trade 0.01, 3rd trade 0.02, 4th trade 0.02, 5th trade 0.02, 6th trade 0.03
How it trades
Initial trade; 0.01, 2nd trade 0.01, 3rd trade 0.01, 4th trade 0.01, 5th trade 0.01, 6th trade 0.01
I do have some code code from a previous EA - does anyone know where this could be entered to get the desired result?
Massive thanks to anyone that can help!
Cheers!
This is the code that may help - My skills are very limited so dont know where to start with it.
Calculate_Lot = NormalizeDouble(Order_Size,LotDigits) ;
if(NormalizeDouble(Order_Size,LotDigits)<minlot)
{
Calculate_Lot = minlot ;
}
if(Calculate_Lot>maxlot)
{
Calculate_Lot = maxlot ;
}
if(Multiplier<1.5)
{
if(bs<20)
Calculate_Lot = NormalizeDouble(Calculate_Lot * MathPow(Multiplier,bs),LotDigits) ;
else
Calculate_Lot = NormalizeDouble(buylots * Multiplier,LotDigits) ;
if(Calculate_Lot>maxlot)
{
Calculate_Lot = maxlot ;
}
if(Calculate_Lot<minlot)
{
Calculate_Lot = minlot ;
}
}
else
if(Multiplier>=1.5)
{
if(bs > 0)
{
Calculate_Lot = NormalizeDouble(buylots * Multiplier,LotDigits) ;
}
if(Calculate_Lot>maxlot)
{
Calculate_Lot = maxlot ;
}
if(Calculate_Lot<minlot)
{
Calculate_Lot = minlot ;
}
}
return(Calculate_Lot);
}