Ni yg aku modified utk 14 pair..ada 3 bahagian..aku paste asing2..Nti kau cantumkan semua jadi satu..
Bahagian 3
Sym =StringConcatenate(symbol,suffix);
int digit =MarketInfo(Sym, MODE_DIGITS);
xdist =xdistt;
SymColor =White;
if (StringSubstr(symbol,0,6)=="GBPJPY" || StringSubstr(symbol,0,6)=="EURJPY" || StringSubstr(symbol,0,6)=="GBPUSD" )
SymColor=LightSalmon;
textname =StringConcatenate(textnames, symbol, DoubleToStr(xdistt, 0) );
drawLabel(textname, symbol, 9, "Arial", SymColor, xdist, ydist);
xdist=xdist+60;
textname=StringConcatenate(textnames, symbol, "Spread", DoubleToStr(xdistt, 0) );
drawLabel(textname, DoubleToStr(spread,0), 9, "Courier New", Yellow, xdist, ydist);
xdist=xdist+25;
textname=StringConcatenate(textnames, symbol, "Pips", DoubleToStr(xdistt, 0) );
drawLabel(textname, DoubleToStr(pips,0), 9, "Courier New", statcolor (pips), xdist, ydist);
xdist=xdist+37;
textname=StringConcatenate(textnames, symbol, "Profit", DoubleToStr(xdistt, 0) );
drawLabel(textname, DoubleToStr(profit,2), 9, "Courier New", statcolor (profit), xdist, ydist);
ydist=ydist+12;
}
textname=StringConcatenate(textnames, symbol, "totalProfit", DoubleToStr(xdistt, 0) );
drawLabel(textname, DoubleToStr(totalprofit,2), 9, "Courier New", statcolor (totalprofit), xdist, ydist);
textname=StringConcatenate(textnames, symbol, "totalpips", DoubleToStr(xdistt, 0) );
drawLabel(textname, DoubleToStr(totalpips,0), 9, "Courier New", statcolor (totalpips), xdist-40, ydist);
string Spreadtxt=StringConcatenate("Total Spread = ", DoubleToStr(spreadpips,0), " (", DoubleToStr(spreadcurr,2), ")" );
textname=StringConcatenate(textnames, symbol, "spreadtotal", DoubleToStr(xdistt, 0) );
drawLabel(textname, Spreadtxt, 9, "Arial", Yellow, 10, ydist+25);
int lineypos;
if (Simulation==1) lineypos=ydist-(15*12+1); else lineypos=ydist-(8*12+1);
textname=StringConcatenate(textnames, "Line1", DoubleToStr(xdistt, 0) );
drawLabel(textname, "________________________", 9, "Courier New", Silver, xdistt, lineypos);
lineypos=lineypos+12*2;
textname=StringConcatenate(textnames, "Line2", DoubleToStr(xdistt, 0) );
drawLabel(textname, "________________________", 9, "Courier New", Gray, xdistt, lineypos);
lineypos=lineypos-12*4;
textname=StringConcatenate(textnames, "Line3", DoubleToStr(xdistt, 0) );
drawLabel(textname, "________________________", 9, "Courier New", Gray, xdistt, lineypos);
}
//+------------------------------------------------------------------+
color statcolor (double total)
{
color pipscolor=Olive;
if (total>0) pipscolor=Lime;
if (total<0) pipscolor=Red;
return (pipscolor);
}
//+------------------------------------------------------------------+
void drawLabel (string Ln, string Lt, int tz, string ts, color Lc, int xp, int yp)
{
ObjectCreate(Ln, OBJ_LABEL, 0, 0, 0);
ObjectSetText(Ln, Lt,tz, ts, Lc);
ObjectSet(Ln, OBJPROP_CORNER, 0);
ObjectSet(Ln, OBJPROP_XDISTANCE, xp);
ObjectSet(Ln, OBJPROP_YDISTANCE, yp);
}