名字自己起吧,公式不错的
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点}
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1=E2));
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H1,X2)>0,HHVBARS(IF(H1,HIGH,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
DRAWLINE(LD,L,HD,H,0),COLORWHITE,LINETHICK1,POINTDOT;
DRAWLINE(HD,H,LD,L,0),COLORWHITE,LINETHICK1,POINTDOT;
J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1);
DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK1,POINTDOT;
A3:=H; B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD;
A4:=L>REF(L,REF(BARSLAST(LD),1)+1);
B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2);
UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK1;
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK1;
前一低:REF(L,BARSLAST(VV)),COLOR99FF66,POINTDOT,LINETHICK3;
前二低:REF(L,BARSLAST(XX)),COLORFF66FF,POINTDOT,LINETHICK3;
前一高:REF(H,BARSLAST(VV2)),COLOR99FF66,POINTDOT,LINETHICK3;
前二高:REF(H,BARSLAST(XX2)),COLORFF66FF,POINTDOT,LINETHICK3;
短高:=REF(H,BARSLAST(VV2));
短低:=REF(L,BARSLAST(VV));
短比: (C-短低)/(短高-短低),LINETHICK0;
常数:=REF(INDEXC,BARSLAST(VV))/REF(C,BARSLAST(VV));
{以下语句为三角形部分}
底:REF(L,BARSLAST(VV)),COLORred,LINETHICK2;
頂:REF(H,BARSLAST(VV2)),COLORGreen,LINETHICK2;
{下迭三角形:藍色三角形畫完介入}
StickLine(VV,頂,底,0,0),Colorff6633,linethick3;{}
DRAWLINE(VV2,H,VV,L,0),Colorff6633,linethick3;{斜}
DRAWLINE(VV2,H,VV,頂,0),Colorff6633,linethick3;{?}
{上漲三角形:紅色三角形畫完出局}
StickLine(VV2 ,頂,底,0,0),Colorred,linethick3;{}
DRAWLINE(VV,L,VV2,H,0),Colorred,linethick3;{斜}
DRAWLINE(VV,L,VV2,底,0),Colorred,linethick3;{?};
X1:=((((OPEN + (3 * CLOSE)) + LOW) + HIGH) / 6);
X4:=WMA(WMA(X1,1),5);
X5:=(REVERSE(X1) + (2 * X4));
注意: ((3 * X5) - (2 * SMA(X5,2,1))),LINETHICK0,PRECISION2,color9F02;
PARTLINE(CLOSE,注意),LINETHICK2,COLORRED;
短期生命线:MA(CLOSE,3),LINETHICK3,colorfffffb;
gj:=AMOUNT/v/100;
E:=(H+L+O+2*C)/5;
明日阻力:=2*E-L;
明日支撑:=2*E-H;
明日突破:=E+(H-L);
明日反转:=E-(H-L);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
if SYSPARAM(3)=2 then a:=BARPOS;
if SYSPARAM(3)=1 then b:=BARPOS;
d:=a-b;
e:=hhv(h,d);
p1:=SYSPARAM(1);
DRAWTEXTEX(c,1,20,500,'-----------------'),ColorFFFFFF;
DRAWTEXTEX(c,1,20,580,'-----------------'),ColorFFFFFF;
DRAWTEXTEX(c,1,20,660,'-----------------'),ColorFFFFFF;
DRAWTEXTEX(c,1,20,740,'-----------------'),ColorFFFFFF;
DRAWTEXTEX(c,1,20,820,'-----------------'),ColorFFFFFF;
DRAWTEXTEX(c,1,20,900,'-----------------'),ColorFFFFFF;
DRAWTEXTEX(c,1,20,990,'-----------------'),ColorFFFFFF;
DRAWTEXTEX(c,1,20,540,'今日支撑=:'+NUMTOSTR(今日支撑[p1] ,2 )+''),Color00FFFF;
DRAWTEXTEX(c,1,20,620,'今日阻力=:'+NUMTOSTR(今日阻力[p1] ,2 )+''),Color00FF00;
DRAWTEXTEX(c,1,20,700,'明日支撑=:'+NUMTOSTR(明日支撑[p1] ,2 )),ColorFF00FF;
DRAWTEXTEX(c,1,20,780,'明日阻力=:'+NUMTOSTR(明日阻力[p1] ,2 )),ColorFFFF00;
DRAWTEXTEX(c,1,20,860,'明日突破=:'+NUMTOSTR(明日突破[p1] ,2 )),COLORRED;
DRAWTEXTEX(c,1,20,940,'明日反转=:'+NUMTOSTR(明日反转[p1] ,2 )),COLORGREEN;
MA5:=MA(CLOSE,5),COLORFFFFFF;
MA10:=MA(CLOSE,10),COLOR00FFFF;
MA21:=MA (CLOSE,21),COLOR00FF00;
MA30:=MA(CLOSE,30),COLOR0000FF;
买线:=EMA (C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BUY1:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);DRAWTEXT(BUY1,LOW*0.95,'B'),COLORWHITE,LINETHICK5;
DRAWTEXT (SEL,HIGH*1.05,'S'),COLORWHITE,LINETHICK5;
STICKLINE(买线>=卖线,LOW,HIGH,0.1,0),LINETHICK5,COLORYELLOW;
STICKLINE(买线>=卖线,CLOSE,OPEN,3,3),LINETHICK5,COLORYELLOW;
STICKLINE(买线<卖线,CLOSE,OPEN,3,3),LINETHICK5,COLORGREEN;
STICKLINE(买线<卖线,LOW,HIGH,0.1,0),LINETHICK5,COLORGREEN;
STICKLINE(CROSS(买线,卖线) OR CROSS(卖线,买线),OPEN,CLOSE,2.5,0),LINETHICK5,COLORWHITE;
VAR1:=MA(CLOSE,5);
VAR2:=MA(CLOSE,10);
VAR3:=MA(CLOSE,20);
VAR4:=MA(CLOSE,30);
VAR5:=MA(CLOSE,60);
F1:=VAR1>REF(VAR1,1);
F2:=VAR2>REF(VAR2,1);
F3:=VAR2>REF(VAR2,1);
F4:=VAR2>REF(VAR2,1);
F5:=VAR2>REF(VAR2,1);
X1:=EMA(C,7);
DRAWTEXT(FILTER(VAR3 AND VAR2 AND COUNT(X1<REF(X1,1),5)>2 AND X1>REF(X1,1),3),L-0.01,'★短进'),COLORFFFFFF;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(CROSS(75,RSI) , HIGH,'★ 快跑 '),COLOR00FF00; |