H黄金分割
参数:n(80),m(3)
今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLOR00F0F0,NODRAW,NODRAW;
引差:=REF(C,1)-LOW,LINETHICK1,NODRAW;
引跌幅:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,NODRAW;
三日均跌:MA(引跌幅,3),COLORWHITE,NODRAW;
今最高:HIGH,LINETHICK1,COLORRED,NODRAW;
今最低:LOW,LINETHICK1,COLORGREEN,NODRAW;
{------K线-----------}
X1:=(2*CLOSE+LOW+HIGH+OPEN)/5;
XCLOSE:=EMA(X1,5);
XOPEN:=EMA((REF(OPEN,1)+REF(XCLOSE,1))/2,5);
STICKLINE(XOPEN<XCLOSE,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0)COLOR000033; {-------KD波段背景------};
波段:EMA(C,6),COLORYELLOW,LINETHICK2;
红升1:IF(波段>REF(波段,1),波段,DRAWNULL),COLORRED,LINETHICK2;
绿降1:IF(波段<REF(波段,1),波段,DRAWNULL),COLOR5B5B00,LINETHICK2;
操作均线:EMA(C,21),COLORYELLOW,LINETHICK4;
红升:IF(操作均线>REF(操作均线,1),操作均线,DRAWNULL),COLORRED,LINETHICK4;
绿降:IF(操作均线<REF(操作均线,1),操作均线,DRAWNULL),COLOR009300,LINETHICK4;
趋势线:EMA(C,50),COLORYELLOW,LINETHICK2,NODRAW;
红升2:IF(趋势线>REF(趋势线,1),趋势线,DRAWNULL),COLORRED,POINTDOT,LINETHICK4;
绿降2:IF(趋势线<REF(趋势线,1),趋势线,DRAWNULL),COLORFFFF00,POINTDOT,LINETHICK4;
PT :=HIGH-LOW;
AA0 := (O+HIGH + LOW + CLOSE*2)/5;
突破:AA0 + PT,COLORYELLOW,NODRAW;
阻力: 2*AA0-LOW,COLORFFFF75,NODRAW;
支撑1: 2*AA0-HIGH,COLOR4080FF,NODRAW;
下降:AA0 - PT,COLOR00FF00,NODRAW;
明日心理价:(AA0+突破+阻力+支撑1+下降)/5,COLORFFFFFF,NODRAW;
高区:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORFFFFFF,NODRAW;
低区大胆买入:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORFFFF00,NODRAW;
STICKLINE(CCI>=200 AND H>=高区,O,C,3,0),COLORBLUE;
STICKLINE(CCI<=100 AND L<=低区大胆买入,O,C,3,0),COLORYELLOW;
VAR11:=MA(C,9),COLORRED;
MA05:MA(C,5),NODRAW;
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
五日乖离率:=(C-MA05)/MA05*100;
BB05:=ATAN((MA05/REF(MA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((MA05-REF(MA05,1))/REF(MA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;
VAR1:=(MA20-MA30)>REF((MA20-MA30),1) AND MA20>REF(MA20,1) AND MA30>REF(MA30,1);
VAR2:=(MA30-MA20)<REF((MA30-MA20),1) AND MA20<REF(MA20,1) AND MA30<REF(MA30,1);
BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;
强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA05>REF(MA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA10>REF(MA10,1)
AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;
清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>MA30 OR O>MA30) AND MA05<REF(MA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) AND MA10<REF(MA10,1),10);
DRAWTEXT(加仓 ,LOW*0.98,'★加仓'),COLOR00FFFF;
JC1:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) AND MA10>REF(MA10,1) ;
减仓:=FILTER(JC1,10);
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA05>REF(MA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<MA30;
买入:=FILTER(MR,10);
A0:=(L+H+C*2)/4;
AA:=EMA(A0,14)COLORYELLOW,LINETHICK1;
BB:=EMA(A0,25)COLORYELLOW,LINETHICK2;
A1X:=(AA-REF(AA,1))/REF(AA,1)*100;
A2X:=(BB-REF(BB,1))/REF(BB,1)*100;
G:=BARSLAST(CROSS(A1X,0));
A5:=EMA(CLOSE,12)-EMA(CLOSE,26);
A6:=EMA(A5,9);
A7:=(A5<-0.1 AND A5>A6);
见底:IF(A7,LLV(L,21),DRAWNULL)COLOR820082,CIRCLEDOT,NODRAW;
见顶:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,DRAWNULL),COLORGREEN,CIRCLEDOT,NODRAW;
MA5:=MA(C,5);
MA13:=MA(C,13);
高:=REF(HHV(H,N),M);
低:=REF(LLV(L,N),M);
H19:=高-(高-低)*0.191;
H38:=高-(高-低)*0.382;
H中:=高-(高-低)*0.5;
H61:=高-(高-低)*0.618;
H80:=高-(高-低)*0.809;
风险区高抛:REFDATE(高,DATE),DOTLINE,COLOR4080FF;
逢高减仓%19.8:REFDATE(H19,DATE),DOTLINE,COLOR4080FF;
主力拉升%38.2:REFDATE(H38,DATE),DOTLINE,COLOR4080FF;
平衡%50:REFDATE(H中,DATE),DOTLINE,COLOR575757;
强势蓄锐%61.8:REFDATE(H61,DATE),DOTLINE,COLOR4080FF;
逢低买入%80.9:REFDATE(H80,DATE),DOTLINE,COLOR4080FF;
低吸区大胆买入:REFDATE(低,DATE),DOTLINE,COLOR4080FF;
DRAWTEXT(ISLASTBAR,风险区高抛,'高抛'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,逢高减仓%19.8,'减仓'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,主力拉升%38.2,'突破'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,平衡%50,'平衡'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,强势蓄锐%61.8,'拉升'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,逢低买入%80.9,'关注'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,低吸区大胆买入,'低吸'),COLORFFFFFF;
DIFF:=( EMA(CLOSE,7) - EMA(CLOSE,19));
DEA:=EMA(DIFF,9);
MACD:=0.90*(DIFF-DEA);
TJ:=(DIFF>=DEA);
TJ1:=(DIFF>=0);
STICKLINE(TJ,H,L,0.4,0),COLORYELLOW;
STICKLINE(TJ,O,C,4,1),COLOR0088FF;
STICKLINE(TJ,O,C,3.4,1),COLOR00AAFF;
STICKLINE(TJ,O,C,2.8,1),COLOR00CCFF;
STICKLINE(TJ,O,C,2,1),COLOR00DDFF;
STICKLINE(TJ,O,C,1.2,1),COLOR55FFFF;
STICKLINE(TJ,O,C,0.4,1),COLOR99FFFF;
STICKLINE(TJ1 AND TJ,H,L,0.4,0),COLORF00FF0;
STICKLINE(TJ1 AND TJ,O,C,4,1),COLORFF33FF;
STICKLINE(TJ1 AND TJ,O,C,3.4,1),COLORFF55FF;
STICKLINE(TJ1 AND TJ,O,C,2.8,1),COLORFF77FF;
STICKLINE(TJ1 AND TJ,O,C,2,1),COLORFF99FF;
STICKLINE(TJ1 AND TJ,O,C,1.2,1),COLORFFBBFF;
STICKLINE(TJ1 AND TJ,O,C,0.4,1),COLORFFDDFF;
STICKLINE(DIFF<DEA,H,L,0.4,0),COLORF0F000;
STICKLINE(DIFF<DEA,O,C,4,1),COLORFF3300;
STICKLINE(DIFF<DEA,O,C,3.4,1),COLORFF6600;
STICKLINE(DIFF<DEA,O,C,2.8,1),COLORFF9900;
STICKLINE(DIFF<DEA,O,C,2,1),COLORFFBB00;
STICKLINE(DIFF<DEA,O,C,1.2,1),COLORFFDD00;
STICKLINE(DIFF<DEA,O,C,0.4,1),COLORFFFF00;
VAR01:=(CLOSE*2+HIGH+LOW)/4;
SK:= EMA(VAR01,13)-EMA(VAR01,73);
SD:= EMA(SK,2);
SJ:=(CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03)OR(CROSS(SK,SD)
AND SK<=-0.14 )OR(CROSS(SK,SD) AND SK<=0.05 AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035));
STICKLINE(SJ,H,L,0.5,0),COLORRED;
STICKLINE(SJ,O,C,5.5,0),LINETHICK3,COLOR000055;
STICKLINE(SJ,O,C,4.5,0),LINETHICK3,COLOR000077;
STICKLINE(SJ,O,C,3.5,0),LINETHICK3,COLOR000099;
STICKLINE(SJ,O,C,2.5,0),LINETHICK3,COLOR0000BB;
STICKLINE(SJ,O,C,1.5,0),LINETHICK3,COLOR0000DD;
STICKLINE(SJ,O,C,0.5,0),LINETHICK3,COLOR0000FF;
EMA13:=EMA(C,13),COLORWHITE;
EMA21:=EMA(C,21),COLORYELLOW;
EMA34:=EMA(C,34),COLORFF00FF;
EMA60:=MA(C,60),COLORFFCC66;
VAR02:=(2*CLOSE+HIGH+LOW)/4;
VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4);
散户:=EMA((VAR02-VAR4)/(VAR5-VAR4)*100,4)*VAR3;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(CROSS(84,RSI) , HIGH,'逃'),COLORGREEN;
VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);
VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);
DRAWTEXT(FILTER((VAR4AA>90),45),(LOW)*(0.97),'大胆搏 '),COLOR00FFFF;
VAR51:=3;
VAR52:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27) |