Complimenti per l'ordine nel listato...
io sono molto piu' disordinato...in più fa solo le scritte (listato da pulire essendo in costruzione...)
iNPUT:HI(highd(0)),LO(lowd(0)),CL(closed(1)),CL2(closed(1) of data2),
Plot3_(1),Plot_Swicc(0),Dyn(0),Molt(1),DIV(252),DIV2(4),ingresso("close"),
RGB_SH(RGB(166,202,240)),RGB_LG(RGB(166,202,240)),Plot_ESTREME(1),Arr(1);//Livelli("D"),
vars:swic(0),sar(0),sarSh(0),alrtsar(c),alrtsarSh(0);//DIV(0)
value1=CL;
value2=CL2;
//if Livelli= "D" THEN BEGIN
// DIV=252;END;
// if Livelli= "W" THEN BEGIN
// DIV=52;END;
plot25(CL,"CLOSE");
if HI > value20 then swic=1;
if LO < value14 then swic=-1;
if Plot_Swicc=1 then begin
plot15(swic,"swicc");
plot16(0,"zero");
end;
IF DYN =1 THEN BEGIN
if swic>0 then begin
sarSh=value13;
alrtsarSh=value13;
alrtsar=value9;
plot18(sarSh,"SarSh",RGB_SH);end;
if swic>0 and alrtsarSh<alrtsarSh[1] then begin alrtsarSh=alrtsarSh[1];
plot19(alrtsarSh,"alrtSarSh"); END;
if swic<0 then begin
sar=value9;
alrtsarSh=value13;
alrtsar=value9;
plot17(sar,"Sar",RGB_LG);end;
if swic<0 and alrtsar>alrtsar[1] then begin alrtsar=alrtsar[1];
plot20(alrtsar,"alrtSar");
end;
end;
if swic>0 then begin setplotcolor(15,green);
//setplotcolor(17,green);
//setplotcolor(18,green);
end;
if swic<0 then begin setplotcolor(15,red);
//setplotcolor(17,red);
//setplotcolor(18,red);
end;
value3=value2/squareroot(DIV);
value4=(value1*value3)/100;
value5=Arr *round( (floor(value4/DIV2))/Arr,0);
//value5=floor(value4/DIV2);
value6=Arr*round((value1+(value5*Molt))/Arr,0);
value7=value6+value5;
value8=value7+value5;
value9=value8+value5;
value20=value9+value5;
value21=value20+value5;
value22=value21+value5;
value23=value1+value5;
if Plot_Swicc=0 and Dyn=0 then begin
IF Plot_ESTREME=0 THEN BEGIN
plot22(value23,"Liv0"); end;
plot2(value6,"Liv1");
plot3(value7,"Liv2");
plot4(value8,"Liv3");
plot5(value9,"Liv4");
plot10(value20,"Liv5");
end;
value10=Arr*round((value1-(value5*Molt))/Arr,0);
value11=value10-value5;
value12=value11-value5;
value13=value12-value5;
value14=value13-value5;
value15=value14-value5;
value16=value15-value5;
value24=value1-value5;
if Plot_Swicc=0 and Dyn=0 then begin
IF Plot_ESTREME=0 THEN BEGIN
plot21(value24,"Liv-0");end;
plot6(value10,"Liv-1");
plot7(value11,"Liv-2");
plot8(value12,"Liv-3");
plot9(value13,"Liv-4");
plot13(value14,"Liv-5");
end;
{if swic=1 then begin
setplotcolor(2,darkgray);
setplotcolor(3,darkgray);
setplotcolor(4,darkgray);
setplotcolor(5,darkgray);
setplotcolor(22,darkgray);
end;
if swic=-1 then begin
setplotcolor(21,darkgray);
setplotcolor(6,darkgray);
setplotcolor(7,darkgray);
setplotcolor(8,darkgray);
setplotcolor(9,darkgray);
end;}
{SCRIVE LIVELLI EDGE}
Variables: sar_text(-1),sarsh_text(-1),Oldsar_text(-1),Oldsarsh_text(-1),AGGIUNGI(0);
AGGIUNGI=ABSVALUE((2-Molt)*value5);
if barnumber<>barnumber[1] then begin
if swic=-1 then begin
Oldsar_text=sar_text;
sar_text = Text_New(Date, Time, value9+AGGIUNGI, NumToStr(value9+AGGIUNGI,0));
If Oldsar_text <> -1 Then
Value51 = Text_Delete(Oldsar_text);
end;
if swic=1 then begin
Oldsarsh_text=sarsh_text;
sarsh_text = Text_New(Date, Time, sarsh-AGGIUNGI, NumToStr(value13-AGGIUNGI,0));
If Oldsarsh_text <> -1 Then
Value52 = Text_Delete(Oldsarsh_text);
end;
end;
if lastbaronchart then begin//and swic=-1
Text_SetColor(sar_text, RGB_SH);
Text_SetString(sar_text, NumToStr(value9+AGGIUNGI,0)+" Lg Fut "+ingresso);
Text_SetLocation(sar_text, Date, Time+2*barinterval,value9+AGGIUNGI);end;
if lastbaronchart then begin//and swic=1
Text_SetColor(sarsh_text, RGB_LG);
Text_SetString(sarsh_text, NumToStr(value13-AGGIUNGI,0)+" Sh Fut "+ingresso);
Text_SetLocation(sarsh_text, Date, Time+2*barinterval,value13-AGGIUNGI);end;
{SCRIVE LIVELLI 1 SELL CALL PUT}
Variables: sellcall_text(-1),sellput_text(-1),Oldsellcall_text(-1),Oldsellput_text(-1);
if barnumber<>barnumber[1] then begin
if swic=-1 then begin
Oldsellcall_text=sellcall_text;
sellcall_text = Text_New(Date, Time, value8+AGGIUNGI, NumToStr(value8+AGGIUNGI,0));
If Oldsellcall_text <> -1 Then
Value53 = Text_Delete(Oldsellcall_text);
end;
if swic=1 then begin
Oldsellput_text=sellput_text;
sellput_text = Text_New(Date, Time, value12-AGGIUNGI, NumToStr(value12-AGGIUNGI,0));
If Oldsellput_text <> -1 Then
Value54 = Text_Delete(Oldsellput_text);
end;
end;
if lastbaronchart then begin//and swic=-1
Text_SetColor(sellcall_text, RGB_LG);
Text_SetString(sellcall_text, NumToStr(value8+AGGIUNGI,0)+" 2^SellCall ");
Text_SetLocation(sellcall_text, Date, Time+2*barinterval,value8+AGGIUNGI);end;
if lastbaronchart then begin//and swic=1
Text_SetColor(sellput_text, RGB_SH);
Text_SetString(sellput_text, NumToStr(value12-AGGIUNGI,0)+" 2^SellPut ");
Text_SetLocation(sellput_text, Date, Time+2*barinterval,value12-AGGIUNGI);end;
{SCRIVE LIVELLI 2 SELL CALL PUT}
Variables: sellcall2_text(-1),sellput2_text(-1),Oldsellcall2_text(-1),Oldsellput2_text(-1);
if barnumber<>barnumber[1] then begin
if swic=-1 then begin
Oldsellcall2_text=sellcall2_text;
sellcall2_text = Text_New(Date, Time, value7+AGGIUNGI, NumToStr(value7+AGGIUNGI,0));
If Oldsellcall2_text <> -1 Then
Value55 = Text_Delete(Oldsellcall2_text);
end;
if swic=1 then begin
Oldsellput2_text=sellput2_text;
sellput2_text = Text_New(Date, Time, value11-AGGIUNGI, NumToStr(value11-AGGIUNGI,0));
If Oldsellput2_text <> -1 Then
Value56 = Text_Delete(Oldsellput2_text);
end;
end;
if lastbaronchart then begin//and swic=-1
Text_SetColor(sellcall2_text, RGB_LG);
Text_SetString(sellcall2_text, NumToStr(value7+AGGIUNGI,0)+" 1^SellCall ");
Text_SetLocation(sellcall2_text, Date, Time+2*barinterval,value7+AGGIUNGI);end;
if lastbaronchart then begin//and swic=1
Text_SetColor(sellput2_text, RGB_SH);
Text_SetString(sellput2_text, NumToStr(value11-AGGIUNGI,0)+" 1^SellPut ");
Text_SetLocation(sellput2_text, Date, Time+2*barinterval,value11-AGGIUNGI);end;