0
Views
0
Downloads
0
Favorites
nyoron
//+------------------------------------------------------------------+
//| nyoron.mq4 |
//| Copyright (c) 2010, Fai Software Corp. |
//| http://d.hatena.ne.jp/fai_fx/ |
//+------------------------------------------------------------------+
#property copyright "Copyright (c) 2010, Fai Software Corp."
#property link "http://d.hatena.ne.jp/fai_fx/"
#property indicator_chart_window
// http://useyan.x0.com/s/html/mono-font.htm tHgÌá
extern string FontName = "lr oSVbN"; //"lr SVbN"@"lr ¾©" "HGsÌ" "GungsuhChe"
extern color FontColor = White;
extern int FontSize = 12;
extern int LineSpace = 4;//sÔ
extern int XShift = 350;//IuWFNgQ̶¤Xy[X
extern int YShift = 10;//IuWFNgQÌã¤Xy[X
extern int BlockShift = 0;// 60¶ÌubNÌzuY²®p
// OS ÉæÁÄ60¶ubNÌTCYªá¤ÌÅvÓB
// tHgTCY 7`18 ðzèB
// for Vista
//int BlockSize[] = {0,1,2,3,4,5,6,360,420,480,480,540,600,660,720,780,780,840,900};
// for WindowsXP
int BlockSize[] = {0,1,2,3,4,5,6,300/*7*/,300,300,420/*10*/,420,480,540,540/*14*/,600,660,660,720/*18*/};
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
if(FontSize > 18 ) FontSize = 18;
if(FontSize < 7 ) FontSize = 7;
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
DelObj();
Comment("");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
string msg =
"@@@@@@@@@@ @ -] 'LPPMR¤"+"\n"+
"@@ @ @ @ @ @ ^@^\" MR R@@_"+"\n"+
"@@@@@@@@@//, '/@@@@ RÊ @¤@R"+"\n"+
"@@@@@@@@ V {_{@@@ @@@Ø| . i| @É"+"\n"+
"@@@@@@@@ Ú!¬m@@@ MR ¸@|Ai|@@å"+"\n"+
"@@@@@@@ @ R|l@@@@@ |@.|É @ ë"+"\n"+
"@ @ @ @@@@@ |ͽ ¤_,¤_,¼½j @|@, |.@@l"+"\n"+
"@@@@@@@@@@|@/Ül,¤ __,@C@g |/ |@ ñ"+"\n"+
".@@@@@@@@@ | /@ /::|O/::/^@ R |"+"\n"+
"@@@@@@@@@ | |@@l SÉ:::/ q::::c, |";
CommentOBJ(msg);
//----
return(0);
}
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
// üsÅæØÁÄ·éB
string CommentOBJ(string msg){
DelObj();
int start = 0;
int i = 0;
msg = msg + "\n";
string msg_unit;
while(i<500){ // 500sȺðzè
int n = StringFind(msg,"\n",start);
if(n!=-1){
if(n-start > 0){
msg_unit = StringSubstr(msg,start, n-start);
}else{
msg_unit =" ";
}
start = n+1;
//Print(start," ",n," ",msg_unit);
DrawTXTLine("TXT-"+i,msg_unit,XShift,YShift+i*FontSize+i*LineSpace);
}else{
break;
}
i++;
}
}
//+------------------------------------------------------------------+
// TXT- ÅnÜéIuWFNgðSí·é
void DelObj(){
string objname;
for(int i=ObjectsTotal();i>=0;i--){
objname = ObjectName(i);
if( StringFind(objname,"TXT-")>=0) ObjectDelete(objname);
}
}
//+------------------------------------------------------------------+
// 60¶ÉæØÁÄxIuWFNgð쬷éB
void DrawTXTLine(string objname, string msg, int X, int Y)
{
int len = StringLen(msg);
for(int i=0;i*60<len;i++){
string submsg = StringSubstr(msg,60*i,60);
ObjectCreate(objname+i,OBJ_LABEL,0,0,0);
ObjectSet(objname+i,OBJPROP_XDISTANCE, X+(BlockSize[FontSize]+BlockShift)*i);
ObjectSet(objname+i,OBJPROP_YDISTANCE, Y);
ObjectSetText(objname+i,submsg,FontSize,FontName,FontColor);
}
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---