OrderCalcMargin function

 
when i use OrderCalcMargin(ORDER_TYPE_BUY,Symbol(),1,SymbolInfoDouble(Symbol(),SYMBOL_BID),CalcMargin) function in XAUUSD return me 0.01 Why? 
 
Ali Gokay Duman:
when i use OrderCalcMargin(ORDER_TYPE_BUY,Symbol(),1,SymbolInfoDouble(Symbol(),SYMBOL_BID),CalcMargin) function in XAUUSD return me 0.01 Why? 

What is the value return by OrderCalcMargin() true or false ? If false what is the error ?

If true, where is placed this code, which broker-server ?

 
Alain Verleyen:

What is the value return by OrderCalcMargin() true or false ? If false what is the error ?

If true, where is placed this code, which broker-server ?

function return true. i m trying Alpari-Demo server and i think the problem is caused Alpari-Demo server. Because another server in metatrader5 result is different 

Thank you for your information (If true, where is placed this code, which broker-server ?)

 
Ali Gokay Duman:

function return true. i m trying Alpari-Demo server and i think the problem is caused Alpari-Demo server. Because another server in metatrader5 result is different 

Thank you for your information (If true, where is placed this code, which broker-server ?)

I confirm. I tried with an other broker and got a normal value (226.69 USD).
 
Alain Verleyen:
I confirm. I tried with an other broker and got a normal value (226.69 USD).

I still get true and 0.01 USD in Alpari-Ltd-Demo Server (XAUUSD). My code is placed in My EA's OnTick() function 

void OnTick()
  {
   double CalcMargin;
   bool   status;
   status=OrderCalcMargin(ORDER_TYPE_BUY,Symbol(),1,SymbolInfoDouble(Symbol(),SYMBOL_BID),CalcMargin);
   Print(status+" - "+CalcMargin);   
  }
result : "true - 0.01"
Reason: