How to show on screen of total, sell, buy, Equity, Balance value?

To add comments, please log in or register
dlrkfka1028
16
dlrkfka1028  

Hi guys,

I would like to show value of total, sell, buy, Equity, Balance!

I tried to show AccountBalance using with AccountBalance(), but it shows default value of 10000, not my terminal showing value.

Is there another fuction to show them? like AccountBalance(), AccountEquity, something like that .

also is that right way to show how many orders open OrdersTotal()

I would like to show all each of them! 


      ObjectCreate("AccountBalance",OBJ_LABEL,0,0,0);

      ObjectCreate("AccountEquity",OBJ_LABEL,0,0,0);

      

      ObjectSet("AccountBalance",OBJPROP_XDISTANCE,2);

      ObjectSet("AccountBalance",OBJPROP_YDISTANCE,10);

      ObjectSet("AccountEquity",OBJPROP_XDISTANCE,2);

      ObjectSet("AccountEquity",OBJPROP_YDISTANCE,35);


      ObjectSetText("AccountBalance","Account Balance = "+AccountBalance(),15,"Arial",Red);

      ObjectSetText("AccountEquity","Account Equity   = "+AccountEquity(),15,"Arial",Red);

Thanks!

William Roeder
20208
William Roeder  
  1. When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your (original) post.
              General rules and best pratices of the Forum. - General - MQL5 programming forum
              Messages Editor

  2. You show us a snippit without context. Is the code in OnTick/OnCalculate, so it can update?

  3. OrdersTotal() is all orders, not just those on the current symbol.
To add comments, please log in or register