当前位置: 网站首页 > 股票软件公式 > 同花顺公式 > 文章 当前位置: 同花顺公式 > 文章

同花顺公式源码:量能强弱,波段,自定义多空趋势

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、量能强弱

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;
马线:=MA(牛线,6);
MYHEXIN_STICKLINE_1:=C>牛线;
MYHEXIN_STICKLINE_2:=2.5;
MYHEXIN_STICKLINE_3:=4;
STICKLINE(MYHEXIN_STICKLINE_1,MYHEXIN_STICKLINE_2,MYHEXIN_STICKLINE_3,8,0),colorred,LINETHICK;
MYHEXIN_STICKLINE_6:=C<马线;
MYHEXIN_STICKLINE_7:=2.5;
MYHEXIN_STICKLINE_8:=4;
STICKLINE(MYHEXIN_STICKLINE_6,MYHEXIN_STICKLINE_7,MYHEXIN_STICKLINE_8,8,0),colorgreen,LINETHICK2;
MYHEXIN_STICKLINE_11:=牛线>=C AND C>=马线;
MYHEXIN_STICKLINE_12:=2.5;
MYHEXIN_STICKLINE_13:=4;
STICKLINE(MYHEXIN_STICKLINE_11,MYHEXIN_STICKLINE_12,MYHEXIN_STICKLINE_13,8,0),colorgreen,LINETHICK;
A:=MAX(MA(C,60),MA(C,120));
B:=MIN(MA(C,60),MA(C,120));
MYHEXIN_STICKLINE_16:=C>=A;
MYHEXIN_STICKLINE_17:=0.5;
MYHEXIN_STICKLINE_18:=2;
STICKLINE(MYHEXIN_STICKLINE_16,MYHEXIN_STICKLINE_17,MYHEXIN_STICKLINE_18,8,0),colorred,LINETHICK2;
MYHEXIN_STICKLINE_21:=C<=B;
MYHEXIN_STICKLINE_22:=0.5;
MYHEXIN_STICKLINE_23:=2;
STICKLINE(MYHEXIN_STICKLINE_21,MYHEXIN_STICKLINE_22,MYHEXIN_STICKLINE_23,8,0),colorgreen,LINETHICK2;
MYHEXIN_STICKLINE_26:=A>=C AND C>=B;
MYHEXIN_STICKLINE_27:=0.5;
MYHEXIN_STICKLINE_28:=2;
STICKLINE(MYHEXIN_STICKLINE_26,MYHEXIN_STICKLINE_27,MYHEXIN_STICKLINE_28,8,0),colorgreen,LINETHICK2;
R:=0;
E:=MAX(MA(C,45),MA(C,90));
F:=MIN(MA(C,45),MA(C,90));
MYHEXIN_STICKLINE_31:=C>E;
MYHEXIN_STICKLINE_32:=-1.5;
MYHEXIN_STICKLINE_33:=0;
STICKLINE(MYHEXIN_STICKLINE_31,MYHEXIN_STICKLINE_32,MYHEXIN_STICKLINE_33,8,0),colorred,LINETHICK2;
MYHEXIN_STICKLINE_36:=C<F;
MYHEXIN_STICKLINE_37:=-1.5;
MYHEXIN_STICKLINE_38:=0;
STICKLINE(MYHEXIN_STICKLINE_36,MYHEXIN_STICKLINE_37,MYHEXIN_STICKLINE_38,8,0),colorgreen,LINETHICK2;
MYHEXIN_STICKLINE_41:=E>=C AND C>=F;
MYHEXIN_STICKLINE_42:=-1.5;
MYHEXIN_STICKLINE_43:=0;
STICKLINE(MYHEXIN_STICKLINE_41,MYHEXIN_STICKLINE_42,MYHEXIN_STICKLINE_43,8,0),colorgreen,LINETHICK2;
J:=MAX(MA(C,30),MA(C,60));
K:=MIN(MA(C,30),MA(C,60));
MYHEXIN_STICKLINE_46:=C>J;
MYHEXIN_STICKLINE_47:=-3.5;
MYHEXIN_STICKLINE_48:=-2;
STICKLINE(MYHEXIN_STICKLINE_46,MYHEXIN_STICKLINE_47,MYHEXIN_STICKLINE_48,8,0),colorred,LINETHICK2;
MYHEXIN_STICKLINE_51:=C<K;
MYHEXIN_STICKLINE_52:=-3.5;
MYHEXIN_STICKLINE_53:=-2;
STICKLINE(MYHEXIN_STICKLINE_51,MYHEXIN_STICKLINE_52,MYHEXIN_STICKLINE_53,8,0),colorgreen,LINETHICK2;
MYHEXIN_STICKLINE_56:=J>=C AND C>=K;
MYHEXIN_STICKLINE_57:=-3.5;
MYHEXIN_STICKLINE_58:=-2;
STICKLINE(MYHEXIN_STICKLINE_56,MYHEXIN_STICKLINE_57,MYHEXIN_STICKLINE_58,8,0),colorgreen,LINETHICK2;
ma5:=MA(C,5);
ma13:=MA(C,13);
ma21:=MA(C,21);
ma34:=MA(C,34);
ma55:=MA(C,55);
ma89:=MA(C,89);
ma144:=MA(C,144);
ma233:=MA(C,233);
tmp1:=IF(C>ma5,1,0);
tmp2:=IF(C>ma13,1,0);
tmp3:=IF(C>ma21,1,0);
tmp4:=IF(C>ma34,1,0);
tmp5:=IF(C>ma55,1,0);
tmp6:=IF(C>ma89,1,0);
tmp7:=IF(C>ma144,1,0);
tmp8:=IF(C>ma233,1,0);
量能强弱线:tmp1+tmp2+tmp3+tmp4+tmp5+tmp6+tmp7+tmp8+-3.8,coloryellow,LINETHICK2;
〖指标说明〗:STRLEFT('从上至下:①散户量,②游资量,③机构量,④主力量,绿色为无量',100),colorwhite;



