44 lines
No EOL
3.2 KiB
Text
44 lines
No EOL
3.2 KiB
Text
// 右上のEA名を消す→好きな表示に変更
|
|
int OnInit()
|
|
{
|
|
if (!IsTesting()) EA_name();
|
|
}
|
|
|
|
int OnTick()
|
|
{
|
|
if (!IsTesting()) EA_name();
|
|
}
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| EA名表示をアレンジ |
|
|
//+------------------------------------------------------------------+
|
|
void EA_name()
|
|
{
|
|
|
|
int n = (int)DoubleToStr(StringLen(WindowExpertName()) / 1.6, 0);
|
|
color EANclr = (color)ChartGetInteger(0, CHART_COLOR_BACKGROUND);
|
|
|
|
for (int k = 1; k <= n; k++)
|
|
{
|
|
string label00 = "■■";
|
|
RECTANGLE1 ("rec"+(string)k, label00, EANclr, 12 + 12 * k, 0, 9, "Segoe UI");
|
|
}
|
|
|
|
RECTANGLE1 ("EA-NAME", WindowExpertName(), clrWhite, 26, 2, 8, "Segoe UI");
|
|
}
|
|
void RECTANGLE1(string OBJname1, string text1, color clrEAname, int xx, int yy, int fs, string font)
|
|
{
|
|
ObjectCreate(0, OBJname1, OBJ_LABEL, 0, 0, 0);
|
|
ObjectSetString(0, OBJname1, OBJPROP_TEXT, text1);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_COLOR, clrEAname);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_XDISTANCE, xx);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_YDISTANCE, yy);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_FONTSIZE, fs);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_SELECTABLE, false);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_HIDDEN, true);
|
|
ObjectSetString(0, OBJname1, OBJPROP_FONT, font);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_CORNER, CORNER_RIGHT_UPPER);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_ANCHOR, ANCHOR_RIGHT_UPPER);
|
|
ObjectSetInteger(0, OBJname1, OBJPROP_BACK, false);
|
|
}
|
|
//+------------------------------------------------------------------+ |