NEED HELP How to make multiply on Martingale on decimals

 

Hi i have dificulties how to make my marti code to multiply with decimals. I use this this NormalizeDouble but when i attach ea error comes up "Invalid Lots Amount OrderSend Function" but when i do backtesting its works fine

this is how i code

 OrderSend(Symbol(), OP_BUY,NormalizeDouble((Multiply*LastLots),2), Ask, Slippage, 0,NormalizeDouble((Ask+Tp_Marti*SetPoint),Digits), EAComment, MagicNumber);   
               ModifyTP();
               LastIsBuy=FALSE;
               return(0);

Please tell me whats wrong. Im new in coding

Documentation on MQL5: Trade Functions / OrderSend
Documentation on MQL5: Trade Functions / OrderSend
  • www.mql5.com
[in,out]  Pointer to a structure of MqlTradeResult type describing the result of trade operation in case of a successful completion (if true is returned). parameter are filled out correctly. If there are no errors, the server accepts the order for further processing. If the order is successfully accepted by the trade server, the OrderSend...
 

Its weird, when Im trying this EA with another MT4 on the same broker it doesnt shown that error. Then i try to attach on another broker it doesnt shows error.

But when i use this EA on MT4 that i use to use this EA (with previous verison of this EA) it always shows errors. 

FYI i have 3 MT4 on same broker with this EA on previous version. ALL MT4 shows errors.

ANother MT4 dont use EA, when i use this EA it fine


is that weird?

 
  1. Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?

  2. 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