突破防线指标 公式 源码[通达信公式]
指标公式代码分析及使用参考建议:
根据给出的代码,这段代码主要是一个股票交易指标的计算公式。具体包括了买卖点的计算、涨停跌停的标注、周KDJ和月KDJ指标的计算等。
以下是对代码中一些重要部分的解读:
1. cxh1Y到cxh19Y:这些变量是用来计算买卖点的条件,通过比较当前收盘价和前两天的收盘价来判断买入和卖出的时机。
2. 红色持股、青色观望、品红离场和短买:这些变量是根据买卖点的条件进行标记,用不同的颜色进行显示,方便用户进行可视化分析。
3. 急速超跌:这个变量用来判断股票是否处于急速下跌的状态,具体条件是当收盘价与30日均线的差值占比超过-12%时认为急速超跌。
4. 五日线、二十线、九十线:这些变量是通过求收盘价的移动平均线得到的,用来判断股票的走势。
5. MACD指标:通过短期和长期移动平均线之间的差值计算得到,用来判断股票的买入和卖出信号。
6. 增量资金和主力资金:分别是通过股票价格和成交量的变化来计算的,用来判断市场的资金流入和流出情况。
根据以上指标的计算结果,可以综合判断股票的买卖点和走势。但需要注意,这只是一个计算公式,并不代表一定准确,实际操作时还需要结合其他因素进行判断。
对于操作建议,根据代码提供的信息,我无法得知具体的股票或市场情况,因此无法给出具体的操作建议。建议您在股票投资时,多方面考虑市场因素、风险收益等情况,慎重做出决策。如果有需要,可以咨询专业的投资机构或金融顾问。
源码:
cxh1Y:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));cxh2Y:=(REF(cxh1Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh3Y:=(REF(cxh2Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh4Y:=(REF(cxh3Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh5Y:=(REF(cxh4Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh6Y:=(REF(cxh5Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh7Y:=(REF(cxh6Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh8Y:=(REF(cxh7Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh9Y:=(REF(cxh8Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxhAY:=(REF(cxh9Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxhBY:=(REF(cxhAY,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxhCY:=(REF(cxhBY,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxhDY:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));cxhEY:=(REF(cxhDY,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxhFY:=(REF(cxhEY,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh10Y:=(REF(cxhFY,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh11Y:=(REF(cxh10Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh12Y:=(REF(cxh11Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh13Y:=(REF(cxh12Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh14Y:=(REF(cxh13Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh15Y:=(REF(cxh14Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh16Y:=(REF(cxh15Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh17Y:=(REF(cxh16Y,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));cxh18Y:=(REF(cxh17Y,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));cxh19Y:=((REF(cxhDY OR cxhEY OR cxhFY OR cxh10Y OR cxh11Y OR cxh12Y OR cxh13Y OR cxh14Y OR cxh15Y OR cxh16Y OR cxh17Y OR cxh18Y,1)) AND cxh1Y);cxh1AY:=((REF(cxh1Y OR cxh2Y OR cxh3Y OR cxh4Y OR cxh5Y OR cxh6Y OR cxh7Y OR cxh8Y OR cxh9Y OR cxhAY OR cxhBY OR cxhCY,1)) AND cxhDY);红色持股:=cxh1Y OR cxh2Y OR cxh3Y OR cxh4Y OR cxh5Y OR cxh6Y OR cxh7Y OR cxh8Y OR cxh9Y OR cxhAY OR cxhBY OR cxhCY,COLOR0000FF,NODRAW;青色观望:=IF((cxhDY OR cxhEY OR cxhFY OR cxh10Y OR cxh11Y OR cxh12Y OR cxh13Y OR cxh14Y OR cxh15Y OR cxh16Y OR cxh17Y OR cxh18Y),1,0);品红离场:=cxh1AY,COLORFF99FF,NODRAW;短买:=cxh19Y,COLOR33AACC,NODRAW;急速超跌:=(CLOSE-MA(CLOSE,30))/MA(CLOSE,30)*100<-12,COLORFFFFFF,NODRAW;STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(红色持股,CLOSE,O,4.8,0),COLOR0000AA;STICKLINE(红色持股,CLOSE,O,3.5,0),COLOR0000CC;STICKLINE(红色持股,CLOSE,O,2.5,0),COLOR0000EE;STICKLINE(红色持股,CLOSE,O,1.5,0),COLOR0000FF;STICKLINE(青色观望,CLOSE,O,4.8,0),COLORAAAA00;STICKLINE(青色观望,CLOSE,O,3.5,0),COLORCCCC00;STICKLINE(青色观望,CLOSE,O,2.5,0),COLOREEEE00;STICKLINE(青色观望,CLOSE,O,1.5,0),COLORFFFF00;CO:=(C-O);STICKLINE(急速超跌,O,C-CO/2,3.0,1),COLOR999999;STICKLINE(急速超跌,O,C-CO/2,2.0,0),COLORAAAAAA;STICKLINE(急速超跌,O,C-CO/2,0.9,1),COLORCCCCCC;STICKLINE(急速超跌,O,C-CO/2,0.0,0),COLOREEEEEE;STICKLINE(短买,O,O+CO/3,3.0,1),COLOR338888;STICKLINE(短买,O,O+CO/3,2.0,0),COLOR33AAAA;STICKLINE(短买,O,O+CO/3,0.9,1),COLOR33CCCC;STICKLINE(短买,O,O+CO/3,0,0),COLOR33EEEE;STICKLINE(品红离场,O,O+CO/3,3.0,1),COLOR880088;STICKLINE(品红离场,O,O+CO/3,2.0,0),COLOR880088;STICKLINE(品红离场,O,O+CO/3,0.9,1),COLORAA00AA;STICKLINE(品红离场,O,O+CO/3,0.05,0),COLOREE00EE;五日线:MA(C,4),LINETHICK2;五日线1:=MA(C,7),LINETHICK2;二十线:MA(C,17),LINETHICK2;九十线:MA(C,60),LINETHICK2;涨:IF(二十线>REF(二十线,1),二十线,DRAWNULL),COLOR00009C,LINETHICK3;平:=IF(二十线=REF(二十线,1),二十线,DRAWNULL),LINETHICK2;跌:IF(二十线<REF(二十线,1),二十线,DRAWNULL),COLORGREEN,LINETHICK2;SHORT:=12;LONG:=26;MID:=9;DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:=EMA(DIF,MID);MACD:=(DIF-DEA)*2,;VR02:=DIF>DEA AND MACD>0;cxh1:=EMA(CLOSE,2)-EMA(CLOSE,89)*1;cxh2:=EMA(cxh1,30)*1;cxh3:=2*(cxh1-cxh2)*10*1;cxh4:=POW(cxh3,3)*0.1+POW(cxh3,2)*1;cxh5:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));cxh6:=EMA(cxh5*0.97,3)*1;cxh7:=(HIGH+LOW+CLOSE)/3*1;cxh8:=(cxh7-MA(cxh7,12))/(0.015*AVEDEV(cxh7,12))*1;cxh9:=IF(cxh3>0.015,cxh4,0)/45*1;cxh10:=EMA(CLOSE,2)-EMA(CLOSE,150);增量资金:=cxh9;cxh11:=EMA(cxh10,100);cxh12:=2*(cxh10-cxh11);cxh13:=POW(cxh12,3)*0.1+POW(cxh12,1);cxh1A:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));cxh1B:=EMA(cxh1A*0.97,3);cxh1C:=(HIGH+LOW+CLOSE)/3;cxh1D:=(cxh1C-MA(cxh1C,14))/(0.015*AVEDEV(cxh1C,14));主力资金:=IF(cxh12>0.1,cxh13,0)*5,LINETHICK2,COLORYELLOW;VR03:=增量资金>0 AND 主力资金>0;M1:=5;M2:=60;VOLUME:=VOL;MAVOL1:=MA(VOLUME,M1);MAVOL2:=MA(VOLUME,M2);VR04:=MAVOL1>MAVOL2;买点:=VR02 AND VR03 AND VR04;BT01:=REF(MACD,1)<0 AND MACD>0;BT02:=REF(MACD,2)<0 AND MACD>0;BT03:=REF(MACD,3)<0 AND MACD>0;BT123:=BT01 OR BT02 OR BT03;VR1:=CROSS(五日线,二十线) AND 二十线>REF(二十线,1) AND 二十线<九十线 AND 买点;DRAWICON(VR1,二十线*0.99,25),COLOR00FFFF,LINETHICK8;DRAWTEXT(VR1,二十线*0.94,'基础进入'),COLORFF00FF,LINETHICK8;VR1X:=CROSS(五日线,五日线1) AND C>O AND H/C<1.025 AND C>REF(C,1);DRAWICON(VR1X,五日线1*0.98,25),COLOR00FFFF,LINETHICK2;DRAWTEXT(VR1X,五日线1*0.95,'突破'),COLOR00FFFF,LINETHICK2;VR2:=CROSS(五日线,九十线) AND 买点;DRAWICON(VR2,九十线*0.98,26),COLOR00FFFF,LINETHICK8;DRAWTEXT(VR2,九十线*0.935,'再加点'),COLOR00FFFF,LINETHICK2;VR3:=CROSS(二十线,九十线) AND 买点;DRAWICON(VR3 AND C>O*0.99,九十线*0.99,27),COLOR00FFFF,LINETHICK8;DRAWTEXT(VR3 AND C>O*0.99,九十线*0.97,'睹全部'),COLORRED,LINETHICK8;VR4:=CROSS(五日线,二十线) AND 二十线>REF(二十线,1) AND 二十线>九十线 AND 买点 AND BT123;DRAWICON(VR4,二十线*0.99,24),COLOR00FFFF,LINETHICK8;DRAWTEXT(VR4,二十线*0.95,'睹性质'),COLORRED,LINETHICK8;C2:=REF(C,1);涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),0.8,0);跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),0.8,0);STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;周K:="KDJ.K#WEEK"(9,3,3);周D:="KDJ.D#WEEK"(9,3,3);周J:="KDJ.J#WEEK"(9,3,3);月K:="KDJ.K#MONTH"(9,3,3);月D:="KDJ.D#MONTH"(9,3,3);月J:="KDJ.J#MONTH"(9,3,3);月金叉:=CROSS(月K,月D);周金叉:=CROSS(周K,周D);
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容