//--------------------------------------------------------------------- #property copyright "Dima S., 2010 г." #property link "dimascub@mail.com" #property version "1.00" #property description "Отображение параметров символа" //--------------------------------------------------------------------- #property indicator_chart_window //--------------------------------------------------------------------- //--------------------------------------------------------------------- // Version History //--------------------------------------------------------------------- // 11.10.2010г. - V1.00 // - FIRST RELEASE; // // 20.10.2010г. - V1.01 // - ADDED - setting angle for table output; // - ADDED - horizontal and vertical shift of the table; // //--------------------------------------------------------------------- //--------------------------------------------------------------------- // Include library //--------------------------------------------------------------------- #include //--------------------------------------------------------------------- //===================================================================== // External input parameters //===================================================================== input ENUM_BASE_CORNER Corner=CORNER_RIGHT_UPPER; input int UpDownBorderShift=1; input int LeftRightBorderShift=1; input color TitlesColor=LightCyan; //--------------------------------------------------------------------- //--------------------------------------------------------------------- TableDisplay Table1; //--------------------------------------------------------------------- #define NUMBER 6 //--------------------------------------------------------------------- string titles[]={ "Spread:","Stop Level:","Pips to Open:","Hi to Lo:","Daily Av:" }; int c1_coord_y[ NUMBER ] = { 1, 3, 4, 6, 7, 8 }; int c2_coord_y[ NUMBER ] = { 9, 7, 6, 4, 3, 2 }; int c1_coord_x[ NUMBER ] = { 2, 4, 4, 4, 4, 4 }; int c2_coord_x[ NUMBER ] = { 4, 2, 2, 2, 2, 2 }; //--------------------------------------------------------------------- double rates= 0.0; datetime times = 0; MqlTick tick; MqlRates bars[6]; //--------------------------------------------------------------------- #define WIDTH 50 #define HEIGHT 60 #define FONTSIZE 12 //--------------------------------------------------------------------- // OnInit event handler //--------------------------------------------------------------------- int OnInit() { // Create table Table1.SetParams(0,0,Corner); // Show prices for(int i=0; itimes || times==0) { Table1.SetText(0,DoubleToString(tick.bid,(int)(SymbolInfoInteger(Symbol(),SYMBOL_DIGITS)))); if(tick.bid>rates && rates>0.1) { Table1.SetColor(0,Lime); } else if(tick.bid0.1) { Table1.SetColor(0,Red); } else { Table1.SetColor(0,Yellow); } rates = tick.bid; times = tick.time; } Table1.SetText( 1, DoubleToString(( tick.ask - tick.bid ) / SymbolInfoDouble( Symbol( ), SYMBOL_POINT ), 0 )); Table1.SetText( 2, DoubleToString( SymbolInfoInteger( Symbol( ), SYMBOL_TRADE_STOPS_LEVEL ), 0 )); CopyRates(Symbol(),PERIOD_D1,0,6,bars); // Points from day open price if(bars[5].close>bars[5].open) { Table1.SetColor( 3, Lime ); Table1.SetText( 3, DoubleToString(( bars[ 5 ].close - bars[ 5 ].open ) / SymbolInfoDouble( Symbol( ), SYMBOL_POINT ), 0 )); } else if(bars[5].close