指标公式源码分析及使用说明:
源码
cxh1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
cxh2:=REF(cxh1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh3:=REF(cxh2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxh4:=REF(cxh3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh5:=REF(cxh4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxh6:=REF(cxh5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh7:=REF(cxh6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxh8:=REF(cxh7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh9:=REF(cxh8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxhA:=REF(cxh9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxhB:=REF(cxhA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxhC:=REF(cxhB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(cxh1 OR cxh2 OR cxh3 OR cxh4 OR cxh5 OR cxh6 OR cxh7 OR
cxh8 OR cxh9 OR cxhA OR cxhB OR cxhC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{红1}
cxhD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
cxhE:=REF(cxhD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxhF:=REF(cxhE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh10:=REF(cxhF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxh11:=REF(cxh10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh12:=REF(cxh11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxh13:=REF(cxh12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh14:=REF(cxh13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxh15:=REF(cxh14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh16:=REF(cxh15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
cxh17:=REF(cxh16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
cxh18:=REF(cxh17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(cxhD OR cxhE OR cxhF OR cxh10 OR cxh11 OR cxh12 OR cxh13 OR
cxh14 OR cxh15 OR cxh16 OR cxh17 OR cxh18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;
cxh19:=REF(cxhD OR cxhE OR cxhF OR cxh0 OR cxh11 OR cxh12 OR cxh13 OR
cxh14 OR cxh15 OR cxh16 OR cxh17 cxh18,1) AND cxh1;
STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;
cxh1A:=REF(cxh1 OR cxh2 OR cxh3 OR cxh4 OR cxh5 OR cxh6 OR cxh7 OR
cxh8 OR cxh9 OR cxhA OR cxhB OR cxhC,1) AND cxhD;
STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),5,2),COLOR00FF00{98FD};
STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;
STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;
STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10FFFF;
STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00D900;
STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;
STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090FF2;
PMA:MA(C,5),COLORWHITE,LINETHICK2;
IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;
IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK2;
X:=(3*C+L+O+H)/6;
多空线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)
+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)
+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+
REF(X,20))/210,COLORFF00FF,LINETHICK2;
{用法:黄托底买进,蓝压顶卖出。}
DD:=多空线<REF(多空线,1);
IF(DD,多空线,DRAWNULL),COLOR00FFFF,LINETHICK2;
A:=(PMA>多空线);
IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;
cxh21:=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);
cxh22:=8;
ww:=CROSS(cxh21,cxh22);
DRAWTEXT(ww,L*0.98,'买进!'),COLOR0099FF;
******************************************************************************
{天下操盘副图}
V1:=MA(C,3)=HHV(MA(C,3),7);
V2:=MA(C,3)>MA(C,5);
V3:=MA(V,5)>MA(V,10)*1.01;
V4:=COUNT(MA(C,1)>REF(C,1),2)=2;
LC20:=REF(CLOSE,1);
RSI20:=SMA(MAX(CLOSE-LC20,0),4.1,1)/SMA(ABS(CLOSELC20),4.1,1)*100;
cxh3A:=3;
cxh2A:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA ABS MTM),6),6);
YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
买进:IF(FILTER(YXF=1,5),1,0),STICK,COLORRED,LINETHICK9;
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((CLLV(L,55))/(HHV(H,55)-LLV
(L,55))*100,5,1);
FY:=EMA(A51,5);
A54:=((C-LLV(L,21))/(HHV(H,21)LLV(L,21)))*100;
QS:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
发表评论