#property copyright "©ZFS"
#property link "forexzfs.ru vasbsm@mail.ru skype:vasbsm"
#property indicator_chart_window
extern double SumLot=100.0;
extern double Percent1=0.48;
extern double Percent2=0.95;
extern double Percent3=1.43;
extern double Percent4=1.90;
extern double Percent5=2.38;
extern double Percent6=2.86;
extern double Percent7=3.33;
extern double Percent8=3.81;
extern double Percent9=4.29;
extern double Percent10=4.76;
extern double Percent11=5.24;
extern double Percent12=5.71;
extern double Percent13=6.19;
extern double Percent14=6.67;
extern double Percent15=7.14;
extern double Percent16=7.62;
extern double Percent17=8.10;
extern double Percent18=8.57;
extern double Percent19=9.05;
extern double Percent20=9.52;
extern color colorLabel=Blue;
extern int RoundLot=2;//digits after the decimal point in the lot
double Lot[20];
double SumLotCorr,SumPercent;
bool block=false;
int init(){}
int deinit(){for (int i=1;i<=22;i++)ObjectDelete("LL"+i);}
int start(){
if (block)return(0);
Lot[0]=NormalizeDouble(SumLot*Percent1/100,RoundLot);
Lot[1]=NormalizeDouble(SumLot*Percent2/100,RoundLot);
Lot[2]=NormalizeDouble(SumLot*Percent3/100,RoundLot);
Lot[3]=NormalizeDouble(SumLot*Percent4/100,RoundLot);
Lot[4]=NormalizeDouble(SumLot*Percent5/100,RoundLot);
Lot[5]=NormalizeDouble(SumLot*Percent6/100,RoundLot);
Lot[6]=NormalizeDouble(SumLot*Percent7/100,RoundLot);
Lot[7]=NormalizeDouble(SumLot*Percent8/100,RoundLot);
Lot[8]=NormalizeDouble(SumLot*Percent9/100,RoundLot);
Lot[9]=NormalizeDouble(SumLot*Percent10/100,RoundLot);
Lot[10]=NormalizeDouble(SumLot*Percent11/100,RoundLot);
Lot[11]=NormalizeDouble(SumLot*Percent12/100,RoundLot);
Lot[12]=NormalizeDouble(SumLot*Percent13/100,RoundLot);
Lot[13]=NormalizeDouble(SumLot*Percent14/100,RoundLot);
Lot[14]=NormalizeDouble(SumLot*Percent15/100,RoundLot);
Lot[15]=NormalizeDouble(SumLot*Percent16/100,RoundLot);
Lot[16]=NormalizeDouble(SumLot*Percent17/100,RoundLot);
Lot[17]=NormalizeDouble(SumLot*Percent18/100,RoundLot);
Lot[18]=NormalizeDouble(SumLot*Percent19/100,RoundLot);
Lot[19]=NormalizeDouble(SumLot*Percent20/100,RoundLot);
SumLotCorr=0;
for (int i=0;i<20;i++){
SumLotCorr+=Lot[i];
}
SumPercent=Percent1+Percent2+Percent3+Percent4+Percent5+Percent6+Percent7+Percent8+Percent9+Percent10+
Percent11+Percent12+Percent13+Percent14+Percent15+Percent16+Percent17+Percent18+Percent19+Percent20;
Label("LL1",0,10,10,"1 LOT="+DoubleToStr(Lot[0],RoundLot),12,colorLabel,1);
Label("LL2",0,10,25,"2 LOT="+DoubleToStr(Lot[1],RoundLot),12,colorLabel,1);
Label("LL3",0,10,40,"3 LOT="+DoubleToStr(Lot[2],RoundLot),12,colorLabel,1);
Label("LL4",0,10,55,"4 LOT="+DoubleToStr(Lot[3],RoundLot),12,colorLabel,1);
Label("LL5",0,10,70,"5 LOT="+DoubleToStr(Lot[4],RoundLot),12,colorLabel,1);
Label("LL6",0,10,85,"6 LOT="+DoubleToStr(Lot[5],RoundLot),12,colorLabel,1);
Label("LL7",0,10,100,"7 LOT="+DoubleToStr(Lot[6],RoundLot),12,colorLabel,1);
Label("LL8",0,10,115,"8 LOT="+DoubleToStr(Lot[7],RoundLot),12,colorLabel,1);
Label("LL9",0,10,130,"9 LOT="+DoubleToStr(Lot[8],RoundLot),12,colorLabel,1);
Label("LL10",0,10,145,"10 LOT="+DoubleToStr(Lot[9],RoundLot),12,colorLabel,1);
Label("LL11",0,10,160,"11 LOT="+DoubleToStr(Lot[10],RoundLot),12,colorLabel,1);
Label("LL12",0,10,175,"12 LOT="+DoubleToStr(Lot[11],RoundLot),12,colorLabel,1);
Label("LL13",0,10,190,"13 LOT="+DoubleToStr(Lot[12],RoundLot),12,colorLabel,1);
Label("LL14",0,10,205,"14 LOT="+DoubleToStr(Lot[13],RoundLot),12,colorLabel,1);
Label("LL15",0,10,220,"15 LOT="+DoubleToStr(Lot[14],RoundLot),12,colorLabel,1);
Label("LL16",0,10,235,"16 LOT="+DoubleToStr(Lot[15],RoundLot),12,colorLabel,1);
Label("LL17",0,10,250,"17 LOT="+DoubleToStr(Lot[16],RoundLot),12,colorLabel,1);
Label("LL18",0,10,265,"18 LOT="+DoubleToStr(Lot[17],RoundLot),12,colorLabel,1);
Label("LL19",0,10,280,"19 LOT="+DoubleToStr(Lot[18],RoundLot),12,colorLabel,1);
Label("LL20",0,10,295,"20 LOT="+DoubleToStr(Lot[19],RoundLot),12,colorLabel,1);
Label("LL21",0,10,315,"SUM LOT="+DoubleToStr(SumLotCorr,RoundLot),12,colorLabel,1);
Label("LL22",0,10,330,"SUM PERCENT="+DoubleToStr(SumPercent,2),12,colorLabel,1);
block=true;
}
void Label(string _name,int _window,int _x,int _y,string _text,int _font,color _color,int corner){
ObjectCreate(_name,OBJ_LABEL,_window,0,0);
ObjectSet(_name,OBJPROP_CORNER,corner);
ObjectSet(_name,OBJPROP_XDISTANCE,_x);
ObjectSet(_name,OBJPROP_YDISTANCE,_y);
ObjectSetText(_name,_text,_font,"Arial",_color);
}
Comments