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

同花顺源码精选:RSI升级修改版,买卖波段提示,主力进场建仓

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

1、RSI升级修改版

IF(PERIODNAME<>"日线")

{

统计:"该指标只在日线周期下有效。";

RETURN;

}

//大单净量

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),6,1)*100;

RSI$3:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),9,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)),6,1);

wave$3:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),9,1);

短线波段:=0.5*wave$1+0.31*wave$2+0.19*wave$3;

中间区:50,POINTDOT,coloryellow;

机会区:20,POINTDOT,colorred;

风险区:80,POINTDOT,colorgreen;

风险系数:0.5*相对强弱+0.5*短线波段,coloryellow;

//斜率

C0:=(H+L+C)/3;

A1:=HHV(C0,15);

A2:=LLV(C0,15);

A3:=A1-A2;

我的斜率:EMA((C0-A2)/A3,2)*100,COLORFFFF00;

IF(我的斜率>REF(我的斜率,1),我的斜率,DRAWNULL),LINETHICK4,COLORFFFFFF;

IF(我的斜率>20 AND 我的斜率>REF(我的斜率,1),我的斜率,DRAWNULL),LINETHICK4,COLORFFFF00;

STICKLINE(我的斜率<45,45,我的斜率,1,0),POINTDOT,COLORFF0000;



2、买卖波段提示

VAR200:=((CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100)*10;

VAR300:SMA(SMA(VAR200,3,1),3,1)/28.57,coloryellow;
VAR400:=EMA(VAR300,5);
操盘:3*VAR300-2*VAR400,colorred,Linethick1;
A1:=CROSS(操盘,VAR300) AND VAR300<21 AND C>O;
STICKLINE(A1,30,0,4,0),colorred;
//STICKLINE(A1,30,0,3,0),COLOR990099;
//STICKLINE(A1,30,0,2,0),COLORBB00BB;
//STICKLINE(A1,30,0,1,0),COLORDD00DD;
//STICKLINE(A1,30,0,0.3,0),colorred;
DRAWTEXT(A1,20,'买'),colorred;
多方趋势:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,271))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);
天线:=78.89;
//STICKLINE(CROSS(天线,多方趋势),90,95,6,0),COLOR00FF00;
Var1:=REF(CLOSE,2);
会员专用:=SMA(MAX(CLOSE-Var1,0),7,1)/SMA(ABS(CLOSE-Var1),7,1)*100;
Var2:=REF(CLOSE,1);
Var3:=SMA(MAX(CLOSE-Var2,0),7,1)/SMA(ABS(CLOSE-Var2),7,1)*100;
极品逃亡:=IF(会员专用<REF(会员专用,1) AND 会员专用>79,会员专用,0);
STICKLINE(极品逃亡,30,0,4,0),colorgreen;
DRAWTEXT(极品逃亡,20,'跑'),colorgreen;
DRAWTEXT(88>0 AND REF(O,1)/REF(C,1)>1.04 AND REF(L,1)<=688 AND O>REF(C,1) AND C<REF(O,1)  AND C/O>=1.01,10,'初底');
DRAWTEXT(C-O>=0 AND O/L>1.05 AND L<=LLV(L,20),10,'底'),colorblue;
a:=(3*CLOSE+LOW+OPEN+HIGH)/6;
D1:=(20*a+19*REF(a,1)+18*REF(a,2)+17*REF(a,3)+16*REF(a,4)+15*REF(a,5)+14*REF(a,6)+13*REF(a,7)+12*REF(a,8)+11*REF(a,9)+10*REF(a,10)+9*REF(a,11)+8*REF(a,12)+7*REF(a,13)+6*REF(a,14)+5*REF(a,15)+4*REF(a,16)+3*REF(a,17)+2*REF(a,18)+REF(a,20))/211;
D2:=EMA(D1,2);
D3:=EMA(D2,2);
K1:=EMA(D3,2);
波段买入:=IF(CROSS(D1,K1),55,0);
STICKLINE(CROSS(D1,K1),20,0,6,0),coloryellow;



3、主力进场建仓,红柱买入信号( 股民学院: http://www.58188.com )

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

VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
VAR6:0;
主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),colorred,NODRAW; STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0 ),colorred;
洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),colorgreen,NODRAW; STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),colorgreen;
N:=5;
VARO1:4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)- 3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1),coloryellow,LINETHICK0;
准备拉升:IF(CROSS(VARO1,8),80,0),STICK,COLOR0000CC,LINETHICK2;
压住庄家:IF(VARO1<=8,25,0),STICK,colorwhite,LINETHICK2; DRAWTEXT(CROSS(VARO1,8),80,'B'),colorbrown;
VARO3:=LLV(LOW,27);
VARO4:=HHV(HIGH,34);
VARO5:=EMA((CLOSE-VARO3)/(VARO4-VARO3)*4,4)*25;
建仓区:IF((VARO5<10),80,100) ,COLOR00CCFF,LINETHICK1;


上一篇:同花顺源码精选:BL策略,四指金叉,我的系统

下一篇:同花顺源码精选:好买好卖,CLB主散筹码,方天画戟