- What is the formula to reduce Lot
- Problems in placing a simple order
- how to convert MarketInfo(Symbol(), MODE_MARGINREQUIRED) to mt5 version
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 ?
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 ?)
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).
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"
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use