juhua624536.cn
我們隻提供有用的幹貨

修改畫線顔色 (文華财經WH6赢順V6.7)

投資者咨詢:修改畫線顔色 (文華财經WH6赢順V6.7)
來源:文華财經  日期:2019/8/24 20:55
 老師好       請見截圖說明要求,修正變色線指标,并且屏蔽虛虛,(不是删除)
AAA:=1;
 N:=BARSLAST(DATE<>REF(DATE,1))+1;
N1:=BARSLAST(TIME=0900);
N3:=BARSLAST(TIME=2100);
NN:=MIN1(N1,N3);
A:=BACKSET(ISLASTBAR,N);
G:=MA(C,5);
D:=MA(C,10);
NNH:=BARSLAST(H=HHV(H,7)),NODRAW;
NNL:=BARSLAST(L=LLV(L,7)),NODRAW;
MM:=IF(REF(G,NNH)>REF(D,NNH) AND NNH<=4,NNH,IF(REF(G,NNL)<REF(D,NNL) AND NNL<=4,NNL,5)) ,NODRAW;
M:=IF(ISLASTBAR AND MM>0,MM,5) ,NODRAW;
HH:=REF(H,M)=HHV(H,6)*AAA;
LL:=REF(L,M)=LLV(L,6)*AAA;
FG01:=BACKSET(HH,M+1)>BACKSET(HH,M),NODRAW;
FD01:=BACKSET(LL,M+1)>BACKSET(LL,M) ,NODRAW;
FG02:=FG01=FD01 AND G>D,NODRAW;
FD02:=FG01=FD01 AND G<D,NODRAW;
FG0:=FG01 AND IF(FG02=1,H=HHV(H,BARSLAST(REF(FD01,1))+1),H=HHV(H,IF(BARSLAST(L=LLV(L,7))>=5,5,BARSLAST(FD01)))) AND FD02=0 ,NODRAW;
FD0:=FD01 AND IF(FD02=1,L=LLV(L,BARSLAST(REF(FG01,1))+1),L=LLV(L,IF(BARSLAST(H=HHV(L,7))>=5,5,BARSLAST(FG01))))  AND FG02=0 ,NODRAW;
GT:=BARSLAST(FG0),NODRAW;
DT:=BARSLAST(FD0),NODRAW;
LLLL:=DT=0 AND REF(DT,1)<GT AND L>REF(L,REF(DT,1)+1),NODRAW;
FG1:=BACKSET(REFX(GT,1)=0 AND GT<DT AND REFX(H,1)>=REF(H,GT),GT+1),NODRAW;
FD1:=BACKSET(REFX(DT,1)=0 AND DT<GT AND REFX(L,1)<=REF(L,DT),DT+1),NODRAW;
FG11:=IF(GT=0 AND REF(GT,1)<DT AND IF(REF(G,BARSLAST(L=LLV(L,7)))>REF(D,BARSLAST(L=LLV(L,7))),BARSLAST(L=LLV(L,7))<5,1) AND  H<REF(H,REF(GT,1)+1),1,0),NODRAW;
FD11:=IF(DT=0 AND REF(DT,1)<GT AND IF(REF(G,BARSLAST(H=HHV(H,7)))<REF(D,BARSLAST(H=HHV(H,7))),BARSLAST(H=HHV(H,7))<5,1) AND L>REF(L,REF(DT,1)+1),1,0),NODRAW;
GT1:=BARSLAST(FG11<>1 AND FG1<>1 AND FG0),NODRAW;
DT1:=BARSLAST(FD11<>1 AND FD1<>1 AND FD0),NODRAW;
FD2:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)>LLV(L,GT1+5),DT1+1),NODRAW;
/*加兩句,低是最低,去兩邊;
NL:GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 ,NODRAW;
LLLLLLLL:LLV(L,GT1+5),NODRAW;
*/
FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LLV(L,GT1+5) AND REF(H,GT1)>HHV(H,GT1+5),GT1+1),NODRAW;
FG2B:=IF(GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 AND REF(L,DT1)<=LLV(L,REF(GT1,1)+6) AND H>HHV(H,REF(GT1,1)+6),1,0),NODRAW;
FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+5),GT1+1),NODRAW;
FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+5) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;
FD2B:=IF(DT1=0 AND GT1<4 AND REF(DT1,1)-GT1<4 AND REF(H,GT1)>=HHV(H,REF(DT1,1)+6) AND L>LLV(L,REF(DT1,1)+6),1,0),NODRAW;
/*HHV(H,GT1+1)<HHV(H,GT1+15)
GGG:HHV(H,GT1+1),NODRAW;
DDD:HHV(H,GT1+15),NODRAW;
處理單邊都少于3根的筆*/
TTTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW;
HHHHHH:=REF(LLV(L,10),DT1),NODRAW;
FG21:=IF(GT1=0 AND DT1<4 AND H<=REF(H,REF(GT1,1)+1)  ,1,0),NODRAW;
FD21:=IF(DT1=0 AND GT1<4  AND L>=REF(L,REF(DT1,1)+1) ,1,0),NODRAW;
FD231:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND REF(L,DT1)>REF(LLV(L,10),DT1),DT1+1),NODRAW;
FG23:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND  GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND (REF(H,GT1)<REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW;
FG231:=BACKSET(REFX(DT1,1)=0 AND GT1>3  AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND REF(H,GT1)<REF(HHV(H,10),GT1) ,GT1+1),NODRAW;
FD23:=BACKSET(REFX(DT1,1)=0 AND GT1>3  AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND ( REF(L,DT1)>REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW;
FDD23:=REF(H,GT1)<REF(HHV(H,10),GT1) OR REF(FD23,DT1)=0,NODRAW;
FD24:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)<HHV(H,GT1+3) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;
FG24:=BACKSET(REFX(DT1,1)=0 AND GT1>3  AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)>LLV(L,DT1+3) AND REF(H,GT1)<HHV(H,GT1+5),GT1+1),NODRAW;
GT2:=BARSLAST(FG21<>1 AND FG23<>1 AND FG231<>1 AND FG24<>1   AND FG2<>1 AND FG2A<>1 AND FG2B<>1 AND GT1=0),NODRAW;
DT2:=BARSLAST(FD21<>1 AND FD23<>1 AND FD231<>1 AND FD24<>1  AND FD2<>1 AND FD2A<>1 AND FD2B<>1 AND DT1=0),NODRAW;
FG3:=BACKSET(REFX(GT2,1)=0 AND GT2<DT2 AND REFX(H,1)>=REF(H,GT2),GT2+1),NODRAW;
FD3:=BACKSET(REFX(DT2,1)=0 AND DT2<GT2 AND REFX(L,1)<=REF(L,DT2),DT2+1),NODRAW;
FG31:=IF(GT2=0 AND REF(GT2,1)<DT2 AND H<REF(H,REF(GT2,1)+1),1,0),NODRAW;
FD31:=IF(DT2=0 AND REF(DT2,1)<GT2 AND L>REF(L,REF(DT2,1)+1),1,0),NODRAW;
GT3:=BARSLAST(GT2=0 AND FG3<>1 AND FG31<>1 ),NODRAW;
DT3:=BARSLAST(DT2=0 AND  FD3<>1 AND FD31<>1),NODRAW;
FG4:=BACKSET(REFX(GT3,1)=0 AND GT3<DT3 AND REFX(H,1)>=REF(H,GT3),GT3+1),NODRAW;
FD4:=BACKSET(REFX(DT3,1)=0 AND DT3<GT3 AND REFX(L,1)<=REF(L,DT3),DT3+1),NODRAW;
FG41:=IF(GT3=0 AND REF(GT3,1)<DT3 AND H<REF(H,REF(GT3,1)+1),1,0),NODRAW;
FD41:=IF(DT3=0 AND REF(DT3,1)<GT3 AND L>REF(L,REF(DT3,1)+1),1,0),NODRAW;
HHH:=GT3=0 AND FG31<>1 AND  FG3<>1||ISLASTBAR,NODRAW;
LLL:=DT3=0 AND FD31<>1 AND  FD3<>1|| ISLASTBAR,NODRAW;
AA1:=GT3=0 AND FG31<>1 AND  FG3<>1,NODRAW;
BB1:=DT3=0 AND FD31<>1 AND  FD3<>1,NODRAW;
QQ:=BACKSET(ISLASTBAR,MAX(BARSLAST(AA1)+1,BARSLAST(BB1)+1*AAA)),NODRAW;
DRAWHORIZONTALLINE(HHH&&QQ,H,COLORWHITE),DASH;
DRAWHORIZONTALLINE(LLL&&QQ,L,COLORWHITE),DASH;
HHH1:=VALUEWHEN(AA1&&QQ,H);
LLL1:=VALUEWHEN(BB1&&QQ,L);
高點:VALUEWHEN(AA1&&QQ,H),COLORRED,NODRAW,PRECIS0;
低點:VALUEWHEN(BB1&&QQ,L),COLORGREEN,NODRAW,PRECIS0;
DRAWNUMBER(ISLASTBAR,HHH1,HHH1,0,COLORWHITE),ALIGN0,VALIGN1,FONTSIZE20;
DRAWNUMBER(ISLASTBAR,LLL1,LLL1,0,COLORWHITE),ALIGN0,VALIGN1,FONTSIZE20;
ZZ1:=REF(BARSLAST(HHH),1),NODRAW;
ZZ2:=REF(BARSLAST(LLL),1),NODRAW;
AX:=IF(BARSLAST(HHH)<=BARSLAST(LLL),IF(ISLASTBAR,IF(ZZ1<ZZ2,L,H),TRENDLINES(HHH ,H ,LLL ,L )),IF(ISLASTBAR,IF(ZZ1<ZZ2,H,L),TRENDLINES(LLL,L,HHH ,H))),LINETHICK5,COLORWHITE,NODRAW;
TT:=HHH||LLL;
TNN:=SUMBARS(TT,7*AAA),NODRAW;
TB:=BACKSET(ISLASTBAR,TNN),NODRAW;
TBN:=BARSLAST(CROSS(TB=1,0.5))+1,NODRAW;
T1:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=1,H),NODRAW,COLORMAGENTA,PRECIS0;
T2:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=2,L),NODRAW,COLORYELLOW,PRECIS0;
T3:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=3,H),NODRAW,COLORMAGENTA,PRECIS0;
T4:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=4,L),NODRAW,COLORYELLOW,PRECIS0;
T5:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=5,H),NODRAW,COLORWHITE,PRECIS0;
T6:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=6,L),NODRAW,COLORWHITE,PRECIS0;
S1:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=1,L),NODRAW,COLORMAGENTA,PRECIS0;
S2:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=2,H),NODRAW,COLORYELLOW,PRECIS0;
S3:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=3,L),NODRAW,COLORMAGENTA,PRECIS0;
S4:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=4,H),NODRAW,COLORYELLOW,PRECIS0;
S5:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=5,L),NODRAW,COLORWHITE,PRECIS0;
S6:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=6,H),NODRAW,COLORWHITE,PRECIS0;
DIFF: =EMA(CLOSE,12) - EMA(CLOSE,26),NODRAW;
DEA: =EMA(DIFF,9);
MACD: =2*(DIFF-DEA),COLORYELLOW;
JC:= DEA-DIFF;
MACDMA:=EMA(MACD,3),COLORMAGENTA,LINETHICK1;
RMACD:=REF(MACD,1);
A0:=0,COLORRED,LINETHICK2;
EMA55:=EMA(CLOSE,55),RGB(0,128,255),DASHDOT;
MA27:=MA(CLOSE,27),COLORMAGENTA,DOT;
MA1:=MA(CLOSE,4)*AAA;
MA2:=MA(CLOSE,3)*AAA;
MA3:=MA(CLOSE,2)*AAA;
BB:=MACD<0&&NOT(MACD>REF(MACD,1))||MACD>0&&MACD<REF(MACD,1);
AA:=MACD>0&&NOT(MACD<REF(MACD,1))||MACD<0&&MACD>REF(MACD,1);
NN1:=BARSLAST(BARSLAST(AA)<BARSLAST(BB)&&BARSLAST(AA)<BARSLAST(BB));
MM1:=BARSLAST(BARSLAST(AA)>=BARSLAST(BB)&&BARSLAST(AA)>=BARSLAST(BB));
DRAWCOLORLINE(BARSLAST(AA)<BARSLAST(BB),IF(AX=0,NULL,AX)*AAA,COLORRED,COLORGREEN),LINETHICK4;
DRAWNUMBER1(LLL,L,L,0),COLORYELLOW,FONTSIZE15,VALIGN0;
DRAWNUMBER1(HHH,H,H,0),COLORWHITE,FONTSIZE15,VALIGN2;


