波段底部组合选股公式[通达信公式]
相关标签:
原理解析:
来源:程序化99( WWW.CXH99.COM )
源码:
N1:=5;N2:=10;
STICKLINE(C>0,0,10,15,0),COLOR781816;
LLC:=REF(CLOSE,1);
RSI15:SMA(MAX(CLOSE-LLC,0),N1,1)/SMA
(ABS(CLOSE-LLC),N1,1)*10,COLORFF00FF,LINETHICK1;
RSI10:SMA(MAX(CLOSE-LLC,0),N2,1)/SMA
(ABS(CLOSE-LLC),N2,1)*10,COLOR00FFFF;
VAR21:=C-REF(C,1);{www.cxh99.com'←短牛'),COLOR0000FF;
中牛:REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
STICKLINE(中牛,0,0.2,3,0),COLOR880088;
STICKLINE(中牛,0,7,1.5,0),COLORAA00AA;
STICKLINE(中牛,0,7,0.8,0),COLORCC00CC;
STICKLINE(中牛,0,7,0.2,0),COLORFF00FF;
DRAWTEXT(中牛,7,'←中牛'),COLORFF00FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
大牛:REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
STICKLINE(大牛,0,0.2,3,0),COLOR008888;
STICKLINE(大牛,0,6,2,0),COLOR00AAAA;
STICKLINE(大牛,0,6,1,0),COLOR00CCCC;
STICKLINE(大牛,0,6,0.2,0),COLOR00FFFF;
DRAWTEXT(大牛,6,'←大牛'),COLOR00FFFF;LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);{www.cxh99.com'http://www.cxh99.com' title='选股' target='_blank'>选股:=IF(CROSS(最佳买入,0),1,0);
VAR1:=SMA(最佳买入选股,3,1);
VAR2:=SMA(VAR1,3,1),COLOR0000FF;
VAR3:=SMA(VAR2,3,1),COLOR00FFFF;
建仓买点:IF(CROSS(VAR2,VAR3) AND (VAR2<40),1,0* 10000),COLORWHITE,NODRAW;
STICKLINE(建仓买点,0,2,2,0),COLORLINETHICK0;
STICKLINE(建仓买点,0.2,4.0,2,0),COLORLINETHICK0;
RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 50);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
最佳买入时机: IF(CROSS(J,3),1,0),COLORYELLOW;
STICKLINE(最佳买入时机,0,1,3,0),COLOR009999;
STICKLINE(最佳买入时机,0,1,2,0),COLOR00DDDD;
STICKLINE(最佳买入时机,0,1,1,0),COLOR00FFFF;
机构建仓: IF(最佳买入<5,1,0),STICK,COLORFF00FF,LINETHICK1;
机构建仓日:STICKLINE(机构建仓,0,-0.3,3,0),COLORFF00FF,LINETHICK6;
HIGHN:=5;
RSII:=SMA(MAX(C-LC,0),12,1)/SMA(ABS(C-LC),12,1)*10,COLORCYAN,LINETHICK1;
LOWN:=HIGHN;
AAA:=REF(RSII,HIGHN)=HHV(RSII,2*HIGHN+1);
QY:=BACKSET(AAA,HIGHN+1);
CCC:=FILTER(QY,HIGHN) AND RSII=HHV(RSII,HIGHN+1);
DRAWICON(CCC,RSII*1.02,2);
DDD:=BARSLAST(CCC);
GDTS:=IF(CCC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(RSII,DDD),RSII);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
AA1:=REF(RSII,LOWN)=LLV(RSII,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND RSII=LLV(RSII,LOWN+1);
DRAWICON(CC1,RSI*0.098,1);DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
相关文章
-
没有相关内容