自用指标公式A指标 公式 源码[其他软件公式]
指标公式源码分析及使用说明:
根据你提供的指标公式源码,看起来是一个股票或期货市场的技术分析指标的计算和图表显示代码。这段代码涵盖了多个指标的计算和条件判断,下面我来总结一下编程思路和操作建议。
源码:
DRAWGBK((CLOSE > 0),COLORRGB(0,0,0),COLORRGB(0,0,0),1);
{n15 5 5n2 10 10 10}
{cdp}
PT:= REF(HIGH,1)-REF(LOW,1),linethick0;
CDP : (HIGH + LOW + CLOSE)/3,linethick0;
AH最高值: CDP + PT,linethick0;
AL近高值: CDP - PT,linethick0;
NH最低值: 2*CDP-LOW,linethick0;
NL近低值: 2*CDP-HIGH,linethick0;
{}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=(SMA(RSV,9,1));
KK:=INTPART(SMA(RSV,3,1));
DD:=INTPART(SMA(K,3,1));
A:=(KK-DD)*5;
A1:=REF(A,1);
B:=A1-A,Color808080;
B1:=REF(A1-A,1);
B2:=REF(A1-A,2);
CC:=B+B1+B2,Color00FFFF;
短强:STICKLINE(a>cc and a>0 ,a,cc,8,0),Color0000D5;
转强:STICKLINE(a>cc and a<0,a,cc,8,0),Color00DFDF;
转弱:STICKLINE(a<=cc and a>0,a,cc,8,0),Color00CA00;
弱势:STICKLINE(a<cc and a<0,a,cc,8,0),ColorFF0000;
CXH1A:=EMA(EMA(EMA(CLOSE,1),3),3),Color00FF00;
aa:=CXH1A-REF(CXH1A,1)+CXH1A,;
TYP:=(HIGH + LOW + CLOSE)/3;
cci:="cci"(14);
a:=ref(c,1);
rsi:=sma(max(c-a,0),6,1)/sma(abs(c-a),6,1)*100;
a1:=c-ma(c,5)/ma(c,5)*100<1;
a2:=c-ma(c,13)/ma(c,13)*100<-10;
a3:=c-ma(c,34)/ma(c,34)*100<-15;
a4:=rsi<18;
a5:=cci<-120;
底:(a1 and a2 and a3 and a4 and a5)*100;
rK:SMA(cci,3,1),linethick0;
rD:SMA(rK,3,1),linethick0;
rJ:3*rK-2*rD,linethick0;
头:=390+REVERSE(EMA(rJ, 1));
底:=-290+REVERSE(EMA(rJ,1)),linethick0;
抛:if(rJ>头,200,300),COLORGREEN;{http://www.cxh99.com}
吸:if(rJ<底,-200,-300),colorred,linethick2;
TYP := (HIGH + LOW + CLOSE)/3;
CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORWHITE,LINETHICK2;
底部:-200,LINEDOT;
买入:-100,LINEDOT,COLORGRAY;
卖出:100,LINEDOT;
aass:0;
底部:=CROSS(CCI,-100);
DRAWICON(底部,-100,1);
顶部:=CROSS(150,CCI);
DRAWICON(顶部,150,2);
TYP := (HIGH + LOW + CLOSE)/3;
JG1:=(TYP-MA(TYP,N1))/(0.015*AVEDEV(TYP,N1));
JG2:=(TYP-MA(TYP,N2))/(0.015*AVEDEV(TYP,N2));
JGA:=EMA(JG1,13 );
JGB:=EMA(JG2,13);
aa:=cross(jg2,-200) and jg1>-100;
drawtext(cross(jgb,jga)and jgb>0,210,'$逃顶')linethick2 ,color9999ff;
drawtext(filter(aa,5)=1,-180,'$抄底')linethick2, coloryellow;
stickline(cross(jgb,jga)and jgb>0,180,210,10,0),colorgreen ;
stickline(filter(aa,5)=1,-180,-210,10,0),colorred;
{}
中线: -200*(HHV(HIGH,40)-CLOSE)/(HHV(HIGH,40)-LLV(LOW,40)),LINETHICK0;
短线: -200*(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10)),COLORFFFF00,LINETHICK0;
逃顶线: -5,COLOR00FF00,LINETHICK0;
抄底线: -250,COLORRED,LINETHICK0;
DRAWTEXT(中线>-3.5,逃顶线+180,'逃'),COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(中线<-196,抄底线-8,'底'),COLORFF00FF;
{}
CXH1:=EMA(CLOSE,12)-EMA(CLOSE,24);
CXH11:=EMA(CLOSE,24)-EMA(CLOSE,12);
CXH2:=EMA(CXH1,9);
CXH22:=EMA(CXH11,9);
CXH3:=(CXH1-CXH2)*10;
CXH33:=(CXH11-CXH22)*12;
CXH5:= IF( CXH3>0.5,POW(CXH3,3)*10/10+POW(CXH3,3),0);
CXH55:= IF( CXH33>0.5,POW(CXH33,3)*10/10+POW(CXH33,3),0);
顶2:CXH5>0;
底2:CXH55>0;
DRAWICON(顶2=1 AND REF(顶2,1)=0 AND REF(顶2,2)=0 AND REF(顶2,3)=0 AND REF(顶2,4)=0 AND REF(顶2,5)=0 AND REF(顶2,6)=0 AND REF(顶2,7)=0 AND REF(顶2,8)=0,0,1);
{神奇变色线}
趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))),3,1),COLORRED,LINETHICK;
判断:SMA(趋势,3,1),COLORYELLOW;
PARTLINE(判断>50 AND 趋势>判断,判断),COLORYELLOW,LINETHICK3;
PARTLINE(判断<50 AND 趋势<=判断,判断),COLORBLUE,LINETHICK3;
PARTLINE(判断>50 AND 趋势<=判断,判断),COLORRED,LINETHICK3;
PARTLINE(判断<50 AND 趋势>判断,判断),COLOR1477ff,LINETHICK3;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容