MQL4: MODE_MARGININIT always 0

 

Hi,

Hope I am placing in the right place

My MODE_MARGININIT for different currency pairs is always 0, please help.


 Print("GBPUSD.s MODE_MARGININIT=", MarketInfo("GBPUSD.s",MODE_MARGININIT))  ; //returns 0

 Print("JPYUSD.s MODE_MARGININIT=", MarketInfo("JPYUSD.s",MODE_MARGININIT))  ; //returns 0


I tried restarting MT4, signing in and out, but no help. 

Thank you.

 
xxx12313:

Hi,

Hope I am placing in the right place

My MODE_MARGININIT for different currency pairs is always 0, please help.


 Print("GBPUSD.s MODE_MARGININIT=", MarketInfo("GBPUSD.s",MODE_MARGININIT))  ; //returns 0

 Print("JPYUSD.s MODE_MARGININIT=", MarketInfo("JPYUSD.s",MODE_MARGININIT))  ; //returns 0


I tried restarting MT4, signing in and out, but no help. 

Thank you.

this will be a value set by the broker, they don't  always do so.

 
Paul Anscombe #:

this will be a value set by the broker, they don't  always do so.

Hi Paul Anscombe,

Is there an alternative way to determine the margin? Perhaps we can manually calculate it?

My apologies if this is a basic question.

Thanks

 
Yes, margin can be calculated manually. Search the forum. It's been posted multiple times.