notty
New Member
Posts: 25
|
Post by notty on Jun 28, 2016 11:24:29 GMT 7
|
|
marot
New Member
Posts: 43
|
Post by marot on Jun 28, 2016 12:31:53 GMT 7
Indy ข่าว..เขียนเอง หรือใช้ตัวไหนครับ
ถ้าแก้ได้.. ก็ขยับ ในช่วง Comment ออกไป ให้พ้นระยะตัวเลข Ticket
แต่อาจจะมีวิธีอื่นนะครับ... ไม่ทราบเหมือนกัน
|
|
|
Post by iamgotzaa on Jun 29, 2016 15:55:39 GMT 7
สร้าง rectangle วางไว้หลัง comment ครับ
|
|
|
Post by iamgotzaa on Jun 29, 2016 19:48:26 GMT 7
ตัวอย่างนะครับ สร้างสี่เหลี้ยมเอามาวางบัง bckground เอาไว้ //+------------------------------------------------------------------+ //| Rectangle.mq4 | //| | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "" #property link "https://www.mql5.com" #property version "1.00" #property strict
//#include <MQL4OBJ.mqh> //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- RectLabelCreate(0,"rec",0, 0,0,300,500,clrBlue);
//--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- ObjectDelete(0,"rec"); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- string test=""; for(int i=0;i<10;i++) { StringAdd(test," test test test \n"); } Comment(test); } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| Create rectangle label | //+------------------------------------------------------------------+ bool RectLabelCreate(const long chart_ID=0, // chart's ID const string name="RectLabel", // label name const int sub_window=0, // subwindow index const int x=0, // X coordinate const int y=0, // Y coordinate const int width=50, // width const int height=18, // height const color back_clr=C'236,233,216', // background color const ENUM_BORDER_TYPE border=BORDER_SUNKEN, // border type const ENUM_BASE_CORNER corner=CORNER_LEFT_UPPER, // chart corner for anchoring const color clr=clrRed, // flat border color (Flat) const ENUM_LINE_STYLE style=STYLE_SOLID, // flat border style const int line_width=1, // flat border width const bool back=false, // in the background const bool selection=false, // highlight to move const bool hidden=true, // hidden in the object list const long z_order=0) // priority for mouse click { //--- reset the error value ResetLastError(); //--- create a rectangle label if(!ObjectCreate(chart_ID,name,OBJ_RECTANGLE_LABEL,sub_window,0,0)) { Print(__FUNCTION__, ": failed to create a rectangle label! Error code = ",GetLastError()); return(false); } //--- set label coordinates ObjectSetInteger(chart_ID,name,OBJPROP_XDISTANCE,x); ObjectSetInteger(chart_ID,name,OBJPROP_YDISTANCE,y); //--- set label size ObjectSetInteger(chart_ID,name,OBJPROP_XSIZE,width); ObjectSetInteger(chart_ID,name,OBJPROP_YSIZE,height); //--- set background color ObjectSetInteger(chart_ID,name,OBJPROP_BGCOLOR,back_clr); //--- set border type ObjectSetInteger(chart_ID,name,OBJPROP_BORDER_TYPE,border); //--- set the chart's corner, relative to which point coordinates are defined ObjectSetInteger(chart_ID,name,OBJPROP_CORNER,corner); //--- set flat border color (in Flat mode) ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr); //--- set flat border line style ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style); //--- set flat border width ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,line_width); //--- display in the foreground (false) or background (true) ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back); //--- enable (true) or disable (false) the mode of moving the label by mouse ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,selection); ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection); //--- hide (true) or display (false) graphical object name in the object list ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden); //--- set the priority for receiving the event of a mouse click in the chart ObjectSetInteger(chart_ID,name,OBJPROP_ZORDER,z_order); //--- successful execution return(true); }
|
|
notty
New Member
Posts: 25
|
Post by notty on Jul 10, 2016 15:53:24 GMT 7
OK ขอบคุณครับ
|
|
marot
New Member
Posts: 43
|
Post by marot on Jul 10, 2016 22:06:39 GMT 7
อีกวิธี คือ ย้าย ข่าว .. ลงไปที่ Sub Window นะครับ...
|
|
|
Post by iamgotzaa on Jul 20, 2016 11:01:48 GMT 7
จริงครับ
|
|