您现在的位置:程序化交易>> 股票公式>> 同花顺>> 同花顺公式>>正文内容

小牛轨迹趋势线副图指标公式源码[同花顺公式]

相关标签:

 

指标把握主力动向,及时逃顶抄底。买卖点说明:
买点:文字标注“始”。
卖点:文字标注“终”。
1、当有连续多个“始”,以第一个“始”做为买点,忽略后面的信号。
2、当有连续多个“终”,以第一个“终”做为卖点,忽略后面的信号。
3、最优指标成功率、收益率的统计也是以第一个“始”与第一个“终”做为统计点。

 

 

原理解析:


 

 来源:程序化99( WWW.CXH99.COM )

源码:

 

 


N1:=17;N2:=34;
RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
短K:SMA(RSV,3,1),colorred,LINETHICK2;
短D:SMA(短K,3,1),coloryellow,LINETHICK2;
RSV1:=(CLOSE-LLV(LOW,N2))/(HHV(HIGH,N2)-LLV(LOW,N2))*100;
中K:SMA(RSV1,5,1),colormagenta,LINETHICK2;
中D:SMA(中K,10,1),colorgreen,LINETHICK2;
短:=3*短K-2*短D,colorred,LINETHICK4;
中:=3*中K-2*中D,colorred,LINETHICK4;
趋势线:(短+中)/2,COLORFF9900,LINETHICK2;
BB:=IF(BARSLAST(CROSS(短K,RSV))>=3 AND CROSS(RSV,短K) AND 短K<30,20,0);
STICKLINE(BB,0,50,2.8,1),COLOR0000BB;
STICKLINE(BB,0,50,1.4,1),COLOR0000DD;
STICKLINE(BB,0,50,0.7,1),COLOR0000FF;
AA:=IF(BARSLAST(CROSS(RSV,短K))>=4 AND CROSS(短K,RSV) AND RSV>50,20,0);
STICKLINE(AA,80,100,2.8,1),COLORD8D8D8;
STICKLINE(AA,80,100,1.4,1),COLORE8E8E8;
STICKLINE(AA,80,100,0.7,1),COLORFFFFFF;
超卖:10,colorwhite;
超买:90,colorblue;
STICKLINE(短K>短D,短K,短D,1,0),colorred;
STICKLINE(短K<=短D,短K,短D,1,0),coloryellow;
STICKLINE(中K>中D,中K,中D,1,0),colormagenta;
STICKLINE(中K<=中D,中K,中D,1,0),colorgreen;
DRAWTEXT(CROSS(中K,中D),中D,'始');
DRAWTEXT(CROSS(中D,中K),中K,'终');
BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
MM:=(BIAS1+2*BIAS2+3*BIAS3)/6;
股价趋势:=MA(MM,3),colorred;
买入信号:=EMA(股价趋势,2);
底部区域:IF(股价趋势<-6,20,0),LINETHICK2,coloryellow;
DRAWTEXT(CROSS(股价趋势,买入信号) AND COUNT(买入信号<-6,2)>1,50,'↑'),colorred,LINETHICK3;
STICKLINE((股价趋势<-9),0,0,4,0 ),COLORCC0033;
STICKLINE((股价趋势<-9),0,5,4,0 ),COLORFF9966;
底部预警信号:=
STICKLINE( (股价趋势<-9),0,2,4,0),LINETHICK2 ,colorwhite;
STICKLINE( (股价趋势<-9),0,8,4,0 ),LINETHICK2,COLORFFFF66;
XY1272:=
STICKLINE((股价趋势<-12),10 ,-15,4,0) ,COLOR0066FF;
STICKLINE((股价趋势<-12),10 ,-5,4,0 ),COLOR0099FF;
STICKLINE((股价趋势<-12),10 ,0,4,0 ),COLOR00CCFF;
STICKLINE((股价趋势<-12),10 ,3,4,0),COLOR00FFFF;
机会来临:REF(IF((MA(C,5)-C)/C>0.03 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.03,30,0),1),LINETHICK2,colorred;
BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
MM:=(BIAS1W+2*BIAS2W+3*BIAS3W)/6;
MN:=MA(MM,3);
VAR24:=LLV(LOW,36);
VAR25:=HHV(HIGH,30);
VAR26:=EMA((CLOSE-VAR24)/(VAR25-VAR24)*4,4)*25;
底观察:IF(MN<-4,10,0),colorblue,LINETHICK2;
底背离: IF((VAR26<10),5,18), coloryellow,LINETHICK2;
顶背离: IF((VAR26>90),90,100), COLORFFFFFF,LINETHICK2;
AA:=LLV(LOW,36);
BB:=HHV(HIGH,30);
DD:=(EMA(((CLOSE-AA)/(BB-AA))*(4),4))*(25);
股海:=(((DD-LLV(DD,21))/(HHV(DD,21)-LLV(DD,21)))*(4))*(25);
跟踪:10,COLOR0000FF,LINETHICK1;
神偷出现:IF((COUNT((DD>REF(DD,1)),1)=1) AND (REF(DD,1)<REF(REF(DD,1),1)) AND (DD<跟踪),20,0),COLORF00FF0;TIPTEXT(ISNULL(REFX(&CLOSE,1)),0,' WWW.CXH99.COM '),colorred;
TIPTEXT(ISNULL(REF(CLOSE,1)),0,'同花顺程序化交易');

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 1145508240  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容