Need assistance with Money Management

 

I'm trying to get my Expert Advisor to take the amount of recent loser, but add let's say $20 to obtain some level of profit. At this time its breaking even, which isn't a bad thing after a losing trade. But I'd like to see if I can push it further. Here is my code for the MM part: 

if(lastLot>0 && amountLoss_t<0)
     {

      Lots=lastLot+AddLot;
      if(Lots>0)
         Lots=round(Lots/SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP))*SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);


      if(Lots<SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN))
         Lots=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN);//{Lots=0;return(Lots);}// Print("No money for open");return(0);}
      if(Lots>SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX))
         Lots=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX);

      newTP=round(MathAbs(amountLoss_t)/S/Lots)+1;
     }
   else
      Lots=FixLot;

   return(Lots);
  }
 
ncollenburg: I'm trying to get my Expert Advisor to take the amount of recent loser,

Martingale, guaranteed to blow your account eventually. If it's not profitable without, it is definitely not profitable with.
          Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11

Why it won't work: Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11

 
William Roeder:

Martingale, guaranteed to blow your account eventually. If it's not profitable without, it is definitely not profitable with.
          Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11

Why it won't work: Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11

Thank you, I have studied martingale, and that is not what I am trying to accomplish with my EA. I have a few other items coded into my EA, like take profit daily goals to shut the EA off, also daily loss limits, as well as each trade uses a s/l. All of my back tests and even live trading with the expert proves it works. This was run in some of the worst market conditions during the height of the pandemic in Feb and March. 

I also figured out what I needed late last night after this post. I have declared a variable where it can be adjusted to market conditions or even set to break even. So it works for me. 

Again, thank you for sharing the martingale stuff, I dislike that with a passion.