股海云游指标 公式 源码[同花顺公式]
指标公式代码分析及使用参考建议:
根据给出的指标代码,该指标应用了折线、峰谷、移动平均等技术指标,并结合买点条件和交叉信号进行分析。以下是对该指标的简要总结思路和操作建议:
1. 峰谷识别:利用折线、峰谷值函数判断价格的波峰和波谷。
2. 买卖信号:通过比较当前价格与前一天和前两天的价格,判断价格的上升或下降趋势。
3. 加仓建仓信号:利用峰谷信号和移动平均线的交叉,判断加仓和建仓的时机。
4. 减仓清仓信号:利用峰谷信号和移动平均线的交叉,判断减仓和清仓的时机。
5. 布林通道:利用标准差计算上轨和下轨,用于判断价格的高低点。
基于以上指标,可以得出以下操作建议:
- 当买点1、买点2或买点3信号出现时,可以考虑适当加仓或建仓。
- 当顶A等信号出现时,可以适量减仓或清仓。
- 利用布林通道的上下轨进行止盈和止损的设定。
- 根据加仓建仓和减仓清仓信号,结合移动平均线交叉等指标,进行买入和卖出的操作。
需要注意的是,以上仅是简要总结思路和操作建议,并不构成投资建议,具体操作应根据个人风险承受能力、市场状况和其他指标综合考虑。在实际操作中,建议配合其他技术分析工具和基本面分析,以提高操作的准确性和稳定性。
源码:
折线:ZIG(3,20);
前波峰值:=PEAK(3,20,1);
前波谷值:=TROUGH(3,20,1);
DRAWNUMBER(折线>REF(折线,1) AND REF(折线,1)<REF(折线,2),REF(C,1),-(前波峰值-REF(C,1))/前波峰值*100);
DRAWNUMBER(折线<REF(折线,1) AND REF(折线,1)>REF(折线,2),REF(C,1),(REF(C,1)-前波谷值)/前波谷值*100);
CXH1:=ZIG(3,2.88)<REF(ZIG(3,2.88),1) AND REF(ZIG(3,2.88),1)>REF(ZIG(3,2.88),2);
CXH2:=ZIG(3,2.88)>REF(ZIG(3,2.88),1) AND REF(ZIG(3,2.88),1)<REF(ZIG(3,2.88),2);
STICKLINE(CXH1,C,O,8,0),COLOR00FF00;
STICKLINE(CXH1,C,O,5,0),COLOR00FF00;
STICKLINE(CXH1,H,L,2,0),COLOR00FF00;
STICKLINE(CXH2,C,O,7,0),COLOR0000FF;
STICKLINE(CXH2,C,O,5,0),COLOR0000FF;
STICKLINE(CXH2,H,L,2,0),COLOR0000FF;
//www.cxh99.com
X1:=(C+L+H)/3;
X2:=EMA(X1,6);
X3:=EMA(X2,5);
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,6,0),coloryellow;
STICKLINE(CROSS(X3,X2),OPEN,CLOSE,6,0),colorblue;
B:EMA(C,2),POINTDOT,color000000;
W:ZIG(1,3),coloryellow;
G:=MA(W,2),colorred;
D:=EMA(W,34),COLORGREEN;//http://www.cxh99.com
F:=100*(C-REF(C,1))/REF(C,1);
JD:=IF(C<REF(O,1) AND F<0,1,0);
S1:=JD;
MR:=IF(C<REF(O,2) AND F<0,1,0),LINETHICK0;
S2:=MR;
A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1));
A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1));
AA:=(CROSS(W,G) AND (A1 AND A2 OR D<0)) OR CROSS(B,G);
A11:LLV(LOW,144),colormagenta;
STICKLINE(A11<W AND W>REF(W,1),W,A11,9,0),colorbrown,LINETHICK5;
STICKLINE(A11<B AND W<REF(W,1),W,A11,0.8,0),COLORGREEN;//http://www.cxh99.com
A11,colorgray,LINETHICK7;
B:ZIG(3,10),coloryellow;
G:=MA(B,2),colorred;
D:=EMA(B,34),COLORGREEN;//http://www.cxh99.com
J:=EMA(B,144),colorligreen;
DRAWICON(CROSS(B,G),B-0.1,1);
DRAWICON(CROSS(G,B),G+0.1,2);
//DRAWTEXT(CROSS(B,G),B*0.85,"建"),coloryellow;
//DRAWTEXT(CROSS(G,B),G,"清"),COLORGREEN;//http://www.cxh99.com
F:=100*(C-REF(C,1))/REF(C,1);
JD:=IF(C<REF(O,1) AND F<0,1,0);
S1:=JD;
MR:=IF(C<REF(O,2) AND F<0,1,0),LINETHICK0;
S2:=MR;
A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1));
A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1));
//DRAWTEXT(A1 AND A2 OR D<0,B,'加仓'),coloryellow;//加仓买
//DRAWICON(A1 AND A2,B-0.2,1);
CXH3:=PEAKBARS(3,5,1)<10;
CXH5:=IF(CXH3=1,2,0);
顶:= IF(CXH5=2,2,0);
顶A:=IF(顶>REF(顶,1),1,0),STICK,colorcyan, LINETHICK2;//
//DRAWTEXT(顶A=1,B*1.1,'减仓'),COLORGREEN;//http://www.cxh99.com
DRAWICON(顶A=1,B,2);
MID:=MA(CLOSE,26);
UPPER:=MID + 2*STD(CLOSE,26),colorwhite;//上轨
UPPER1:=MID + 1.618*STD(CLOSE,26),colorred;//上轨
LOWER:=MID - 2*STD(CLOSE,26),coloryellow;//下轨
LOWER1:=MID - 1.618*STD(CLOSE,26),COLORGREEN;//http://www.cxh99.com//下轨
//DRAWTEXT(CROSS(CLOSE,LOWER),J*1.05,"L"),coloryellow;;
//DRAWTEXT(CROSS(CLOSE,UPPER),J*1.05,"L"),COLORGREEN;//http://www.cxh99.com
VERLINE(CROSS(B,G) AND (A1 AND A2 OR D<0),1),colorlimagenta;//画加仓建仓垂线
VERLINE(CROSS(G,B),1),colorcyan;//画清仓垂线
买线:=ZIG(3,10);
卖线:=MA(买线,3);
STICKLINE(CROSS(买线,卖线),O,C,9,0),COLOR00AAFF;
STICKLINE(买线<卖线,H,L,0,0),COLORGREEN;//http://www.cxh99.com
STICKLINE(买线<卖线,C,O,9,0),Color007700;
STICKLINE(买线<卖线,C,O,8,0),Color008E00;
STICKLINE(买线<卖线,C,O,7,0),Color009900;
STICKLINE(买线<卖线,C,O,6,0),Color00A600;
STICKLINE(买线<卖线,C,O,5,0),Color00B500;
STICKLINE(买线<卖线,C,O,4,0),Color00C600;
STICKLINE(买线<卖线,C,O,3,0),Color00D500;
STICKLINE(买线<卖线,C,O,2,0),Color00E600;
STICKLINE(买线>=卖线,H,L,0,0),Color0000FF;
STICKLINE(买线>=卖线,C,O,9,0),Color0000A3;
STICKLINE(买线>=卖线,C,O,8,0),Color0000B7;
STICKLINE(买线>=卖线,C,O,6,0),Color0000C8;
STICKLINE(买线>=卖线,C,O,5,0),Color0000D9;
STICKLINE(买线>=卖线,C,O,4,0),Color0000CD;
STICKLINE(买线>=卖线,C,O,3,0),Color0000E9;
STICKLINE(买线>=卖线,C,O,2,0),Color0000EA;
STICKLINE(买线>=卖线,C,O,1,0),Color0000FF;
CXH10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
CXH11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
CXH12:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
CXH13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
CXH14:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
CXH15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
CXH16:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
CXH17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
CXH18:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
CXH19:=EMA(CLOSE,2)-EMA(CLOSE,150);
CXH1A:=EMA(CXH19,100);
CXH1B:=2*(CXH19-CXH1A);
CXH1C:=POW(CXH1B,3)*0.1+POW(CXH1B,1);
CXH1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
CXH1E:=EMA(CXH1D*0.97,3);
CXH1F:=(HIGH+LOW+CLOSE)/3;
买点1:=CXH10;
买点2:=(CXH11+CXH13+CXH15+CXH17);
CXH1:=MA(CLOSE,5);
CXH2:=MA(CLOSE,10);
CXH3:=MA(CLOSE,30);
CXH4:=MA(CLOSE,60);
CXH5:=EMA(COST(85),7);
CXH6:=EMA(COST(15),7);
CXH7:=SUM(CLOSE*VOL*100,4)/SUM(VOL*100,4);
CXH8:=INTPART(CXH7*100)/100;
CXH9:=SUM(CLOSE*VOL*100,7)/SUM(VOL*100,7);
CXHA:=INTPART(CXH9*100)/100;
CXHB:=SUM(CLOSE*VOL*100,28)/SUM(VOL*100,28);
CXHC:=INTPART(CXHB*100)/100;
CXHD:=EMA(CLOSE,5)-EMA(CLOSE,10);
CXHE:=EMA(CXHD,9);
CXH13:=REF(CXHE,1);
CXH14:=CXHE;
CXH15:=CXH14-CXH13;
CXH16:=REF(CXHD,1);
CXH19:=OPEN;
买点3:=IF(CXH19<=CXH1 AND CXH19<=CXH2 AND CXH19<=CXH3 AND CXH1A>=CXH1 AND CXH1A>=CXHC AND CXH15>0 AND CXH18>0,0.5,0);
VERLINE(买点3>0 OR 买点1>0 OR 买点2>0, 2),Color0000FF;
A1:=C>=REF(C,4);
A:=C<REF(C,4);
AA:=C<REF(C,4) AND REF(A1,2);
T:=BARSLAST(AA),NODRAW;
N:=T=1 AND REF(T=0 AND AA,2) AND A;
N1:=T=2 AND REF(N,1) AND A;
N2:=T=3 AND REF(N1,1) AND A;
N3:=T=4 AND REF(N2,1) AND A;
N4:=T=5 AND REF(N3,1) AND A;
N5:=T=6 AND REF(N4,1) AND A;
N6:=T=7 AND REF(N5,1) AND A;
N7:=T=8 AND REF(N6,1) AND A;
DRAWTEXT(N5,H*1.10,'7'),colorred;
DRAWTEXT(N6,H*1.10,'8'),colorred;
DRAWTEXT(N7,H*1.10,'9'),colorred;
CXH10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
CXH11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
CXH13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);nbsp;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容