info_o_koncie_v1

Author: Copyright � 2009, Info-Trade
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 wartoœci rachunku.";
else  x="Obliczenie stosunku % miêdzy wolnymi œrodkami i rzeczywist¹ wartoœci¹ 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 dŸwignia : ", 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 supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---