压力支撑线.ALG
此指标结合了几位指标高手的理论和创意而写,在此先感谢这些高手们。指标主要根据KDJ的金死叉假设为压力支撑评台,应朋友们的请求特发此指标,希望大家喜欢!!
========
{压力支撑线}
DRAWGBK(C=C,COLORRGB(130,130,130),COLORRGB(30,30,30),1);
var1:=(SMA(HIGH,21,2) * 1.05);
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,9,0),colorFF5B00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,8,0),colorFF6C00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,7,0),colorFF7B00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,6,0),colorFF9C00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,5,0),colorFFBE00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,3.5,0),colorFFCC00;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,1.5,0),colorFFFF00;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,9,0),color070084;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,8,0),color0000A3;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,7,0),color0000B7;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,6,0),color0000CD;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,5,0),color0000E9;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,3,0),color0754E9;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1.5,0),color076EF3;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1,0),color077BF3;
STICKLINE((CLOSE > OPEN),OPEN,LOW,1,0),color0726CA;
STICKLINE((CLOSE > OPEN),CLOSE,HIGH,1,0),color0726CA;
STICKLINE((OPEN > CLOSE),CLOSE,LOW,1,0),colorDE9100;
STICKLINE((OPEN > CLOSE),OPEN,HIGH,1,0),colorDE9100;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,9,0),color0090FF;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,8,0),color009FFF;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,4,0),color00B5FF;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,2,0),color00E4FF;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),OPEN,LOW,0.7,0),color00FFFF;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < var1)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,HIGH,0.7,0),color00FFFF;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),OPEN,LOW,0.7,0),colorFF76FF;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,HIGH,0.7,0),colorFF76FF;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,9,0),colorFF00FF;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,6,0),colorFF62FF;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,4,0),colorFF76FF;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > var1)) AND (CLOSE < var1)),CLOSE,OPEN,2,0),colorFFA8FF;
/////////
AC:=CLOSE;
转强:=WMA(HIGH,5);
转弱:=WMA(LOW,5);
Bara:=CLOSE*0;
FOR I=13+1 TO DATACOUNT DO BEGIN
IF AC[I]>转强[I-1] THEN
Bara[I]:=1;ELSE
IF AC[I]<转弱[I-1] THEN
Bara[I]:=-1;ELSE
Bara[I]:=Bara[I-1];
END;
转折线:IF(Bara=-1,MA(HIGH,5),MA(LOW,5)),LINETHICK1,colorFFFFFF;
////////////
RSV21:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
K21:=SMA(RSV21,5,1),COLORMAGENTA,LINETHICK2;
D21:=SMA(K21,5,1),COLORGREEN,LINETHICK2;
J21:=3*K21-2*D21,COLORYELLOW,LINETHICK2;
m5:=ma(c,5);
m10:=ma(c,10);
zxx1:=CROSS(k21,d21);
zxx2:=CROSS(d21,k21);
zxx3:=CROSS(j21,10);
zxx4:=CROSS(80,j21);
STICKLINE(zxx4,hhV(h,5),hhV(h,5),150,1);
STICKLINE(zxx3,LLV(l,5),LLV(l,5),150,1);
STICKLINE(zxx2,hhV(h,5),hhV(h,5),100,1),LINEDOT;
STICKLINE(zxx1,LLV(l,5),LLV(l,5),100,1),LINEDOT;
DRAWICON(zxx1,l*0.98,10),ALIGN;
DRAWICON(zxx2,h*1.005,11),ALIGN;
DRAWICON(zxx3,l*0.98,4),ALIGN;
DRAWICON(zxx4,h*1.005,5),ALIGN;
//////////
{加仓提示}
VARzc3:=IF((CLOSE>REF(CLOSE,1)),88,0);
VARzc4:=IF(((CLOSE)/(REF(CLOSE,1))>1.10) AND ((HIGH)/(CLOSE)<1.01) AND (VARzc3>0),91,0);
DRAWTEXT((VARzc4>90),(LOW)*(0.94999998),'★加仓'),Color00FFFF;
VARQS2:=ema(ema(l,8),6)*0.799;
土:=VARQS2,Color0080FF;
{下轨道最低价买股指标;很简单的!l<ema(ema(l,8),6)*0.799;准确度99%!}
DRAWSL(l<ema(ema(l,8),6)*0.799,l,0,2,2),{color80FF00}COLORWHITE;
//////////
bbbb:=MA(LOW,5)*(1-5/100);
振幅均价:=(HHv(bbbb,5)+llv(bbbb,5))/2,colorwhite,linedot;
均线选股:=cross(振幅均价,c) and 振幅均价>ref(振幅均价,1),linethick0;
DRAWTEXT(cross(振幅均价,l) and 振幅均价>ref(振幅均价,1),L*0.998,'▲\n回\n马\n枪'),colorred,ALIGN;
xxs:=MA(LOW,5)*(1-5/100),linedot;
xxs1:=MA(HIGH,5)*(1+5/100),linedot;
均线:=c,linethick2,colorgreen;
aaaa:=close/ref(close,3)<=0.85 and cross(c,xxs) and c>ref(c,1),linethick0 ;
DRAWTEXT(aaaa,L*0.995,'▲\n下\n影\n买'),colorred,ALIGN;
Bbaa:=cross(xxs1,c),linethick0;
DRAWTEXT(cross(xxs1,c),H*1.03,'▼\n开盘逃'),colorwhite,ALIGN;
dddd:=cross(c,xxs1),linethick0;
DRAWTEXT(dddd,h*1.02,'▼\n明日走'),COLORYELLOW,ALIGN;
eeee:=close/ref(close,2)<=0.9 and cross(c,xxs);
DRAWTEXT(eeee,L*0.995,'▲\n抢\n反\n弹'),colorred,ALIGN;
ffff:=REF(C,1)/REF(C,2)<=0.93 AND BETWEEN(C/REF(C,1),1.03,0.97) and close/ref(close,8)<=0.8 and between(ref(c,2)/ref(c,3),1.04,0.96) and between(ref(c,3)/ref(c,4),1.04,0.96),linethick0,coloryellow;
DRAWTEXT(ffff,L*0.995,'▲\n明\n日\n板'),colorred,ALIGN;
VAR1R:=LLV(LOW,2)=LLV(LOW,16) AND CLOSE>=OPEN*1.04;
VAR2R:=CLOSE>(REF(HIGH,1)+REF(LOW,1))/2;
VAR3R:=VAR1R AND VAR2R;
DRAWTEXT(VAR3R,LOW,'▲\n低入 '),colorFFFF,ALIGN;
DRAWTEXT(CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),HIGH*1.02,'▼\n卖出'),COLORWHITE,ALIGN;
///////
A101:=MA(C,10)-MA(C,20),COLORRED,LINETHICK2;
B101:=A101>REF(A101,1) AND REF(A101,1)<REF(A101,2);
BL101:= BARSLAST(B101);
M101:=MA(C,10);
D101:= REF(M101,BL101)/HHV(MA(C,10),20+BL101)<0.8;
E101:= A101>REF(A101,1) AND BARSLAST(B101)>2 AND BARSLAST(B101)<12;
F101:= E101 AND D101 AND CROSS(C,MA(C,10));
DRAWTEXT(f101,L*0.995,'★\n均\n线\n走\n平'),COLORYELLOW,ALIGN;
/////////
{预测明日}
C1:=REF(CLOSE,1);
C2:=HHV(C1,2);
C3:=LLV(C1,1);
ET:=HHV(C1,2);
ET1:=REF(ET,1);
XB:=LLV(C1,1);
XB1:=REF(XB,1);
M:=BARSLAST(((CLOSE < XB) AND (C1 >= XB1)));
C1:=REF(CLOSE,1);
C2:=HHV(C1,2);
C3:=LLV(C1,1);
ET:=HHV(C1,2);
ET1:=REF(ET,1);
XB:=LLV(C1,1);
XB1:=REF(XB,1);
M:=BARSLAST(((CLOSE < XB) AND (C1 >= XB1)));
M11:=REF(M,1);
Nn9:=BARSLAST(((CLOSE > ET) AND (C1 <= ET1)));
Nn1:=REF(Nn9,1);
M21:=(BARSLAST((((M - Nn9) > 0) AND (M11 <= Nn1))) + 1);
Nn2:=(BARSLAST((((Nn9 - M) > 0) AND (Nn1 <= M11))) + 1);
ET2:=HHV(ET,M21);
XB2:=LLV(XB,Nn2);
Aab:=IF((((M - Nn9) > 0) AND (M11 <= Nn1)),1,IF((((Nn9 - M) > 0) AND (Nn1 <= M11)),0,2));
H1:=IF(((M - Nn9) > 0),CLOSE,ET2);
H2:=IF((Aab = 1),CLOSE,C2);
H3:=IF(((M - Nn9) < 0),CLOSE,XB2);
H4:=IF((Aab = 1),CLOSE,XB2);
H5:=IF((((M - Nn9) > 0) OR (Aab = 1)),CLOSE,H3);
H6:=REF( |