Display Text Information On Your Chart
Display all text information you need on your live charts.
First, import the library:
#import "osd.ex4" void display(string osdText,ENUM_base_CORNER osdCorner,int osdFontSize,color osdFontColor, int osdAbs,int osdOrd); // function to display void undisplay(string osdText); // function to undisplay int splitText(string osdText,string &linesText[]); // function called from display() and undisplay() void delObsoleteLines(int nbLines); // function called from display string setLineName(int numLine); // function called from display(), undisplay() and delObsoleteLines() #import
Then, implement parameters:
- The info you want to display
- One of the four corners to display to
- Choose font size
- Choose font color
- Choose x distance
- Choose y distance
extern ENUM_base_CORNER corner=CORNER_RIGHT_LOWER; // corner to display to extern int fontSize=7; // size text extern color fontColor=clrWhite; // color text extern int abs = 10; // x distance from corner extern int ord = 15; // y distance from corner
The library is coded so that display() has default parameters except for the string osdText, so you can pass your string as the only parameter.
Then, construct your info in a string with multiple lines.
string servername=AccountServer(); string companyname=AccountCompany(); double _spread=MarketInfo(Symbol(),MODE_SPREAD); string msg=StringConcatenate("companyname : ",companyname, "n servername : ",servername, "n spread : ",_spread);
Finally, only two functions to use: display() and undisplay().
You can also switch on/off the info display if you add a bool parameter.
extern bool displayOn=true; // switch on/off infos displaying
if(displayOn) // if displayOn is true, you display infos { display(msg,corner,fontSize,fontColor,abs,ord); } else // if displayOn is false, you do not display { undisplay(msg); }
联系方式
公司:顺水的鱼外汇EA
状态:离线 发送信件 在线交谈
姓名:顺水的鱼(先生)
职位:投机客
电话:18391752892
手机:18391752892
地区:默认地区
地址:西安市高新区软件园
邮件:3313198376@qq.com
QQ:3313198376
微信:18391752892
阿里旺旺:顺水的鱼waterfish
Skype:3313198376@qq.com
状态:离线 发送信件 在线交谈
姓名:顺水的鱼(先生)
职位:投机客
电话:18391752892
手机:18391752892
地区:默认地区
地址:西安市高新区软件园
邮件:3313198376@qq.com
QQ:3313198376
微信:18391752892
阿里旺旺:顺水的鱼waterfish
Skype:3313198376@qq.com

