I did not test this. Please check this documentation page.
double maxLots(ENUM_ORDER_TYPE order) { ResetLastError(); double vol_step=SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP); double lots=SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN); while(AccountFreeMarginCheck(Symbol(),order,lots)>0 && GetLastError()!=134) lots+=vol_step; return lots-vol_step; }

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,
I am not taking Stop Out Level, Risk Percentage or Stop Loss into the consideration, The maximum lot size i can take in my account with Account Balance.
While calculating the Lot size one major problem is
Forex = 100000 Unit
Gold = 100 Unit
Silver = 1000 or Maybe 5000 Unit
Similarly for Stock, it changes.
Which method is accurate one? I feel Margin Required will be more accurate but even with Margin requires i find error like "Not Enough Money".
Using Margin Required
Using Mode_LotSize :
Using TickSize :
Using Point :