0
Views
0
Downloads
0
Favorites
info_o_koncie_v1
//+------------------------------------------------------------------+
//| info_o_koncie.mq4 |
//| Copyright © 2009, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Info-Trade"
#property link "http://infotrade.efuturo.eu"
#property indicator_chart_window
extern string chose_language=" 0 - English, 1 - Polish ";
extern int language=1;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
string x;
double y,poz_depozytu_biez,StopOutLevel;
int z;
// Funkcja AccountStopoutLevel zwraca wartoæ poziomu po przekroczeniu, którego zamykane s¹ najbardziej stratne pozycje.
if (language==1)
{
if(AccountStopoutMode() != 0) x="Porównanie poziomu wolnych rodków do absolutnej wartoci rachunku.";
else x="Obliczenie stosunku % miêdzy wolnymi rodkami i rzeczywist¹ wartoci¹ rach.";
}
else
{
if(AccountStopoutMode() != 0) x="Comparing the level of free cash to the absolute value of the account.";
else x="Calculation of the percentage ratio between the free cash and the actual value of the account";
}
y=MarketInfo(Symbol(),MODE_MINLOT);
if (y==0.01) z = 100;
else
if (y==0.1) z = 10;
else
if (y==1) z = 1;
//switch (y)
//{case 0.01: z = 100;break;
//case 0.1: z = 10;break;
//case 1: z = 1;break;}
if (AccountMargin()!=0)
if (AccountBalance()<AccountEquity())
{poz_depozytu_biez=(AccountBalance()/AccountMargin())*100;}
else {poz_depozytu_biez=(AccountEquity()/AccountMargin())*100;}
if (AccountEquity()!=0)
if (AccountBalance()<AccountEquity())
{StopOutLevel = (AccountBalance()/AccountEquity())*100;}
else {StopOutLevel = (AccountFreeMargin()/AccountEquity())*100;}
if (language==1)
{
Comment(
"Adres serwera transakcyjnego : ", AccountServer(),"\n",
"Tryb StopOut : ", x,"\n",
"Aktualna dwignia : ", AccountLeverage(),"\n",
"Waluta w której prowadzony jest rachunek : ",AccountCurrency(),"\n",
"Saldo konta : ",AccountBalance(),"\n",
"Wartoæ konta : ",AccountEquity(),"\n",
"Minimalna wielkoæ pozycji : ",y,"\n",
"Dopuszczalny poziom StopOut : ", AccountStopoutLevel()," %","\n",
"Aktualny poziom StopOut : ",StopOutLevel," %\n",
"Aktualny poziom zabezpieczenia depozytu :",poz_depozytu_biez," %","\n",
"Wolne rodki (do wyp³aty/otwarcia pozycji) : ", AccountFreeMargin(),"\n",
"rodki zablokowane pod depozyt otwartych pozycji : ", AccountMargin(),"\n",
"Wymagany depozyt dla otwarcia nowej pozycji (MIN_LOT) : ", MarketInfo(Symbol(),32)/z,"\n",
"Minimalne obecne odchylenie od rynku (pips) : ", MarketInfo(Symbol(), MODE_FREEZELEVEL),"\n"
);
}
else
{
Comment(
"Account server : ", AccountServer(),"\n",
"StopOut mode : ", x,"\n",
"Actual laverage : ", AccountLeverage(),"\n",
"Currency for the account : ",AccountCurrency(),"\n",
"Account balance : ",AccountBalance(),"\n",
"Account equity : ",AccountEquity(),"\n",
"Min. position : ",y,"\n",
"Acceptable level of StopOut : ", AccountStopoutLevel()," %","\n",
"Actual level of StopOut : ",StopOutLevel," %\n",
"The current level of security deposit :",poz_depozytu_biez," %","\n",
"Free cash : ", AccountFreeMargin(),"\n",
"Cash locked for the current deposit : ", AccountMargin(),"\n",
"Deposit required for opening a new MIN_LOT position : ", MarketInfo(Symbol(),32)/z,"\n",
"Minimum deviation from the current market (pips) : ", MarketInfo(Symbol(), MODE_FREEZELEVEL),"\n"
);
}
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//----
RefreshRates();
init();
Sleep(13000);
//----
//----
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---