Hello, I need a basic script for see my account leverage.
Sergey Golubev:
This is for MT5:
InfoAccount - script for MetaTrader 5
ImportantInformation - indicator for MetaTrader 5
MT4:
Personal Assistant - expert for MetaTrader 4Thank you very much for reply. I just add it in to scripts in MQL4 after i am draging the script to graph but nothings happen. Why it could be?
Files:
Screenshot_1.png
9 kb
ADEM KARATEPE:
This is EA (you should add it as an EA).
Thank you very much for reply. I just add it in to scripts in MQL4 after i am draging the script to graph but nothings happen. Why it could be?
//+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- Name of the company string company=AccountInfoString(ACCOUNT_COMPANY); //--- Name of the client string name=AccountInfoString(ACCOUNT_NAME); //--- Account number long login=AccountInfoInteger(ACCOUNT_LOGIN); //--- Name of the server string server=AccountInfoString(ACCOUNT_SERVER); //--- Account currency string currency=AccountInfoString(ACCOUNT_CURRENCY); //--- Demo, contest or real account ENUM_ACCOUNT_TRADE_MODE account_type=(ENUM_ACCOUNT_TRADE_MODE)AccountInfoInteger(ACCOUNT_TRADE_MODE); //--- Now transform the value of the enumeration into an understandable form string trade_mode; switch(account_type) { case ACCOUNT_TRADE_MODE_DEMO: trade_mode="demo"; break; case ACCOUNT_TRADE_MODE_CONTEST: trade_mode="contest"; break; default: trade_mode="real"; break; } //--- Stop Out is set in percentage or money ENUM_ACCOUNT_STOPOUT_MODE stop_out_mode=(ENUM_ACCOUNT_STOPOUT_MODE)AccountInfoInteger(ACCOUNT_MARGIN_SO_MODE); //--- Get the value of the levels when Margin Call and Stop Out occur double margin_call=AccountInfoDouble(ACCOUNT_MARGIN_SO_CALL); double stop_out=AccountInfoDouble(ACCOUNT_MARGIN_SO_SO); //--- Show brief account information PrintFormat("The account of the client '%s' #%d %s opened in '%s' on the server '%s'", name,login,trade_mode,company,server); PrintFormat("Account currency - %s, MarginCall and StopOut levels are set in %s", currency,(stop_out_mode==ACCOUNT_STOPOUT_MODE_PERCENT)?"percentage":" money"); PrintFormat("MarginCall=%G, StopOut=%G",margin_call,stop_out); }
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register