Download MetaTrader 5
To add comments, please log in or register
Create interesting Forum topics concerning the automated trading!
MetaQuotes Software Corp.
MetaQuotes Software Corp. 2009.07.14 10:06 

Order Management for EA development - Beta 1:

this is ordersend management expert advisor script.

Author: ardiansyah

ardiansyah 2009.07.16 12:07  

PLease comment or send message if your have problem ... 

MQL4 Comments
MQL4 Comments 2009.07.17 21:31  

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

ardiansyah 2009.07.18 10:12  

i choose to calculate freemargin() for lotsize because of risk management. but you can change the code using AccountBalance() based :


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

To add comments, please log in or register