文章教程

大智慧炒股投机策略指标公式

5/13/2018 10:03:14 PM 人评论 次浏览

input:n(1,1,6);
DRAWGBKlast(DATE>900101,strip(RGB(40,0,40),RGB(0,0,0),0));;
DRAWTEXTREL(10,20,'★【第'+N+'方案】'),COLOR0077FF,LINETHICK2;
IF N=1 THEN BEGIN
DRAWTEXTREL(100,20,'【CCI】'),COLOR0077FF,LINETHICK2;
A:30,DOTLINE;
B:70,DOTLINE;
SJ1:WMA((C-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,3),COLOR0077FF,LINETHICK2;
ZJ1:WMA(0.618*REF(SJ1,1)+0.382*SJ1,2),COLOR00FF00;
DRAWTEXT(CROSS(SJ1,ZJ1) AND SJ1<A,SJ1,'←吸'),COLOR00FF00;
DRAWTEXT(CROSS(ZJ1,SJ1) AND SJ1>B,ZJ1,'←抛'),COLOR0077FF;
VERTLINE(CROSS(ZJ1,SJ1) AND SJ1>B,1),Color0077FF,LAYER0;
{RSI=80}
LC:=REF(C,1);
RSI1:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
DRAWTEXT(CROSS(RSI1,81) ,SJ1,'↓'),COLOR0000FF,ALIGN1,LINETHICK1;
DRAWTEXT(CROSS(RSI1,81) ,SJ1,'R:'+NUMTOSTRN(RSI1,0)+''),COLOR00ffFF,ALIGN1,LINETHICK1;
Var0:=SMA(MAX(CLOSE-ref(c,1),0),12,1)/SMA(ABS(CLOSE-ref(c,1)),15,1)*100;
DRAWTEXT(CROSS(82,Var0),70,'快卖'),colorwhite;
s:=C-REF(C,1);
DX:=100*EMA(EMA(s,6),6)/EMA(EMA(ABS(s),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(filter(买=1,5),35,'拉升'),ColorFFDE00;
end
IF N=2 THEN BEGIN
DRAWTEXTREL(100,20,'【KDJ】'),COLOR00FFFF,LINETHICK2;
M:20,DOTLINE;
P:80,DOTLINE;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
SJ2:WMA(3*K-2*D,3),COLOR0000FF,LINETHICK2;
ZJ2:WMA(0.714*REF(SJ2,1)+0.286*SJ2,2),COLOR00FF00;
DRAWTEXT(CROSS(SJ2,ZJ2) AND SJ2<M,SJ2,'←吸'),COLOR00FF00;
DRAWTEXT(CROSS(ZJ2,SJ2) AND SJ2>P,ZJ2,'←抛'),COLOR0077FF;
VERTLINE(CROSS(ZJ2,SJ2) AND SJ2>P,2),Color00FFFF,LAYER0;
end
IF N=3 THEN BEGIN
M1:20,DOTLINE;
P1:80,DOTLINE;
RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
FASTK:=SMA(RSV,3,1);
K:=SMA(FASTK,2,1);
D:=SMA(K,5,1);
SJ3:WMA(3*K-2*D,3),COLOR0000FF,LINETHICK2;
ZJ3:WMA(0.714*REF(SJ3,1)+0.286*SJ3,2),COLOR00FF00;
DRAWTEXT(CROSS(SJ3,ZJ3) AND SJ3<M1,SJ3,'←吸'),COLOR00FF00;
DRAWTEXT(CROSS(ZJ3,SJ3) AND SJ3>P1,ZJ3,'←抛'),COLOR0077FF;
VERTLINE(CROSS(ZJ3,SJ3) AND SJ3>P1,3),Color00FF00,LAYER0;
end
IF N=4 THEN BEGIN
A2:30,DOTLINE;
B2:70,DOTLINE;
重心:(2*C+H+L)/4,COLOR00FFFF,LINETHICK0;
SJ4:WMA((重心-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2),COLOR0077FF,LINETHICK2;
ZJ4:WMA(0.618*REF(SJ4,1)+0.382*SJ4,2),COLOR00FF00;
DRAWTEXT(CROSS(SJ4,ZJ4) AND SJ4<A2,SJ4,'←吸'),COLOR00FFFF;
DRAWTEXT(CROSS(ZJ4,SJ4) AND SJ4>B2,SJ4,'←抛'),COLOR00FFFF;
VERTLINE(CROSS(ZJ4,SJ4) AND SJ4>B2,4),ColorFF00FF,LAYER0;
end
IF N=5 THEN BEGIN
HCL:(((3*C+O)/2+H+L)/4-(HHV(H,13)+LLV(L,13))/2)/(HHV(H,13)-LLV(L,13))*100,COLOR00FFFF;;
MHCL:=WMA(HCL,5);
PARTLINE(MHCL,(MHCL>REF(MHCL,1))-1,rgb(0,255,50),1,rgb(255,50,0) ),LINETHICK2;
W:25,COLOR0077FF; G:-25,COLORFF9900;
F:50;T:-50;
FILLRGN(G,T,G>T,RGB(0,50,0)),LAYER7;
FILLRGN(F,W,F>W,RGB(0,0,200)),LAYER7;
VERTLINE(CROSS(HCL,MHCL) AND MHCL>25,5),ColorFF9900,LAYER0;
END
IF N=6 THEN BEGIN
Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
Q3:=SMA(Q2, 9, 1);
Q4:=SMA(Q3, 3, 1);
长趋势:3*Q3-2*Q4,COLORWHITE,LINETHICK2;
趋势线:EMA(Q3, 3),COLORRED,LINETHICK2;
DRAWTEXT(CROSS(趋势线, 长趋势) AND REF(长趋势,1)>80, REF(长趋势,3), '*顶'),COLORYELLOW,LINETHICK3;
☆见底啦: DRAWTEXT(REF(CROSS(趋势线,长趋势),84) AND 趋势线>1.3*长趋势,长趋势,'☆←见底啦'),COLORFFFF00,LINETHICK1;
★低买: DRAWTEXT(REF(CROSS(长趋势,趋势线),1) AND 长趋势>1.3*趋势线,趋势线,'★低买'),COLORRED,LINETHICK1;
VAR3:=PEAKBARS(3,15,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
A顶快走!:IF(顶>REF(顶,1),20,0),COLORGREEN,LINETHICK2;
DRAWTEXT(A顶快走!=35,20,'快走'),COLOR00FF00;
END
LC:=REF(C,1);
RSI:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
DRAWTEXT(DISPSTATUS=2,40,'【RRI:'+NUMTOSTRN(RSI,0)+'】'),COLOR0099FF,LINETHICK3,ALIGN1;
{高抛.低吸--------加入主图}
{重心:(2*C+H+L)/4,COLOR00FFFF,LINETHICK0;
SJ:=WMA((重心-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);
ZJ:=WMA(0.667*REF(SJ,1)+0.333*SJ,2);
DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,L-0.05,'←低吸'),COLOR00FFFF;
DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,H+0.05,'←高抛'),COLOR00FFFF;};

大智慧炒股投机策略指标公式

教程类别