2、波段

H5:=HHV(HIGH,5);

L5:=LLV(LOW,5);
H3:=SUM((C-L5),3);
L3:=SUM((H5-L5),3);
K:=EMA((C-L5)/(H5-L5)*100,4);
D:=EMA((H3/L3)*100,4);
J:=EMA((3*K-2*D),4);
BUY1:=CROSS(K,D) AND CROSS(J,D) AND D<30 AND D>REF(D,1);
SEL1:=FILTER(REF(J,1)>75 AND J<REF(J,1),3);
STICKLINE(J>D AND K>D,J,D,5,0),colorred;
STICKLINE(J<D AND K>D,J,D,8,0),colorcyan;
STICKLINE(J<D AND K<D,J,D,5,0),colorgreen;
STICKLINE(K<D AND J>D,J,D,8,0),colorblack;
STICKLINE(J>D AND K>D AND J<REF(J,1) AND D>REF(D,1) AND J>50,J,D,8,0),colorbrown;
空:100*(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13)),colorgreen;
多:SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100,colorred;
底:0,colorcyan;
地:15,colorgray;



3、自定义多空趋势

MA5:=MA(C,5);

MA13:=MA(C,13);
MA21:=MA(C,21);
MA55:=MA(C,55);
VAR1:=MA(BARSLAST(LOW=LLV(LOW, 10))*IF(CLOSE>OPEN, VOL, 1), 4);
Var2:=MA(BARSLAST(HIGH=HHV(HIGH, 14))*IF(CLOSE<OPEN, VOL, 1), 3);
Var3:=VAR1;
DIFF:=EMA(CLOSE,9)-EMA(CLOSE,17);
DEA:=EMA(DIFF,8),COLOrffaa00;
AD2:=CLOSE/REF(CLOSE,1)>1.09;
TJ2:=COUNT(AD2,2)<=0;
AAS:=IF((MA5>=MA13 OR ABS(MA5-MA13)<0.02) AND MA13>=MA21 AND C>MA55 ,1,0) AND DEA<0.6 AND C>=O  AND C>MA5   AND  CLOSE/REF(CLOSE,1)>1.03;
AAF:=IF((MA5>=MA13 OR ABS(MA5-MA13)<0.02) AND MA13>=MA21 AND C>MA55,1,0) AND DIFF>REF(DIFF,1) AND REF(DIFF,1)<=REF(DIFF,2) AND C>=O AND DEA<1 AND C>MA5 AND TJ2 AND  CLOSE/REF(CLOSE,1)>1.03;
XG:=AAS OR AAF  ;
VVS:=IF(MA5>=MA13 OR ABS(MA5-MA13)<0.02 AND C>MA55,1,0)  AND C>=O   AND DEA<0.06   AND DEA>-0.06AND VOL>REF(VOL,1)*1.5 AND C>MA5;
ZG:=VVS   AND TJ2;
多:EMA(Var3,5),colorred ,linethick1;
空:IF(VAR1>=0, VAR2, 0),colorgreen,linethick1;
趋势:EMA(多,18),colorliblue,linethick1;
STICKLINE(FILTER(XG,10),IF(多>空,空,多),IF(多>空,多,空),1,0),colormagenta;
DRAWTEXT (FILTER(XG,10),IF(多>空,多,空),'买入点'),colormagenta;
STICKLINE(FILTERX(ZG,10),IF(多>空,空,多),IF(多>空,多,空),1,0),colorblue;
DRAWTEXT (FILTERX(ZG,10),IF(多>空,多,空),'关注'),colorblue;
 

上一篇:同花顺公式下载:AI多空博弈,短期买卖,抄底逃顶,操盘利器,跟庄买卖BS,漂亮主抄,趋势AA,花仙子波段,托压..

下一篇:抄底提醒(同花顺公式)