该指标是一个技术指标,由多个逻辑条件组成,主要用于股票的买卖信号判断和趋势研判。以下是对该指标的详细分析:
1. CXH31-CXH119:它们是一系列逻辑条件,用于判断股票的买卖信号。其中,CXH31表示当日的收盘价大于前两个交易日的收盘价,并且前两个交易日的收盘价都小于当前收盘价,即出现了类似“上升通道”的走势,属于买进信号。CXH32-CXH39、CXHA-CXHC是根据不同的交叉情况判断股票买卖信号。
2. DIFF和DEA:是用来计算DIF和DEA指标的参数。其中DIF是12日移动平均线与26日移动平均线之差,而DEA则是DIF的9日移动平均值。通过分析DIF和DEA的交叉情况,可以确定股票的买卖信号。
3. MACD:是DIF和DEA的差值,并乘以2得到的指标,用于判断趋势研判。
4. A和E2:是STICKLINE函数用于画折线图,A表示当MACD指标开始上升,并且上升的幅度大于0.01时,出现红色的折线,表示买进信号。E2则表示当MACD指标回抽,并且回抽的幅度较大时,出现黄色的折线,表示可关注的信号。
5. RSV:是一个用于计算KDJ指标的参数,通过计算当前收盘价在最近9个交易日内的位置,从而判断股票的买卖信号。
思路:
根据CXH31-CXH119逻辑条件判断,判断股票的买卖信号。同时,根据DIF和DEA的交叉情况和MACD的趋势研判,确定股票的买卖信号。通过画折线图的方式,更加直观地显示出买卖信号。最后,根据RSV的计算,综合判断股票的买卖信号。
cxh31:=C>REF(C,1) AND C>REF(C,2);
cxh32:=REF(cxh31,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxh33:=REF(cxh32,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxh34:=REF(cxh33,1) AND C<=REF(C,1) AND C>=REF(C,2);cxh35:=REF(cxh34,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxh36:=REF(cxh35,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxh37:=REF(cxh36,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxh38:=REF(cxh37,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxh39:=REF(cxh38,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxhA:=REF(cxh39,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxhB:=REF(cxhA,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxhC:=REF(cxhB,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxhD:=C<REF(C,1) AND C<REF(C,2);cxhE:=REF(cxhD,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxhF:=REF(cxhE,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxh110:=REF(cxhF,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxh111:=REF(cxh110,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxh112:=REF(cxh111,1) AND C>=REF(C,1) AND C<=REF(C,2);
DIFF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
cxh113:=REF(cxh112,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxh114:=REF(cxh113,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxh115:=REF(cxh114,1) AND C<=REF(C,1) AND C>=REF(C,2);
D:((((LLV(MACD,8)>0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3))) AND (REF(MACD,3)<REF(MACD,4))AND (REF(MACD,4)>REF(MACD,5))AND (REF(MACD,5)>REF(MACD,6));
cxh116:=REF(cxh115,1) AND C>=REF(C,1) AND C<=REF(C,2);
cxh117:=REF(cxh116,1) AND C<=REF(C,1) AND C>=REF(C,2);
cxh118:=REF(cxh117,1) AND C>=REF(C,1) AND C<=REF(C,2);
MACD:=(DIFF-DEA)*2;
cxh119:=REF(cxhD OR cxhE OR cxhF OR cxh110 OR cxh111 OR cxh112 OR cxh113 OR
cxh114 OR cxh115 OR cxh116 OR cxh117 OR cxh118,1) AND cxh31;
cxh1A:=REF(cxh31 OR cxh32 OR cxh33 OR cxh34 OR cxh35 OR cxh36 OR cxh37 OR
cxh38 OR cxh39 OR cxhA OR cxhB OR cxhC,1) AND cxhD;
A:STICKLINE(MACD>=0 AND MACD>=REF(MACD,1) AND REF(MACD,1)<0 AND MACD>=0.01,10,MACD,10,0) ,COLORRED ;E2回抽:STICKLINE((((LLV(MACD,3)>0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3))AND MACD>=0.15,6,MACD,5,0),COLORYELLOW; ;RSV:=(((C - LLV(L,9)) / (HHV(H,9) - LLV(L,9))) * 100);
K:=SMA(RSV,3,1);
DH:=SMA(K,3,1);
J:=3*K-2*DH;
X:=LLV(J,2)=LLV(J,8);RE:=CROSS(J,REF(J+0.01,1)) AND X AND J<19;
STICKLINE(RE,0,11,3,0),COLORYELLOW;
CSS:=((C-LLV(L,8))/(HHV(H,8)-LLV(L,8))*100);
HH:=CROSS(20,EMA(CSS,3));
CE:=REF(HH,1);
AA:=REF(C,1);
BBB:=SMA(MAX(C-AA,0),5,1)/SMA(ABS(C-AA),5,1)*1000;
HHH:=BBB-LLV(BBB,10);
SS:=(MA(HHH,2)*3+HHH*13)/16;
短线买点:=IF(SS>13,MA(SS,2),SS)/6;
短线出击:=IF(CROSS(短线买点,1) AND (短线买点<30),30,1);
II:=短线出击=30;
合成:CE AND II;A1:=EMA(CLOSE,7)-EMA(CLOSE,21);
A2:=MA(A1,4);
XG:CROSS(A1,A2)*20;DRAWTEXT_FIX(C>O,0.01,0.9,0,' '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(怎么收费,代编流程等详情请点击查阅!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)