blouf:
yes it is.
Hi !
I don't get it, what's the variable profit for obtaining the profit value ? I thought it was a function that calculate the profit based on the opening, closing price & volume.
belido:
yes it is.
So what's the profit variable ?
yes it is.
blouf:
So what's the profit variable ?
This is the returned value with profit in your account currency.
So what's the profit variable ?
blouf:
So what's the profit variable ?
the profit variable is a variable name you choose where the result will be put in it.
So what's the profit variable ?
blouf:
that is also i am looking for advice in MQL5. In MQL4 potential lot size can be calculated by AccountFreeMargin()/MarketInfo(Symbol(),MODE_MARGINREQUIRED). And maximum lot for a broker can be calculated from MarketInfo(Symbol(),MODE_MAXLOT)
Ok thank !
May you know a function that tell max lot size buyable/sellable for the account ?
MqlTick tick; double margin; if(!SymbolInfoTick(Symbol(),tick) || !OrderCalcMargin(ORDER_TYPE_BUY,Symbol(),1.0,tick.ask,margin)) return; double maxLots=AccountInfoDouble(ACCOUNT_FREEMARGIN)/margin; printf("Margin =%f FreeMargin=%f Max lots to buy=%f",margin,AccountInfoDouble(ACCOUNT_FREEMARGIN),maxLots);
angevoyageur:
Thanks friend.
It works
and answering blouf, max lot (broker restriction)
SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX)
angevoyageur:
Thanks !
@belido : yep, just return the max buyable lots for the symbol, not for the current account

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
Hi !
I don't get it, what's the variable profit for obtaining the profit value ? I thought it was a function that calculate the profit based on the opening, closing price & volume.