Download MetaTrader 5
To add comments, please log in or register
Interested in MQL5 features? Find them in documentation!
Frédéric LEBRE
326
Frédéric LEBRE 2016.11.09 19:14 

Hi,

 

I want to know how many contracts i can take with my account.

If i use :  NormalizeDouble((AccountFreeMargin()/MarketInfo(NULL,MODE_MARGINREQUIRED)),0)

the answer is  (int)0.89, so less than 1 contract but i can buy 1 contract .

Why ? 

 

Thanks for your answers. 

whroeder1
14457
whroeder1 2016.11.09 19:17  
  • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
  • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip)
  • Do NOT use TickValue by itself - DeltaPerLot
  • You must normalize lots properly and check against min and max.
  • You must also check FreeMargin to avoid stop out
Frédéric LEBRE
326
Frédéric LEBRE 2016.11.09 19:56  

thanks but that is not what i ment.

i just want to know how to know the biggest number of contracts i can take with my account.

so if my account is 10.000 $ and required margin for 1 contract is 4.000 : 2 x 4.000 < 10.000

i think i can take 2 contracts but not 3.

if account free margin is < required margin, why can i take 1 contract ?

I thought that required margin for 1 contract must be < my free margin account. 

Alain Verleyen
Moderator
30640
Alain Verleyen 2016.11.09 23:24  
Frédéric LEBRE:

thanks but that is not what i ment.

i just want to know how to know the biggest number of contracts i can take with my account.

so if my account is 10.000 $ and required margin for 1 contract is 4.000 : 2 x 4.000 < 10.000

i think i can take 2 contracts but not 3.

if account free margin is < required margin, why can i take 1 contract ?

I thought that required margin for 1 contract must be < my free margin account. 

Print individual values and not only the quotient.
/
To add comments, please log in or register