X1:= (O+H+L+3*C)/6;
X2 := ((X1+C+H+O+L+(O+C)/2+(O+L)/2+(O+H)/2
+(C+L)/2+(C+H)/2+(L+H)/2
+(O+C+H)/3+(O+C+L)/3)+(O+H+L)/3+(C+H+L)/3)/15;
X3 := EMA(X1,13) - EMA(X1,21);
X4 := EMA(X3,3);
X5 := EMA(X3,10);
X6:=EMA(X2,7)-EMA(X2,21);
X7:=EMA((0.668*REF(X6,1)+0.333*X6),1);
X8:=MA(AMOUNT/(100*V),13);
X9:= (X1-X8)/X8*100;
Q1:=EMA(C,12)-EMA(C,26);{MACD}
Q2:=EMA(Q1,9);
Q3:=Q1-Q2;
B1:=EMA(C,5)-EMA(C,13);
B2:=EMA(B1,3);
B3:=B1-B2;
B4:=Q1>0 AND B3>0;{中线处于强势中的调整,短线强势}
B5:=B1>0 AND Q3>0 AND B3>0;{中短线强势,短线处于强势中的强势}
B6:=Q1>REF(Q1,1)AND B1>REF(B1,1)AND Q2>REF(Q2,1)AND B2>REF(B2,1);{四线同时向上}
B7:=Q3>0 AND B3>0;
B8:=B4 OR B5 OR B6 AND B7;
XX1:=10*B3; XX2:=10*Q3;
短关注:STICKLINE(B3>0 AND Q1-Q2<0,10*B3,0,2,1),COLORWHITE;
买区:STICKLINE(B8,XX1,0,2,1),COLORB2FFAB;
短加速:STICKLINE(CROSS(B1,0),10*B3,0,2,0),COLORFF9966;
中加速:STICKLINE(CROSS(Q1,0),10*Q3,0,2,0),COLOR0099FF;
强势:STICKLINE(Q3>0 AND Q1>0,10*Q3,0,2,1),COLOR6268FF;{中线强势中的强势}
弱强:STICKLINE(Q3>0 AND Q1<0,10*Q3,0,2,1),COLORB2A8FF;{中线弱势中的强势}
减仓:STICKLINE(B3>0 AND Q1>0 AND B3<REF(B3,1),10*B3,0,2,1),COLOR5EFFFF;
做多:IF(X6>=X7,X6+0.018,X7)*4,COLOR0098FF;
涨:IF(X4>=X5,X4+0.011,X5)*4,COLORMAGENTA;
做空:IF(X7-X6,X7,X6)*4,COLORGREEN;
跌:IF(X5-X4,X5,X4)*4,COLORFF5B00;
费氏数:=ZIG(3, 10)>REF(ZIG(3,10),1);
成立距今:=BARSLAST(费氏数=1);
DRAWTEXT(成立距今=5,0,'鱼'),COLORYELLOW;