圖片點擊可在新窗口打開查看


 
技術人員回複
日期:2019/8/25 9:15
 參考:

AAA:=1;
 N:=BARSLAST(DATE<>REF(DATE,1))+1;
N1:=BARSLAST(TIME=0900);
N3:=BARSLAST(TIME=2100);
NN:=MIN1(N1,N3);
A:=BACKSET(ISLASTBAR,N);
G:=MA(C,5);
D:=MA(C,10);
NNH:=BARSLAST(H=HHV(H,7)),NODRAW;
NNL:=BARSLAST(L=LLV(L,7)),NODRAW;
MM:=IF(REF(G,NNH)>REF(D,NNH) AND NNH<=4,NNH,IF(REF(G,NNL)<REF(D,NNL) AND NNL<=4,NNL,5)) ,NODRAW;
M:=IF(ISLASTBAR AND MM>0,MM,5) ,NODRAW;
HH:=REF(H,M)=HHV(H,6)*AAA;
LL:=REF(L,M)=LLV(L,6)*AAA;
FG01:=BACKSET(HH,M+1)>BACKSET(HH,M),NODRAW;
FD01:=BACKSET(LL,M+1)>BACKSET(LL,M) ,NODRAW;
FG02:=FG01=FD01 AND G>D,NODRAW;
FD02:=FG01=FD01 AND G<D,NODRAW;
FG0:=FG01 AND IF(FG02=1,H=HHV(H,BARSLAST(REF(FD01,1))+1),H=HHV(H,IF(BARSLAST(L=LLV(L,7))>=5,5,BARSLAST(FD01)))) AND FD02=0 ,NODRAW;
FD0:=FD01 AND IF(FD02=1,L=LLV(L,BARSLAST(REF(FG01,1))+1),L=LLV(L,IF(BARSLAST(H=HHV(L,7))>=5,5,BARSLAST(FG01))))  AND FG02=0 ,NODRAW;
GT:=BARSLAST(FG0),NODRAW;
DT:=BARSLAST(FD0),NODRAW;
LLLL:=DT=0 AND REF(DT,1)<GT AND L>REF(L,REF(DT,1)+1),NODRAW;
FG1:=BACKSET(REFX(GT,1)=0 AND GT<DT AND REFX(H,1)>=REF(H,GT),GT+1),NODRAW;
FD1:=BACKSET(REFX(DT,1)=0 AND DT<GT AND REFX(L,1)<=REF(L,DT),DT+1),NODRAW;
FG11:=IF(GT=0 AND REF(GT,1)<DT AND IF(REF(G,BARSLAST(L=LLV(L,7)))>REF(D,BARSLAST(L=LLV(L,7))),BARSLAST(L=LLV(L,7))<5,1) AND  H<REF(H,REF(GT,1)+1),1,0),NODRAW;
FD11:=IF(DT=0 AND REF(DT,1)<GT AND IF(REF(G,BARSLAST(H=HHV(H,7)))<REF(D,BARSLAST(H=HHV(H,7))),BARSLAST(H=HHV(H,7))<5,1) AND L>REF(L,REF(DT,1)+1),1,0),NODRAW;
GT1:=BARSLAST(FG11<>1 AND FG1<>1 AND FG0),NODRAW;
DT1:=BARSLAST(FD11<>1 AND FD1<>1 AND FD0),NODRAW;
FD2:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)>LLV(L,GT1+5),DT1+1),NODRAW;
/*加兩句,低是最低,去兩邊;
NL:GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 ,NODRAW;
LLLLLLLL:LLV(L,GT1+5),NODRAW;
*/
FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LLV(L,GT1+5) AND REF(H,GT1)>HHV(H,GT1+5),GT1+1),NODRAW;
FG2B:=IF(GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 AND REF(L,DT1)<=LLV(L,REF(GT1,1)+6) AND H>HHV(H,REF(GT1,1)+6),1,0),NODRAW;
FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+5),GT1+1),NODRAW;
FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+5) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;
FD2B:=IF(DT1=0 AND GT1<4 AND REF(DT1,1)-GT1<4 AND REF(H,GT1)>=HHV(H,REF(DT1,1)+6) AND L>LLV(L,REF(DT1,1)+6),1,0),NODRAW;
/*HHV(H,GT1+1)<HHV(H,GT1+15)
GGG:HHV(H,GT1+1),NODRAW;
DDD:HHV(H,GT1+15),NODRAW;
處理單邊都少于3根的筆*/
TTTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW;
HHHHHH:=REF(LLV(L,10),DT1),NODRAW;
FG21:=IF(GT1=0 AND DT1<4 AND H<=REF(H,REF(GT1,1)+1)  ,1,0),NODRAW;
FD21:=IF(DT1=0 AND GT1<4  AND L>=REF(L,REF(DT1,1)+1) ,1,0),NODRAW;
FD231:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND REF(L,DT1)>REF(LLV(L,10),DT1),DT1+1),NODRAW;
FG23:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND  GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND (REF(H,GT1)<REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW;
FG231:=BACKSET(REFX(DT1,1)=0 AND GT1>3  AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND REF(H,GT1)<REF(HHV(H,10),GT1) ,GT1+1),NODRAW;
FD23:=BACKSET(REFX(DT1,1)=0 AND GT1>3  AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND ( REF(L,DT1)>REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW;
FDD23:=REF(H,GT1)<REF(HHV(H,10),GT1) OR REF(FD23,DT1)=0,NODRAW;
FD24:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)<HHV(H,GT1+3) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;
FG24:=BACKSET(REFX(DT1,1)=0 AND GT1>3  AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)>LLV(L,DT1+3) AND REF(H,GT1)<HHV(H,GT1+5),GT1+1),NODRAW;
GT2:=BARSLAST(FG21<>1 AND FG23<>1 AND FG231<>1 AND FG24<>1   AND FG2<>1 AND FG2A<>1 AND FG2B<>1 AND GT1=0),NODRAW;
DT2:=BARSLAST(FD21<>1 AND FD23<>1 AND FD231<>1 AND FD24<>1  AND FD2<>1 AND FD2A<>1 AND FD2B<>1 AND DT1=0),NODRAW;
FG3:=BACKSET(REFX(GT2,1)=0 AND GT2<DT2 AND REFX(H,1)>=REF(H,GT2),GT2+1),NODRAW;
FD3:=BACKSET(REFX(DT2,1)=0 AND DT2<GT2 AND REFX(L,1)<=REF(L,DT2),DT2+1),NODRAW;
FG31:=IF(GT2=0 AND REF(GT2,1)<DT2 AND H<REF(H,REF(GT2,1)+1),1,0),NODRAW;
FD31:=IF(DT2=0 AND REF(DT2,1)<GT2 AND L>REF(L,REF(DT2,1)+1),1,0),NODRAW;
GT3:=BARSLAST(GT2=0 AND FG3<>1 AND FG31<>1 ),NODRAW;
DT3:=BARSLAST(DT2=0 AND  FD3<>1 AND FD31<>1),NODRAW;
FG4:=BACKSET(REFX(GT3,1)=0 AND GT3<DT3 AND REFX(H,1)>=REF(H,GT3),GT3+1),NODRAW;
FD4:=BACKSET(REFX(DT3,1)=0 AND DT3<GT3 AND REFX(L,1)<=REF(L,DT3),DT3+1),NODRAW;
FG41:=IF(GT3=0 AND REF(GT3,1)<DT3 AND H<REF(H,REF(GT3,1)+1),1,0),NODRAW;
FD41:=IF(DT3=0 AND REF(DT3,1)<GT3 AND L>REF(L,REF(DT3,1)+1),1,0),NODRAW;
HHH:=GT3=0 AND FG31<>1 AND  FG3<>1||ISLASTBAR,NODRAW;
LLL:=DT3=0 AND FD31<>1 AND  FD3<>1|| ISLASTBAR,NODRAW;
AA1:=GT3=0 AND FG31<>1 AND  FG3<>1,NODRAW;
BB1:=DT3=0 AND FD31<>1 AND  FD3<>1,NODRAW;
QQ:=BACKSET(ISLASTBAR,MAX(BARSLAST(AA1)+1,BARSLAST(BB1)+1*AAA)),NODRAW;
//DRAWHORIZONTALLINE(HHH&&QQ,H,COLORWHITE),DASH;
//DRAWHORIZONTALLINE(LLL&&QQ,L,COLORWHITE),DASH;
HHH1:=VALUEWHEN(AA1&&QQ,H);
LLL1:=VALUEWHEN(BB1&&QQ,L);
高點:VALUEWHEN(AA1&&QQ,H),COLORRED,NODRAW,PRECIS0;
低點:VALUEWHEN(BB1&&QQ,L),COLORGREEN,NODRAW,PRECIS0;
DRAWNUMBER(ISLASTBAR,HHH1,HHH1,0,COLORWHITE),ALIGN0,VALIGN1,FONTSIZE20;
DRAWNUMBER(ISLASTBAR,LLL1,LLL1,0,COLORWHITE),ALIGN0,VALIGN1,FONTSIZE20;
ZZ1:=REF(BARSLAST(HHH),1),NODRAW;
ZZ2:=REF(BARSLAST(LLL),1),NODRAW;
AX:=IF(BARSLAST(HHH)<=BARSLAST(LLL),IF(ISLASTBAR,IF(ZZ1<ZZ2,L,H),TRENDLINES(HHH ,H ,LLL ,L )),IF(ISLASTBAR,IF(ZZ1<ZZ2,H,L),TRENDLINES(LLL,L,HHH ,H))),LINETHICK5,COLORWHITE,NODRAW;
TT:=HHH||LLL;
TNN:=SUMBARS(TT,7*AAA),NODRAW;
TB:=BACKSET(ISLASTBAR,TNN),NODRAW;
TBN:=BARSLAST(CROSS(TB=1,0.5))+1,NODRAW;
T1:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=1,H),NODRAW,COLORMAGENTA,PRECIS0;
T2:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=2,L),NODRAW,COLORYELLOW,PRECIS0;
T3:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=3,H),NODRAW,COLORMAGENTA,PRECIS0;
T4:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=4,L),NODRAW,COLORYELLOW,PRECIS0;
T5:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=5,H),NODRAW,COLORWHITE,PRECIS0;
T6:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=6,L),NODRAW,COLORWHITE,PRECIS0;
S1:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=1,L),NODRAW,COLORMAGENTA,PRECIS0;
S2:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=2,H),NODRAW,COLORYELLOW,PRECIS0;
S3:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=3,L),NODRAW,COLORMAGENTA,PRECIS0;
S4:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=4,H),NODRAW,COLORYELLOW,PRECIS0;
S5:VALUEWHEN(LLL&&TB&&COUNT(TT,TBN)=5,L),NODRAW,COLORWHITE,PRECIS0;
S6:VALUEWHEN(HHH&&TB&&COUNT(TT,TBN)=6,H),NODRAW,COLORWHITE,PRECIS0;
DIFF: =EMA(CLOSE,12) - EMA(CLOSE,26),NODRAW;
DEA: =EMA(DIFF,9);
MACD: =2*(DIFF-DEA),COLORYELLOW;
JC:= DEA-DIFF;
MACDMA:=EMA(MACD,3),COLORMAGENTA,LINETHICK1;
RMACD:=REF(MACD,1);
A0:=0,COLORRED,LINETHICK2;
EMA55:=EMA(CLOSE,55),RGB(0,128,255),DASHDOT;
MA27:=MA(CLOSE,27),COLORMAGENTA,DOT;
MA1:=MA(CLOSE,4)*AAA;
MA2:=MA(CLOSE,3)*AAA;
MA3:=MA(CLOSE,2)*AAA;
BB:=MACD<0&&NOT(MACD>REF(MACD,1))||MACD>0&&MACD<REF(MACD,1);
AA:=MACD>0&&NOT(MACD<REF(MACD,1))||MACD<0&&MACD>REF(MACD,1);
NN1:=BARSLAST(BARSLAST(AA)<BARSLAST(BB)&&BARSLAST(AA)<BARSLAST(BB));
MM1:=BARSLAST(BARSLAST(AA)>=BARSLAST(BB)&&BARSLAST(AA)>=BARSLAST(BB));
//DRAWCOLORLINE(BARSLAST(AA)<BARSLAST(BB),IF(AX=0,NULL,AX)*AAA,COLORRED,COLORGREEN),LINETHICK4;
DRAWNUMBER1(LLL,L,L,0),COLORYELLOW,FONTSIZE15,VALIGN0;
DRAWNUMBER1(HHH,H,H,0),COLORWHITE,FONTSIZE15,VALIGN2;
DRAWLINE1(LLL,L,HHH,H,0), LINETHICK4,COLORRED;
DRAWLINE1(HHH,H,LLL,L,0), LINETHICK4,COLORGREEN;