Exp-StatusBar v29.08.09

Download script
Author: Copyright � 2009, expforex
Exp-StatusBar v29.08.09

Overview

This script is a comprehensive dashboard for the MetaTrader 4 platform designed to provide traders with a real-time visual summary of their account status, market conditions, and specific currency performance. Instead of cluttering the main chart with multiple separate windows, it consolidates critical data into a structured "Status Bar" or informational panel.

Key Functionalities

1. Account & Balance Monitoring

The script pulls live data from your trading account to display essential metrics at a glance:

  • Core Statistics: Displays your account number, company name, currency type, and balance.
  • Live Equity Tracking: It monitors your current equity and highlights it in different colors (Green for profit, Red for loss) relative to your balance.
  • Risk Management: Shows your leverage, margin, and "StopOut" levels, helping you stay aware of your account's safety limits.

2. Multi-Currency Performance

The tool allows you to track up to four specific currency pairs (defaulting to EURUSD, GBPUSD, USDCHF, and USDJPY) simultaneously:

  • Dynamic Totals: It calculates the net volume of your positions for each pair, showing whether you are "Long" (Buy), "Short" (Sell), or "Neutral" (Flat).
  • Trend Visualization: For various timeframes (from 1-minute charts to Daily charts), the script displays up/down arrows and numerical values. This allows you to see at a glance if a currency is trending up, down, or remaining unchanged across different time horizons.
  • Profit History: It provides a summary of your past profits for specific currencies, allowing you to see your historical performance side-by-side with current open trades.

3. Market Session Tracker

The script includes a visual "Session Map" that identifies global trading windows:

  • Geographic Zones: It marks the Asian, European, and American trading sessions.
  • Time Tracking: A moving indicator shows exactly where the current time falls within these global cycles, which is helpful for traders who want to understand market volatility related to specific regions.

4. Technical Exchange Data

For each monitored currency, the dashboard displays specific technical "under-the-hood" data:

  • Costs & Digits: Shows the swap rates (overnight costs), current spread, and decimal precision.
  • Margin Calculations: It calculates "Free Margin" and your available room for new trades based on the current market price of that specific currency.

User Experience Features

  • Visual Alerts: If a required currency pair is missing from your "Market Watch" list, the script will display a clear warning message to help you troubleshoot quickly.
  • Customizable Display: The logic includes several toggle switches (Account Info, Currency Info, Profit History, and Sessions) that allow you to turn specific data modules on or off depending on your preference.
  • Clean Interface: By using "Labels" and "Frames," the script draws a organized UI directly onto your workspace, ensuring that important information is always visible without obstructing your price action.
Price Data Components
Series array that contains open prices of each barSeries array that contains close prices for each bar
Orders Execution
Checks for the total of open ordersChecks for the total of closed orders
11 Views
0 Downloads
0 Favorites
Exp-StatusBar v29.08.09
//+------------------------------------------------------------------+
//|                                                Exp-StatusBar.mq4 |
//|                                       Copyright © 2009, expforex |
//|                                        http://www.expforex.at.ua |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, expforex"
#property link      "http://www.expforex.at.ua"
#include <WinUser32.mqh>
#property indicator_separate_window
#property indicator_maximum 2.5
#property indicator_minimum 0
#property show_inputs
string N;
int k;
int X=10;
int Y=10;
int r;
extern bool ÈíôîðìàöèÿÎÑ÷åòå=true;
extern bool ÈíôîðìàöèÿÎÂàëþòàõ=true;
extern bool ÈíôîðìàöèÿÏîÒÔ=true;
extern bool ÈíôîðìàöèÿÏðèáûëüÀðõèâ=true;
extern bool Ñåññèÿ=true;
extern string te="Âàëþòû äëÿ ñòàòóñà:";
extern string val1="EURUSD";
extern string val2="GBPUSD";
extern string val3="USDCHF";
extern string val4="USDJPY";
int wind;
int init()
  {
  
//---- indicators
Stamp();
start();
 wind=WindowsTotal();
if (wind==1)wind=2;
   return(0);
  }




