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

同花顺散户线原理,建仓BS,信号线指标

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

散户线原理:

M:=60;

N:=30;
散户线: 100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60)), colorgray;
RSV:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
STICKLINE(C>0,85,85,6,1),colormagenta;
操作指导线:60,colorred;
VAR1:=1;
VAR2:=REF(LOW,1)*VAR1;
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100*VAR1;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3)*VAR1;
VAR5:=LLV(LOW,30)*VAR1;
VAR6:=HHV(VAR4,30)*VAR1;
VAR7:=IF(MA(CLOSE,58),1,0)*VAR1;
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7*VAR1;
VAR9:=IF(VAR8>100,100,VAR8)*VAR1;
吸筹:STICKLINE(VAR9>-150,0,VAR9,6,1),colormagenta;
趋势线:=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))*100,5,1),3,1), colorred ,LINETHICK2;
STICKLINE(C>0,10,10,6,1),COLORFFAA00;
见底信号:=10;
买点准备:IF(趋势线<=10,30,0), coloryellow;
买入时间:IF(CROSS(趋势线,见底信号),50,0), colorgreen;
VAR84:=SMA(ABS(L-REF(L,1)),13,1)/SMA(MAX(L-REF(L,1),0),13,1);
底部动量:EMA(IF(L<=LLV(L,30),VAR84,0),3)*10,COLORA0A0FF;
起动:EMA(J,6),colorred, LINETHICK1;
 



建仓BS:

VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);

VAR2:=SMA(ABS(LOW-VAR1),15,1)/SMA(MAX(LOW-VAR1,0),10,1),LINETHICK2;
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
LOWV:=LLV(LOW,6);
HIGHV:=HHV(HIGH,6);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,2);
短线1:EMA(RSV,2),colorred;
短线2:MA(短线1,2),coloryellow;
DRAWTEXT(CROSS(短线1,短线2),短线1,'B'),colorred;
DRAWTEXT(CROSS(短线2,短线1),短线2,'S'),colorgreen;
DIV(SHGZG,GDZS);
SW1:= (EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;
SW: =DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
超95:=CROSS(sw1,sw);
DRAWTEXT(超95,短线2,'超'),coloryellow;
破95:=CROSS(sw,sw1);
DRAWTEXT(破95,短线1,'破'),colorblue;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
//DRAWTEXT(CROSS(FF,MA15),(短线1 * 0.25),'底');
//DRAWTEXT(CROSS(88,RSI),(短线2 * 1.20),'顶');
//DRAWTEXT_FIX(ISLASTBAR,0,0.10,0,'资金抄底'),COLOR00C5FF;
r:=((ZDMR[-1]+BDMR[-1])-(ZDMC[-1]+BDMC[-1]))/SHGZG*100;
//相对强弱
LC := REF(CLOSE,1);//前一日收盘价;
RSI$1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;
RSI$2:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
RSI$3:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),8,1)*100;
相对强弱:=0.5*RSI$1+0.31*RSI$2+0.19*RSI$3;
wave$1:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),3,1);
wave$2:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),5,1);
wave$3:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),8,1);
短线波段:=0.5*wave$1+0.31*wave$2+0.19*wave$3;
机会区:=20,POINTDOT,colorred;
风险区:=80,POINTDOT,colorgreen;
风险系数:=0.5*相对强弱+0.5*短线波段,coloryellow;
//买入条件;
CD1:=IF(风险系数<20 AND CLOSE>OPEN AND r>0,1,0);//波段小于20,股价翻红;
CD2:=IF(风险系数<20 AND LOW>=REF(LOW,1) AND CLOSE>LOW AND r>0,1,0);//波段小于20,股价未翻红,但未创新低;
CD3:=IF(REF(风险系数,1)<20 AND 风险系数>REF(风险系数,1),1,0);//前一日波段小于20,今日转向;
SIGNALBUY=(CD1=1 OR CD2=1 OR CD3=1);
X=(SIGNALBUY AND COUNT(SIGNALBUY,3)=1);
DRAWICON(X,机会区,"buy");
N:=5;
VAR1:=4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1),3.2,1),coloryellow,LINETHICK0;
VAR2:=8,colorgreen,LINETHICK0;
准备拉升: IF(CROSS(VAR1,VAR2),80,0),STICK,COLOR0000CC,LINETHICK2;
压住庄家:= IF(VAR1<=8,25,0),STICK,colorwhite,LINETHICK2;
DRAWTEXT(CROSS(VAR1,VAR2),80,'建仓'),COLOR00FFFF;
 



信号线:

自制信号线,红色代表多,绿色代表空,适用于单边,不适用横盘,曲线风格改为采样点更好看些(顶尖财经:股票学院 http://www.58188.com)
 

DIF:=EMA(CLOSE,12)-EMA(CLOSE,45);

DEA:=EMA(DIF,15);

A:=DEA;

LC:=REF(CLOSE,1);

AA:=ABS(HIGH-LC);

BB:=ABS(LOW-LC);

CC:=ABS(HIGH-REF(LOW,1));

DD:=ABS(LC-REF(OPEN,1));

R:=IF(AA>BB AND AA>CC,AA+BB/2+DD/4,IF(BB>CC AND BB>AA,BB+AA/2+DD/4,CC+DD/4));

X:=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1));

SI:=8*X/R*MAX(AA,BB);

ASI:=SUM(SI,40); //ASI=M1周期的SI之和,在日线上就是M1天的SI之和

ASIT:=MA(ASI,20); //ASIT=M2周期的ASI的移动平均值

B:=ASI;

红 : IF( A>= 0 AND B >= 0, EMA(SLOPE(C,21)*20+C,110), DRAWNULL ),colorred, LINETHICK2;

绿 : IF( A < 0 AND B < 0, EMA(SLOPE(C,21)*20+C,110), DRAWNULL ), colorgreen, LINETHICK2;

黄1 : IF( A < 0 AND B >= 0, EMA(SLOPE(C,21)*20+C,110), DRAWNULL ), coloryellow, LINETHICK2;

黄2 : IF( A >= 0 AND B < 0, EMA(SLOPE(C,21)*20+C,110), DRAWNULL ), coloryellow, LINETHICK2;

IF( 1, EMA(SLOPE(C,21)*20+C,110), DRAWNULL ), coloryellow, LINETHICK2;

上一篇:【同花顺公式源码更多请点击此处】>>>>>>>>

下一篇:同花顺二百五战法,中线趋势RSI,站上黄金线指标