I noticed that when the max lots size in the martingale management is reached, it continues to use the max size. If left alone, i figured that it would blow up the account.
So I changed the line :
if (lot>MaxMartingaleSize) { Print ("M-Martingale ",symbol_lot," lot size is higher than Max Martingale Lot Size. Changing it from ",lot," to ",MaxMartingaleSize); lot=MaxMartingaleSize; to:
if (lot>MaxMartingaleSize) { Print ("M-Martingale ",symbol_lot," lot size is higher than Max Martingale Lot Size. Changing it from ",lot," to ",MaxMartingaleSize); lot=S_Symbol_LS_0;
So that if it reaches the max, it would reset to the initial lot size. My concern is that I heard a poorly written (bad logic or "endless loops") EA can cause heaps of RAM to be used and slow down or crash MT4. Im planning to use 8 instances of this EA at the same time.
Question: Will this change in the EA code run smoothly? Was there a more simple way to do it?
Once again, thanks in advanced! Molanis is amazing and made it possible for me to make a fully automated ea.
|