PLease comment or send message if your have problem ...
hi ardi,
this is a very good job.
Can you change the lotsize=5 . Can you put 2% of AccountBalance() for every new open position.
lotsize=5 is all the time fixed, but instead of 5 lots you can put 2% of total money (AccountBalance() ).
After You do this, I have to ask You about something else .
God Bless You
i choose to calculate freemargin() for lotsize because of risk management. but you can change the code using AccountBalance() based :
change:
lots = NormalizeDouble(AccountFreeMargin()/lotsize/1000,LotsDigit);
with :
lots = NormalizeDouble(AccountBalance()/lotsize/1000,LotsDigit);
if you use percent based lotsize :
lots = NormalizeDouble(AccountBalance()*lotsize/100/1000,LotsDigit);
remember to change LotSize value
please use freemargin to calculate opening multiple position.... .. remember This juts Beta development .. use it for virtual account... i recomended that you learn carefully the code before you use it for real account ...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Order Management for EA development - Beta 1:
Author: ardiansyah