Martingala no después de la primera perdida sinó después de X perdidas. Code: int MartingaleFactor() { int counter=0; int histotal=OrdersHistoryTotal(); if(histotal>0 && OrderSymbol()==Symbol() && OrderMagicNumber()==Magic) { for(int cnt=X;cnt>=1;cnt--) { if(OrderSelect(histotal-cnt,SELECT_BY_POS,MODE_HISTORY) && OrderProfit()>=0)continue; if(OrderSelect(histotal-cnt,SELECT_BY_POS,MODE_HISTORY) && OrderProfit()<0)counter++; } } if(counter==X)LotsFactor=LotsFactor*Multiplier;else LotsFactor=InitialLotsFactor; if(LotsFactor<=0) { LotsFactor=1; } return(LotsFactor); }