组合而成。感谢两位作者。。再加上压力线。。两个公式。。大家喜欢哪个就用哪个吧。。
公式1:
N:=7; N2:=8; N3:=9;
VAR1:=REF(MA(C,20),10);开:=O-VAR1;高:=H-VAR1;低:=L-VAR1;收:=C-VAR1;MID:=MA(C,20);
UPPER:=MID+2*STD(C,20);LOWER:=MID-2*STD(C,20);V1:=(C-LOWER)/(UPPER-LOWER)*100;
V2:=V1-EMA(V1,5);K1:=SUM(LLV(V2,4),4)/4;V3:=EMA(V2,64)*10;V4:=EMA(0.4*V2*(-1),3);
V5:=-1*EMA(V2,39)*10;A:=V3>10;B:=V2>V4;D:=V5>10;E:=V3<=10 OR V2<=V4 OR V5<=10;
均线1:MA(收, N);
均线2:MA(收, N2);
均线3:MA(收, N3);
XG:((均线1,均线3)),COLORMAGENTA;
STICKLINE(C,0,0,6,0),COLORD9D919;
STICKLINE(收>=开 AND E,高,低,0,0), COLORYELLOW;
STICKLINE(收>=开 AND E,收,开,2,0) ,COLORYELLOW;
STICKLINE(收< 开 AND E,高,低,0,0) ,COLORYELLOW;
STICKLINE(收< 开 AND E,收,开,2,0) ,COLORYELLOW;
STICKLINE(开> 收 AND A ,低,高,0,0),COLORFF0000;
STICKLINE(开> 收 AND A ,收,开,2,0),COLORFF0000;
STICKLINE(开<=收 AND A,低,高,0,0),COLORYELLOW;
STICKLINE(开<=收 AND A,收,开,2,1),COLORYELLOW;
STICKLINE(开> 收 AND B,低,高,0,0),COLORRED;
STICKLINE(开> 收 AND B,收,开,2,0),COLORRED;
STICKLINE(开<=收 AND B,低,高,0,0),COLORRED;
STICKLINE(开<=收 AND B,收,开,2,1),COLORRED;
STICKLINE(开> 收 AND D,低,高,0,0),COLORGREEN;
STICKLINE(开> 收 AND D,收,开,2,0),COLORGREEN;
{STICKLINE(开<=收 AND D,收,开,2,1),COLORGREEN;}
HIGHN:=8;LOWN:=8;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
AA:=REF(高,HIGHN)=HHV(高,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND 高=HHV(高,HIGHN+1);
DRAWICON(CC,高*1.02,2);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(高,DDD),高);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
高点压力1:DRAWLINE(CURRBARSCOUNT=GDCS2,高,CURRBARSCOUNT=GDCS1,高,1) ;
高点压力2:DRAWLINE(CURRBARSCOUNT=GDCS2,高,ISLASTBAR,REF(高,GDCS2-1),1);
高点压力3:DRAWLINE(CURRBARSCOUNT=GDCS1,高,ISLASTBAR,REF(高,GDCS1-1),1);
AA1:=REF(低,LOWN)=LLV(低,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND 低=LLV(低,LOWN+1);
DRAWICON(CC1,低*0.98,1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(低,DD1),低);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
低点支撑:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,低,1) ;
ZGSTAR:=(高点压力1+低点支撑)/2;
ZGEND:=CONST((高点压力1+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1);
低点支撑1:DRAWLINE(CURRBARSCOUNT=DDCS1,低,ISLASTBAR,REF(低,DDCS1-1),1);
低点支撑2:DRAWLINE(CURRBARSCOUNT=DDCS2,低,ISLASTBAR,REF(低,DDCS2-1),1);
公式2:
N:=7; N2:=8; N3:=9;
C1:=10000*CLOSE/INDEXC;
O1:=10000*OPEN/INDEXO;
H1:=10000*HIGH/INDEXH;
L1:=10000*LOW/INDEXL;
LL:=IF(L1<C1 AND L1<O1,L1,MIN(C1,O1));
HH:=IF(H1>C1 AND H1>O1,H1,MAX(C1,O1));
均线1:MA(C1, N);
均线2:MA(C1, N2);
均线3:MA(C1, N3);
MID:=MA(C,20);
UPPER:=MID+2*STD(C,20);
LOWER:=MID-2*STD(C,20);
V1:=(C-LOWER)/(UPPER-LOWER)*100;
V2:=V1-EMA(V1,5);
V3:=EMA(V2,64)*10;V4:=EMA(0.4*V2*(-1),3);
V5:=-1*EMA(V2,39)*10;
A:=V3>10;B:=V2>V4;D:=V5>10;E:=V3<=10;
{STICKLINE(C,0,0,6,0),COLORD9D919;}
STICKLINE(C1>=O1 AND E,HH,LL,0,0), COLORYELLOW;
STICKLINE(C1>=O1 AND E,C1,O1,2,0) ,COLORYELLOW;
STICKLINE(C1< O1 AND E,HH,LL,0,0) ,COLORYELLOW;
STICKLINE(C1< O1 AND E,C1,O1,2,0) ,COLORYELLOW;
STICKLINE(O1> C1 AND A ,LL,HH,0,0),COLORFF0000;
STICKLINE(O1> C1 AND A ,C1,O1,2,0),COLORFF0000;
STICKLINE(O1<=C1 AND A,LL,HH,0,0),COLORYELLOW;
STICKLINE(O1<=C1 AND A,C1,O1,2,1),COLORYELLOW;
STICKLINE(O1> C1 AND B,LL,HH,0,0),COLORRED;
STICKLINE(O1> C1 AND B,C1,O1,2,0),COLORRED;
STICKLINE(O1<=C1 AND B,LL,HH,0,0),COLORRED;
STICKLINE(O1<=C1 AND B,C1,O1,2,1),COLORRED;
STICKLINE(O1> C1 AND D,LL,HH,0,0),COLORGREEN;
STICKLINE(O1> C1 AND D,C1,O1,2,0),COLORGREEN;
{STICKLINE(O1<=C1 AND D,C1,O1,2,1),COLORGREEN;};
HIGHN:=8;LOWN:=8;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
AA:=REF(HH,HIGHN)=HHV(HH,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND HH=HHV(HH,HIGHN+1);
DRAWICON(CC,HH*1.02,2);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(HH,DDD),HH);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
高点压力1:DRAWLINE(CURRBARSCOUNT=GDCS2,HH,CURRBARSCOUNT=GDCS1,HH,1) ;
高点压力2:DRAWLINE(CURRBARSCOUNT=GDCS2,HH,ISLASTBAR,REF(HH,GDCS2-1),1);
高点压力3:DRAWLINE(CURRBARSCOUNT=GDCS1,HH,ISLASTBAR,REF(HH,GDCS1-1),1);
AA1:=REF(LL,LOWN)=LLV(LL,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND LL=LLV(LL,LOWN+1);
DRAWICON(CC1,LL*0.98,1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(LL,DD1),LL);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
低点支撑:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,LL,1) ;
ZGSTAR:=(高点压力1+低点支撑)/2;
ZGEND:=CONST((高点压力1+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1);
低点支撑1:DRAWLINE(CURRBARSCOUNT=DDCS1,LL,ISLASTBAR,REF(LL,DDCS1-1),1);
低点支撑2:DRAWLINE(CURRBARSCOUNT=DDCS2,LL,ISLASTBAR,REF(LL,DDCS2-1),1);
|