int deinit2(string val222)
{
ObjectsDeleteAll(1,OBJ_LABEL);
   ObjectCreate("ma", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText("ma", val222, 15 , "Arial", Yellow);
   ObjectSet("ma", OBJPROP_CORNER, 2);
   ObjectSet("ma", OBJPROP_XDISTANCE, 200);
   ObjectSet("ma", OBJPROP_YDISTANCE, 85);


   ObjectCreate("ma2", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText("ma2", "Èíäèêàòîð Îñòàíîâëåí!!!", 15 , "Arial", Red);
   ObjectSet("ma2", OBJPROP_CORNER, 2);
   ObjectSet("ma2", OBJPROP_XDISTANCE, 200);
   ObjectSet("ma2", OBJPROP_YDISTANCE, 20);

   ObjectCreate("ma22", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText("ma22", "Îøèáêà â íàñòðîéêàõ âàëþòíûõ ïàð", 15 , "Arial", Blue);
   ObjectSet("ma22", OBJPROP_CORNER, 2);
   ObjectSet("ma22", OBJPROP_XDISTANCE, 200);
   ObjectSet("ma22", OBJPROP_YDISTANCE, 120);

return(0);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
  double a1=MarketInfo(val1, MODE_ASK);
double a2=MarketInfo(val2, MODE_ASK);
double a3=MarketInfo(val3, MODE_ASK);
double a4=MarketInfo(val4, MODE_ASK);

if (a1==0) {deinit2("Ïðîâåðüòå íàëè÷èå ñèìâîëà "+val1+"  ïàíåëè èíñòðóìåíòîâ.");}
if (a2==0) {deinit2("Ïðîâåðüòå íàëè÷èå ñèìâîëà "+val2+"  ïàíåëè èíñòðóìåíòîâ.");}
if (a3==0) { deinit2("Ïðîâåðüòå íàëè÷èå ñèìâîëà "+val3+"  ïàíåëè èíñòðóìåíòîâ.");}
if (a4==0) { deinit2("Ïðîâåðüòå íàëè÷èå ñèìâîëà "+val4+"  ïàíåëè èíñòðóìåíòîâ.");}


int    counted_bars=IndicatorCounted();

k=0;
ObjectsDeleteAll(1,OBJ_LABEL);
   ObjectCreate("mail12", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText("mail12", "mailto: expforex@meta.ua", 8 , "Arial", Yellow);
   ObjectSet("mail12", OBJPROP_CORNER, 2);
   ObjectSet("mail12", OBJPROP_XDISTANCE, 320);
   ObjectSet("mail12", OBJPROP_YDISTANCE, 85);
if (Ñåññèÿ==true)session();
if (ÈíôîðìàöèÿÎÑ÷åòå==true)infoToWindow();
if (ÈíôîðìàöèÿÏîÒÔ==true){
drawper();
Status(val1,0);
Status(val2,20);
Status(val3,40);
Status(val4,60);
}



if(ÈíôîðìàöèÿÎÂàëþòàõ==true){
ramka(1,Red);
ramka(170,Blue);
ramka(340,Indigo);
ramka(510,Yellow);
ramka(680,Aqua);
valutainfo(val1,1);
valutainfo(val2,171);
valutainfo(val3,342);
valutainfo(val4,513);
}


if (ÈíôîðìàöèÿÏðèáûëüÀðõèâ==true){
profvalHistory(val1,0);
profvalHistory(val2,20);
profvalHistory(val3,40);
profvalHistory(val4,60);
profval(val1,0);
profval(val2,20);
profval(val3,40);
profval(val4,60);
}

   return(0);
  }
//+------------------------------------------------------------------+


//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                  |
//+----------------------------------------------------------------------------+

void Stamp(){

   ObjectCreate("Original", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Original", " ---http://Expforex.at.ua---", 10, "Arial Bold", Red);
   ObjectSet("Original", OBJPROP_CORNER, 2);
   ObjectSet("Original", OBJPROP_XDISTANCE, 600);
   ObjectSet("Original", OBJPROP_YDISTANCE, 200);
   
   


}

//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                  |
//+----------------------------------------------------------------------------+

void Up(int x, int y,int punkt){
N="Up"+k;
string K="ñ";
string up="("+punkt+")";

   ObjectCreate(N+"1", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N+"1", K, 10, "Wingdings", Green);
   ObjectSet(N+"1", OBJPROP_CORNER, 2);

   ObjectSet(N+"1", OBJPROP_XDISTANCE, x);
   ObjectSet(N+"1", OBJPROP_YDISTANCE, y);


   ObjectCreate(N, OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N, up, 10, "Arial Bold", Green);
   ObjectSet(N, OBJPROP_CORNER, 2);

   ObjectSet(N, OBJPROP_XDISTANCE, x+15);
   ObjectSet(N, OBJPROP_YDISTANCE, y);
N="";
k++;
}



//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                  |
//+----------------------------------------------------------------------------+


void Down(int x, int y,int punkt){
N="Down"+k;
string K="ò";
string down="("+punkt+")";
   
   
   ObjectCreate(N+"1", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N+"1", K, 10, "Wingdings", Red);
     ObjectSet(N+"1", OBJPROP_CORNER, 2);
   ObjectSet(N+"1", OBJPROP_XDISTANCE, x);
   ObjectSet(N+"1", OBJPROP_YDISTANCE, y); 
   
   
   ObjectCreate(N, OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N, down, 10, "Arial Bold", Red);
     ObjectSet(N, OBJPROP_CORNER, 2);
   ObjectSet(N, OBJPROP_XDISTANCE, x+15);
   ObjectSet(N, OBJPROP_YDISTANCE, y);
k++;
N="";
}
//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+

void Valuta(string val, int y, int x){
string K;
K="Valuta"+k;
string lot="("+DoubleToStr(Lotsumma(val),2)+")";
   ObjectCreate(K, OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(K, val, 10, "Arial Bold", Red);
   ObjectSet(K, OBJPROP_CORNER, 2);
   ObjectSet(K, OBJPROP_XDISTANCE, x);
   ObjectSet(K, OBJPROP_YDISTANCE, y);
   
   if (Lotsumma(val)<0){
   ObjectCreate(K+"1", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(K+"1", lot, 10, "Arial Bold", Red);
   ObjectSet(K+"1", OBJPROP_CORNER, 2);
   ObjectSet(K+"1", OBJPROP_XDISTANCE, x+60);
   ObjectSet(K+"1", OBJPROP_YDISTANCE, y);
}

   if (Lotsumma(val)>0){
   ObjectCreate(K+"1", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(K+"1", lot, 10, "Arial Bold", Green);
   ObjectSet(K+"1", OBJPROP_CORNER, 2);
   ObjectSet(K+"1", OBJPROP_XDISTANCE, x+60);
   ObjectSet(K+"1", OBJPROP_YDISTANCE, y);
}

   if (Lotsumma(val)==0){
   ObjectCreate(K+"1", OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(K+"1", lot, 10, "Arial Bold", Blue);
   ObjectSet(K+"1", OBJPROP_CORNER, 2);
   ObjectSet(K+"1", OBJPROP_XDISTANCE, x+60);
   ObjectSet(K+"1", OBJPROP_YDISTANCE, y);
}



}


//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+

void unchanged(int x, int y,int punkt){
N="unchanged"+k;

string unchanged="ô";
   ObjectCreate(N, OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N, unchanged, 13, "Wingdings", Blue);
     ObjectSet(N, OBJPROP_CORNER, 2);
   ObjectSet(N, OBJPROP_XDISTANCE, x);
   ObjectSet(N, OBJPROP_YDISTANCE, y);
k++;
N="";
}

//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+

void period(int x,string per){
N="period"+k;

string unchanged="UNCHANGED";
   ObjectCreate(N, OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N, per, 10, "Arial Bold", Green);
     ObjectSet(N, OBJPROP_CORNER, 2);
   ObjectSet(N, OBJPROP_XDISTANCE, x);
   ObjectSet(N, OBJPROP_YDISTANCE, 100);
k++;
N="";
}
//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+


string GetNameTF(int TimeFrame) {
  if (TimeFrame==0) TimeFrame=Period();
  switch (TimeFrame) {
    case PERIOD_M1:  return("M1");
    case PERIOD_M5:  return("M5");
    case PERIOD_M15: return("M15");
    case PERIOD_M30: return("M30");
    case PERIOD_H1:  return("H1");
    case PERIOD_H4:  return("H4");
    case PERIOD_D1:  return("Daily");
    case PERIOD_W1:  return("Weekly");
    case PERIOD_MN1: return("Monthly");
    default:		     return("UnknownPeriod");
  }
}

//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+

void stat(string valuta,int period, int x, int y){




if (iClose(valuta,period,0)>iOpen(valuta,period,0)){Up(X+x,Y+y,(iClose(valuta,period,0)-iOpen(valuta,period,0))/MarketInfo(valuta,MODE_POINT));}
if (iClose(valuta,period,0)<iOpen(valuta,period,0)){Down(X+x,Y+y,(iClose(valuta,period,0)-iOpen(valuta,period,0))/MarketInfo(valuta,MODE_POINT));}
if (iClose(valuta,period,0)==iOpen(valuta,period,0)){unchanged(X+x,Y+y,(iClose(valuta,period,0)-iOpen(valuta,period,0))/MarketInfo(valuta,MODE_POINT));}






}
//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+

void Status(string val, int y){
Valuta(val,Y+y,X); 
stat(val,PERIOD_M1,100,y);
stat(val,PERIOD_M5,170,y);
stat(val,PERIOD_M15,240,y);
stat(val,PERIOD_M30,310,y);
stat(val,PERIOD_H1,380,y);
stat(val,PERIOD_H4,450,y);
stat(val,PERIOD_D1,520,y);
}
//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+

void drawper()

{
period(X+100,GetNameTF( PERIOD_M1));  
period(X+170,GetNameTF( PERIOD_M5));  
period(X+240,GetNameTF( PERIOD_M15));  
period(X+310,GetNameTF( PERIOD_M30)); 
period(X+380,GetNameTF( PERIOD_H1)); 
period(X+450,GetNameTF( PERIOD_H4)); 
period(X+520,GetNameTF( PERIOD_D1)); 

}

//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+
double profval(string val,int y)


{
period(X+580,"Ïðèáûëü"+"("+DoubleToStr(profvalItog(),2)+")" );
period(X+700,"Èñòîðèÿ"+"("+DoubleToStr(profvalHistoryItog(),2)+")" );

N=N+k;
double OrderProf=0;
for (int cnt = 1 ; cnt <= OrdersTotal(); cnt++) 
   { 
      OrderSelect(cnt-1,SELECT_BY_POS,MODE_TRADES); 
      if (OrderSymbol()==val){
      
      OrderProf=OrderProf+OrderProfit();
      }
      
      }
   ObjectCreate(N, OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N, DoubleToStr(OrderProf,2), 10, "Arial Bold", Green);
   ObjectSet(N, OBJPROP_CORNER, 2);
   ObjectSet(N, OBJPROP_XDISTANCE, X+610);
   ObjectSet(N, OBJPROP_YDISTANCE, Y+y);
   N="";
   k++;
     }
     
     
//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+
double profvalItog()


{
double OrderProf2=0;
for (int cnt = 1 ; cnt <= OrdersTotal(); cnt++) 
   { 
      OrderSelect(cnt-1,SELECT_BY_POS,MODE_TRADES); 
      
      OrderProf2=OrderProf2+OrderProfit();
     
      }
   return(OrderProf2);
     }

//+-----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                      |
//+-----------------------------------------------------------------------------+    

double profvalHistoryItog()


{
double OrderProf2=0;
for (int cnt = 1 ; cnt <= OrdersHistoryTotal(); cnt++) 
   { 
      OrderSelect(cnt,SELECT_BY_POS,MODE_HISTORY); 
      OrderProf2=OrderProf2+OrderProfit();
      
      
      }
      return(OrderProf2);
     }



 //+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                      |
//+-----------------------------------------------------------------------------+    

double profvalHistory(string val,int y)


{
N=N+k;
double OrderProf=0;
for (int cnt = 1 ; cnt <= OrdersHistoryTotal(); cnt++) 
   { 
      OrderSelect(cnt-1,SELECT_BY_POS,MODE_HISTORY); 
      if (OrderSymbol()==val){
      
      OrderProf=OrderProf+OrderProfit();
      }
      
      }
   ObjectCreate(N, OBJ_LABEL, wind-1, 0, 0);
   ObjectSetText(N, DoubleToStr(OrderProf,2), 10, "Arial Bold", Green);
   ObjectSet(N, OBJPROP_CORNER, 2);
   ObjectSet(N, OBJPROP_XDISTANCE, X+700);
   ObjectSet(N, OBJPROP_YDISTANCE, Y+y);
   N="";
   k++;
     }

//+----------------------------------------------------------------------------+
//|  Àâòîð    : Âëàäèñëàâ, Expforex  http://expforex.at.ua                     |
//+----------------------------------------------------------------------------+
void info(string N,string info,int x,int y,color c)

{
N=N+k;
ObjectCreate(N, OBJ_LABEL, wind-1, 0, 0);
ObjectSetText(N, info, 8, "Arial Bold", c);
ObjectSet(N, OBJPROP_CORNER, 2);
ObjectSet(N, OBJPROP_XDISTANCE, x);
ObjectSet(N, OBJPROP_YDISTANCE, y);
k++;
N="";
}

void infoToWindow()
{


string K;
if (IsDemo()==true)K="Äåìî";
if (IsDemo()==false)K="Ðåàë";

//---------------------------------------------------------------------------------------
info("info1","Êîìïàíèÿ       ",5,198,White);
info("info2","Íîìåð ñ÷åòà  ",5,188,White);
info("info3","Òèï ñ÷åòà       ",5,178,White);
info("info8","Âàëþòà ñ÷åòà    ",5,168,White);
info("info4","Áàëàíñ       ",5,158,White);
info("info5","Ýêâèòè       ",5,148,White);
info("info6","쑌֔        ",5,138,White);
info("info7","Çàëîã        ",5,128,White);
info("info71","StopOut        ",4,118,White);
string wq=AccountCompany(); if (StringLen(wq)>10)wq="Unknown";
info("info11", wq,105,198,White);
info("info12",AccountNumber(),105,188,White);
info("info13",K,105,178,White);
info("info18",AccountCurrency(),105,168,White);
info("info14",DoubleToStr(AccountBalance(),2),105,158,White);

if (AccountBalance()<AccountEquity()){info("info15",DoubleToStr(AccountEquity(),2),105,148,Green);}
if (AccountBalance()>AccountEquity()){info("info15",DoubleToStr(AccountEquity(),2),105,148,Red);}
info("info16","1/"+AccountLeverage(),105,138,White);
info("info17",DoubleToStr(AccountMargin(),2),105,128,White);
info("info711",AccountStopoutLevel( ) +"%",105,118,White);
}
//-----------------------------------------------------------------------------------------
void valutainfo(string val,int x){
info("insfo","Âàëþòà      ",x+172,198,White);
info("insfo1","Ñâîï Buy       ",x+172,188,White);
info("insfo2","Ñâîï Sell ",x+172,178,White);
info("infso3","Ñïðýä     ",x+172,168,White);
info("insfo8","Òî÷íîñòü    ",x+172,158,White);
info("insfo4","Óðîâåíü Ñòîïîâ       ",x+172,148,White);
info("insfo43","Äîñòóïíî ëîòîâ:       ",x+172,138,White);
info("insfo43","Ïóíêòîâ äî StopOut    ",x+172,128,White);

info("insfo1",val,x+272,198,Red);
info("insfo11",DoubleToStr(MarketInfo(val,MODE_SWAPLONG),2),x+272,188,White);
info("insfo12",DoubleToStr(MarketInfo(val,MODE_SWAPSHORT),2),x+272,178,White);
info("insfo13",DoubleToStr(MarketInfo(val,MODE_SPREAD),0),x+272,168,White);
info("insfo18",DoubleToStr(MarketInfo(val,MODE_DIGITS),0),x+272,158,White);
info("insfo14",DoubleToStr(MarketInfo(val,MODE_STOPLEVEL),0),x+272,148,White);
double free;
if (MarketInfo(val,MODE_DIGITS)==4)free=AccountFreeMargin()/(MarketInfo(val,MODE_BID)*1000);
if (MarketInfo(val,MODE_DIGITS)==5)free=AccountFreeMargin()/(MarketInfo(val,MODE_BID)*10000);
if (MarketInfo(val,MODE_DIGITS)==3)free=AccountFreeMargin()/(MarketInfo(val,MODE_BID)*100);
if (MarketInfo(val,MODE_DIGITS)==2)free=AccountFreeMargin()/(MarketInfo(val,MODE_BID)*10);

info("insfo443",DoubleToStr(free,2),x+272,138,White);




double punkttostop=AccountMargin()/100*AccountStopoutLevel( );
double ras4et;
if(val=="EURUSD"||val=="GBPUSD")ras4et=AccountEquity()-punkttostop;
if(val=="USDCHF"){ras4et=AccountEquity()-punkttostop; ras4et=ras4et*(MarketInfo(val,MODE_BID)/1);}
if(val=="USDJPY"){ras4et=AccountEquity()-punkttostop; ras4et=ras4et*(MarketInfo(val,MODE_BID)/100);}


info("insfo4423",DoubleToStr(ras4et,0),x+272,128,White);


}


void ramka(int x, color c){

info("1","|",x,200,c);
info("2","|",x,192,c);
info("3","|",x,184,c);
info("4","|",x,176,c);
info("5","|",x,168,c);
info("6","|",x,160,c);
info("7","|",x,152,c);
info("8","|",x,144,c);
info("9","|",x,136,c);
info("10","|",x,128,c);
info("11","|",x,120,c);
info("14","___________________________",x+1,209,c);
info("15","___________________________",x+1,119,c);
info("1a","|",x+160,200,c);
info("2a","|",x+160,192,c);
info("3a","|",x+160,184,c);
info("4a","|",x+160,176,c);
info("5a","|",x+160,168,c);
info("6a","|",x+160,160,c);
info("7a","|",x+160,152,c);
info("8a","|",x+160,144,c);
info("9a","|",x+160,136,c);
info("10a","|",x+160,128,c);
info("11a","|",x+160,120,c);
}


void session()
{
//------- Âíåøíèå ïàðàìåòðû èíäèêàòîðà ----------------------------------------+
int    NumberOfDays = 5;             // Êîëè÷åñòâî äíåé
 int AsiaBegin    = 1;       // Îòêðûòèå àçèàòñêîé ñåññèè
 int AsiaEnd      = 10;       // Çàêðûòèå àçèàòñêîé ñåññèè
 color  AsiaColor    = Yellow;     // Öâåò àçèàòñêîé ñåññèè
 int EurBegin     = 7;       // Îòêðûòèå åâðîïåéñêîé ñåññèè
 int EurEnd       = 16;       // Çàêðûòèå åâðîïåéñêîé ñåññèè
 color  EurColor     = Red;           // Öâåò åâðîïåéñêîé ñåññèè
 int USABegin     = 14;       // Îòêðûòèå àìåðèêàíñêîé ñåññèè
 int USAEnd       = 23;       // Çàêðûòèå àìåðèêàíñêîé ñåññèè
 color  USAColor     = Blue;          // Öâåò àìåðèêàíñêîé ñåññèè
string t1="                   Àçèÿ   ";
string t2="                    Åâðîïà   ";
string t3="                      Àìåðèêà   ";
int yy=230;


if (ÈíôîðìàöèÿÎÑ÷åòå==false&&ÈíôîðìàöèÿÎÂàëþòàõ==false)yy=130;else yy=230;

ObjectCreate("t1", OBJ_LABEL, wind-1, 0, 0);
ObjectSetText("t1", t1, 8, "Arial Bold", AsiaColor);

ObjectSet("t1", OBJPROP_CORNER, 2);
ObjectSet("t1", OBJPROP_XDISTANCE, 20);
ObjectSet("t1", OBJPROP_YDISTANCE, yy);
//if (Hour()>=AsiaBegin&&Hour()<AsiaEnd)ObjectSetText("t1", t1, 8, "Arial Bold", Red);

ObjectCreate("t2", OBJ_LABEL, wind-1, 0, 0);
ObjectSetText("t2", t2, 8, "Arial Bold", EurColor);
ObjectSet("t2", OBJPROP_CORNER, 2);
ObjectSet("t2", OBJPROP_XDISTANCE, 220);
ObjectSet("t2", OBJPROP_YDISTANCE, yy);
//if (Hour()>=EurBegin&&Hour()<EurEnd)ObjectSetText("t2", t2, 8, "Arial Bold", Red);


ObjectCreate("t3", OBJ_LABEL, wind-1, 0, 0);
ObjectSetText("t3", t3, 8, "Arial Bold", USAColor);
ObjectSet("t3", OBJPROP_CORNER, 2);
ObjectSet("t3", OBJPROP_XDISTANCE, 420);
ObjectSet("t3", OBJPROP_YDISTANCE, yy);
//if (Hour()>=USABegin&&Hour()<USAEnd)ObjectSetText("t3", t3, 8, "Arial Bold", Red);



ObjectCreate("t5", OBJ_LABEL, wind-1, 0, 0);
ObjectSetText("t5", "À", 12, "Wingdings", Yellow);
ObjectSet("t5", OBJPROP_CORNER, 2);
ObjectSet("t5", OBJPROP_XDISTANCE, Hour()*25);
ObjectSet("t5", OBJPROP_YDISTANCE, yy-15);
if (Hour()>EurBegin&&Hour()<AsiaEnd)ObjectSet("t5", OBJPROP_XDISTANCE, 200);
if (Hour()<EurEnd&&Hour()>USABegin)ObjectSet("t5", OBJPROP_XDISTANCE, 400);


ramka2(AsiaColor,EurColor,USAColor);

}



void ramka2(color AsiaColor,color EurColor, color USAColor ){
int yy=230;
if (ÈíôîðìàöèÿÎÑ÷åòå==false&&ÈíôîðìàöèÿÎÂàëþòàõ==false)yy=130;else yy=230;
info("1r","|",18,yy,AsiaColor);
info("11r","//////|",0+218,yy,AsiaColor);
info("14r","_________________________________",18+1,yy+10,AsiaColor);
info("15r","_________________________________",18+1,yy-1,AsiaColor);

info("1r","|//////",200,yy,EurColor);
info("11r","//////|",200+218,yy,EurColor);
info("14r","_________________________________",218+1,yy+10,EurColor);
info("15r","_________________________________",218+1,yy-1,EurColor);

info("1r","|//////",400,yy,USAColor);
info("11r","|",418+198,yy,USAColor);
info("14r","_________________________________",418+1,yy+10,USAColor);
info("15r","_________________________________",418+1,yy-1,USAColor);


}


double Lotsumma(string val)

{
double lot=0;
for (int cnt = 1 ; cnt <= OrdersTotal(); cnt++) 
   { 
      OrderSelect(cnt-1,SELECT_BY_POS,MODE_TRADES); 
      if (OrderSymbol()==val){
      if (OrderType()==OP_BUY)lot=lot+OrderLots();
      if (OrderType()==OP_SELL)lot=lot-OrderLots();

}

}

return(lot);
}

Comments