MQL4 - automated forex trading   /  

Forum

Open position using whole free margin

Back to topics list To post a new topic, please log in or register

avatar
2
freak 2006.04.04 14:21 
Hello guys,

I've tried this way:
double acFree = AccountFreeMargin(); int acLev = AccountLeverage(); double maxVol = ((acFree*acLev)/Ask)/10000; int ticket=OrderSend(Symbol(),OP_BUY,maxVol,Ask,3,0,0,"expert comment",255,0,CLR_NONE);


but never whole margin is used - always 3-8% of margin remain unused.

How to make it?
Back to topics list  

To add comments, please log in or register