同花顺主力动向公式
源码
r0:=((IF(ISNULL(ZDMR[-1]),0,ZDMR)+IF(ISNULL(BDMR[-1]),0,BDMR))-(IF(ISNULL(ZDMC[-1]),0,ZDMC)+IF(ISNULL(BDMC[-1]),0,BDMC)))/SHGZG*100;
MA5:=MA(r0,5);
//超买:3.2,coloryellow;//让位花神线
超卖:0.5,coloryellow;
中位线:=1.75;
最小值:=LLV(LOW,10);
最大值:=HHV(HIGH,25);
波动线:=EMA((CLOSE-最小值)/(最大值-最小值)*4,4);
平均线:EMA(波动线,3);
主力攻击:=r0-(ABS(REF(r0,1))+ABS(REF(r0,2))+ABS(REF(r0,3))+ABS(REF(r0,4))+ABS(REF(r0,5))/2)>0 AND 平均线>=REF(平均线,1) AND REF(平均线,1)<REF(平均线,2);
主力撤退:=-((r0+(ABS(REF(r0,1))+ABS(REF(r0,2))+ABS(REF(r0,3))+ABS(REF(r0,4))+ABS(REF(r0,5))/2)<0) AND 平均线<=REF(平均线,1) AND REF(平均线,1)>REF(平均线,2));
DRAWTEXT(主力攻击>0,1.5,"主进"),colorred;
DRAWTEXT(主力撤退<0,3,"主退"),colorgreen;
信息:=平均线>=REF(平均线,1);
走强:=CLOSE>MA(CLOSE,20)AND CLOSE>MA(CLOSE,5);
走弱:=CLOSE<MA(CLOSE,10)AND CLOSE<MA(CLOSE,5);
量:=VOL>MA(VOL,5);
STICKLINE(平均线>=REF(平均线,1),波动线,REF(波动线,1),5,0),colorred;
STICKLINE(平均线<REF(平均线,1),波动线 ,REF(波动线,1),5,0),colorgreen;
d:=信息=1 AND REF(信息,1)=0 AND (REF(信息,2)+REF(信息,3)=0) AND 平均线<0.5;
s:=信息=1 AND REF(信息,1)=0 AND (REF(信息,2)+REF(信息,3)=0) AND 走强=1 AND REF(走强,1)=0 AND 量=1;
dd:=平均线>2 AND (信息=0 AND REF(信息,1)=1) AND (REF(信息,2)+REF(信息,3)=2);
tz:=(信息=0 AND REF(信息,1)=1) AND (REF(信息,2)+REF(信息,3)=2) AND MA5<0 AND 走弱=1 AND 平均线>1;
DRAWTEXT(d=1,平均线,'底');
DRAWTEXT(s=1,平均线,'升');
DRAWTEXT(dd=1,平均线,'顶');
DRAWTEXT(tz=1,平均线,'下');
PARTLINE(平均线,平均线>=REF(平均线,1),colorred,平均线<REF(平均线,1),colorgreen);
////马上成功////
Hua:=(CLOSE - LLV(LOW,14)) / (HHV(HIGH,14) - LLV(LOW,14)) * 1.2 * CLOSE;
Nv1:=EMA(Hua,4);
Nv2:=EMA(Hua,8);
DRAWICON(CROSS(Nv1,Nv2) AND CLOSE/OPEN>1.05,0.5,1);
DRAWICON(CROSS(Nv2,Nv1) AND COUNT(CROSS(Nv1,Nv2) AND CLOSE/OPEN>1.05 ,20) ,3.2,2);
////必涨之星////
Hua2:=SMA(MAX(CLOSE-REF(CLOSE,1),0),16,2)/SMA(ABS(CLOSE/REF(CLOSE,1)),16,2)*100;
Xian=SMA(Hua2,3,1);
Nv3:=SMA(Xian,3,1);
XiNv=3*Xian-2*Nv3;
日:=-100;昨前:=-3;
高1:=-REF(-HHV(H,日),昨前);
低1:=-REF(-LLV(L,日),昨前);
低:=-REFDATE(低1,DATE),colorred,LINETHICK2;
VARC:=-低+(低+OPEN);
WR1:=-低-(HHV(HIGH,5)-CLOSE)/(HHV(HIGH,5)-LLV(LOW,5));
WR2:=-低+(HHV(HIGH,5)-CLOSE)/(HHV(HIGH,5)-LLV(LOW,5));
买入条件:=CROSS(XiNv,Nv3),colorwhite;
卖出条件:=CROSS(Nv3,XiNv) ;
DRAWICON( 卖出条件,3.3,2),coloryellow;
DRAWICON(买入条件,0.4,222),colorwhite;
AAA2:=SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0);
AAA3:=SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0);
AAA4:=SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0);
BB1:=0;
B1万元:=DVOL*DCLOSE/100;
B1差:=B1万元-REF(B1万元,1);
B2万元:=DVOL*DCLOSE/100;
B2比:=B2万元/REF(B2万元,1);
净流入万元:=(AAA2-AAA3-0.5*AAA4);
PM:=MA(净流入万元,1);
PMA:=PM/REF(PM,1)>1;
PMB:=REF(PMA,1)<1 AND PMA;
密码:=(EMA(MA(B1万元,2),2))/100000,coloryellow,NODRAW;
二日比:=密码/REF(密码,1);
选股:=PMB AND 密码>REF(密码,1) AND 二日比>1 ,colorred,NODRAW;
均价线:=AMOUNT/V/100;
均价线2:=EMA(均价线,3);
均价线5:=EMA(均价线,5);
均价线10:=EMA(均价线,10);
均价线30:=EMA(均价线,30);
突破:=C>均价线2 AND 均价线2<REF(均价线2,1) AND REF(均价线2,1)<REF(均价线2,2)
AND REF(均价线2,2)<REF(均价线2,3) AND 选股;
DRAWTEXT(突破,0.8,'必涨'),colorred;
////花神////
花:=EMA(SLOPE(1,1)+C,3),colorred;
女:=EMA(SLOPE(1,1)+C,7),colorblue;
STICKLINE(花>女 ,3.2,3.2,12,0) ,colorred;//花神线,红色开始为买
STICKLINE(花<=女 ,3.2,3.2,12,0),colorgreen;//花神线,绿色开始为卖
////////短线宝超准稳赢 股海网www.guhai.com.cn
万:=((3*C+H+L+O)/6+0.618*REF((3*C+H+L+O)/6,1)+0.382*REF((3*C+H+L+O)/6,2)+0.236*REF((3*C+H+L+O)/6,3)+0.146*REF((3*C+H+L+O)/6,4))/2.382;
点:=EMA((MA(HHV((3*C+H+L+O)/6,2),5)+MA(HHV((3*C+H+L+O)/6,2),13)+MA(HHV((3*C+H+L+O)/6,2),21)+MA(HHV((3*C+H+L+O)/6,2),32))/4,21),COLOR004000,LINETHICK2;
行情:=EMA((MA(LLV((3*C+H+L+O)/6,2),5)+MA(LLV((3*C+H+L+O)/6,2),13)+MA(LLV((3*C+H+L+O)/6,2),21)+MA(LLV((3*C+H+L+O)/6,2),32))/4,21),COLOR004000,LINETHICK2;
软件:=(行情+点)/2;
股神:=MA((SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0)-SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0)-0.5*SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0)),1)/REF(MA((SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0)-SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0)-0.5*SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0)),1),1)>1;
人:=REF(MA((SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0)-SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0)-0.5*SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0)),1)/REF(MA((SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0)-SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0)-0.5*SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0)),1),1)>1,1)<1 AND MA((SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0)-SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0)-0.5*SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0)),1)/REF(MA((SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0)-SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0)-0.5*SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0)),1),1)>1;
发财:=人 AND (EMA(MA(DVOL*DCLOSE/100,2),2))/100000>REF((EMA(MA(DVOL*DCLOSE/100,2),2))/100000,1) AND (EMA(MA(DVOL*DCLOSE/100,2),2))/100000/REF((EMA(MA(DVOL*DCLOSE/100,2),2))/100000,1) ;
黑马:=C>MA(AMOUNT/V/100,3) AND MA(AMOUNT/V/100,3)<REF(MA(AMOUNT/V/100,3),1) AND REF(MA(AMOUNT/V/100,3),1)<REF(MA(AMOUNT/V/100,3),2)
AND REF(MA(AMOUNT/V/100,3),2)<REF(MA(AMOUNT/V/100,3),3) AND 发财;
DRAWTEXT(黑马,1.1,'黑马'),colorred;