Print your account equity so that you can check equity at the time of placing the trade
Show your code for OrderSend
Is there any other code that could change the value of Lot?
You also could simplify the code
double Lot = 0.00; double capital = AccountEquity(); if ( capital>= 10000.00) {Lot=0.1;} if ( capital<10000.00&&capital>= 9900.00) {Lot=0.2;} if ( capital< 9900.00&&capital>= 9800.00) {Lot=0.3;} if ( capital< 9800.00&&capital>= 9700.00) {Lot=0.4;} if ( capital< 9700.00&&capital>= 9600.00) {Lot=0.5;} | double capital = AccountEquity(); if ( capital < 9600.00) {double Lot=0.0;} else if ( capital < 9700.00) {Lot=0.5;} else if ( capital < 9800.00) {Lot=0.4;} else if ( capital < 9900.00) {Lot=0.3;} else if ( capital < 10000.00) {Lot=0.2;} else {Lot=0.1;} |
yes is better like this,thank you
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello,thank you for any help
sometime the calculation function go wrong,whats happens???? last bug is this one, my accountequity is "<10000.00&&>9900.00" my ea must open position of 0.2 lot,but it open position of 0.1 lot ???????
here is the code