Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello Every one ,
I am not good MQL4 , Please help me .I want to open this order :
double Maxlot = 100; //
double Lot = AccountBalance/10,000 ; ///
CASE 1 : example my balance = 900,000 USD , then Lot = 900,000/10,000 = 90
If ( Lot < Maxlot ) ===> Sendorder () with lotsize = Lot = 90 .
CASE 2 : examle my balance growth to 2,500,000 USD , then Lot = 2,500,000/10,000= 250
Because Maxlot is 100 . I can not open a position with lotsize = 250 .
So then I want to open 2 position with lotsize = 100 , and 1 position with lotsize = 50 .
If ( Lot > Maxlot ) //
Order 1 = Sendorder () with lotsize = Lot = 100 .
Order 2 = Sendorder () with lotsize = Lot = 100 .
Order 3 = Sendorder () with lotsize = Lot = 50 .
----------------------------------------------
CASE 3 : examle my balance growth to 5,500,000 USD , then Lot = 2,500,00/10,000= 550
If ( Lot > Maxlot ) //
Order 1 = Sendorder () with lotsize = Lot = 100 .
Order 2 = Sendorder () with lotsize = Lot = 100 .
Order 5 = Sendorder () with lotsize = Lot = 100 .
Order 4 = Sendorder () with lotsize = Lot = 100 .
Order 5 = Sendorder () with lotsize = Lot = 100 .
Order 6 = Sendorder () with lotsize = Lot = 50 .
-----------------------------------------------------------
Please help , Thank all !