您现在的位置:程序化交易>> 股票公式>> 同花顺>> 同花顺公式>>正文内容

超级机构建仓公式 指标 选股 源码[同花顺公式]

指标公式源码分析及使用参考说明:

这段代码看起来是一段股票交易的量化分析程序,主要是基于股票的历史价格和成交量等数据进行技术分析,以辅助决策买入、卖出等操作。具体思路和使用参考建议如下:

1. 大机构仓位和基金私暮仓位的计算:通过各种指标(如移动平均线、最高价最低价等)计算出相应的值,用于评估市场情况和大资金是否进出。

2. 准备现金、买入股票和卖出临界的判断:根据成交量和价格的变化,判断是否需要准备现金、买入股票或者卖出股票。

3. 主力减仓、主力清仓和主力抄底的判断:利用波动指标和价格变化判断主力资金的行为,辅助决策卖出或买入。

4. 中线趋势和爆发线的判断:利用均线和价格波动情况判断中线趋势,以及价格是否具备爆发的潜力。

5. 多空信号的判断:通过不同的技术指标计算出多空信号,辅助决策做多或者做空。

这段代码涉及到了许多专业的技术指标和计算方法,对于普通投资者来说可能需要一定的金融和编程知识才能理解和使用。如果您对这方面不是很熟悉,建议可以在专业人士的指导下使用,或者寻求专业的量化交易软件来进行操作。同时,在实际操作中,也需要谨慎对待量化模型的结果,充分考虑市场风险和自身投资能力。

 

源码:

 

大机构仓位:100*(1-WINNER(CLOSE)),colorred,LINETHICK3;

CXH211:=1/WINNER(CLOSE);
CXH311:=MA(CLOSE,13);
CXH4:=100-ABS((CLOSE-CXH311)/CXH311*100);
CXH5:=LLV(LOW,120);
CXH6:=HHV(HIGH,120);
CXH7:=(CXH6-CXH5)/100;
CXH8:=SMA((CLOSE-CXH5)/CXH7,20,1);
CXH9:=SMA((OPEN-CXH5)/CXH7,20,1);
CXHA:=3*CXH8-2*SMA(CXH8,10,1);
CXHB:=3*CXH9-2*SMA(CXH9,10,1);
CXHC:=100-CXHB;
基金私暮仓位: (100-CXHA),coloryellow,LINETHICK2;
CXHE1:=REF(LOW,1)*0.9;
CXHF1:=LOW*0.9;
CXH101:=(CXHF1*VOL+CXHE1*(CAPITAL-VOL))/CAPITAL;
CXH111:=EMA(CXH101,30);
CXH121:=CLOSE-REF(CLOSE,1);
CXH131:=MAX(CXH121,0);
CXH141:=ABS(CXH121);
CXH151:=SMA(CXH131,7,1)/SMA(CXH141,7,1)*100;
CXH161:=SMA(CXH131,13,1)/SMA(CXH141,13,1)*100;
CXH171:=BARSCOUNT(CLOSE);
CXH181:=SMA(MAX(CXH121,0),6,1)/SMA(ABS(CXH121),6,1)*100;
CXH191:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
CXH1A1:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
CXH1B1:=SMA((SMA(CXH1A1,4,1)-50)*2,3,1);
CXH1C1:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
CXH1D:=SMA(CXH1C1,4,1);
CXH1E:=SMA(CXH1D,3,1);
CXH1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
CXH20:=CXH181<=25 AND CXH191<-95 AND CXH1F>20 AND CXH1B1<-30 AND CXH1E<30 AND CXH111-CLOSE>=-0.25 AND CXH151<22 AND CXH161<28 AND CXH171>50;
CXH21:=(HIGH+LOW+CLOSE)/3;
CXH22:=(CXH21-MA(CXH21,14))/(0.015*AVEDEV(CXH21,14));
CXH23:=(CXH21-MA(CXH21,70))/(0.015*AVEDEV(CXH21,70));
CXH24:=IF(CXH22>=150 AND CXH22<200 AND CXH23>=150 AND CXH23<200,10,0);
CXH25:=IF(CXH22<=-150 AND CXH22>-200 AND CXH23<=-150 AND CXH23>-200,-10,CXH24);
STICKLINE(CXH20,0,80,2,0),LINETHICK2,colorblue;
DRAWTEXT(CROSS(CXH20,0.5) AND COUNT(CXH20=1,10)=1,90,'超级主力建仓!') , colorred;
CXHE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
CXHF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
CXH10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
CXH11:=CXHF<REF(CXH10,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(CXH11 AND COUNT(CXH11,30)=1,70,'大资金进场'),LINETHICK1,colorlimagenta;
STICKLINE(CXH11 AND COUNT(CXH11,30)=1,1,60,5,0),colorlimagenta,LINETHICK4;
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V71:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V91:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V91,3);
VB:=(V91-VA)/2;
V111:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
V121:=(EMA(V111,3)-REF(EMA(V111,3),1))/REF(EMA(V111,3),1)*100;
准备现金: STICKLINE(EMA(V111,3)<=13,0,15,5,0),colorlired;
AA:=(EMA(V111,3)<=13) AND FILTER((EMA(V111,3)<=13),15);
DRAWTEXT (AA,-10,'准备现金'),colorlired;
买入股票: STICKLINE(EMA(V111,3)<=13 AND V121>13,0,50,5,0),LINETHICK3,colorred;
BB:= (EMA(V111,3)<=13 AND V121>13) AND FILTER((EMA(V111,3)<=13 AND V121>13),10);
DRAWTEXT (BB,60,'主力进'),colorwhite;
卖临界: STICKLINE(EMA(V111,3)>60 AND EMA(V111,3)>REF(EMA(V111,3),1),100,95,15,1),COLORGREEN;//http://www.cxh99.com
CC:=(EMA(V111,3)>=90 AND V121) AND FILTER((EMA(V111,3)>=90 AND V121),10);
DD:=(EMA(V111,3)>=120 AND V121) AND FILTER((EMA(V111,3)>=120 AND V121),10);
STICKLINE(IF(VB>=0,VB,0) AND EMA(V111,3)<13,0,15,5,0),colorlired;
STICKLINE(IF(VB<=0,VB,0) AND EMA(V111,3)>90,0,10,10,0),COLORGREEN;//http://www.cxh99.com
STICKLINE( IF(V4>=0,V4,1) AND EMA(V111,3)<13,0,15,5,0),colorlired;
STICKLINE(IF(V4<=0,V4,1) AND EMA(V111,3)>90,0,10,10,0),colorliblue,LINETHICK1;
DRAWTEXT (CC,20,'主力减仓'),colorliblue;
V10:=PEAKBARS(3,15,1)<10;
V12:=IF(V10=1,50,0);
头部:= IF(V12=50,100,0);
卖:IF(IF(V12=50,100,0)>REF(IF(V12=50,100,0),1),40,0),colorgreen,LINETHICK3;
DRAWTEXT(卖,50,'主力清仓 '),COLORGREEN;//http://www.cxh99.com
V92:=TROUGHBARS(3,15,1)<10; V11:=IF(V92=1,50,0);
底部:= IF(V11=50,50,0);
买:IF( 底部>REF(底部,1),40,0),colorred,LINETHICK4;
DRAWTEXT(买,50,'主力抄底 '),colorred;
V7:=TROUGHBARS(3,15,1)<10; V9:=IF(V7=1,50,0);
AA1:=(O+H+L+C)/4;
BB1:=MA(AA1,3);
CC1:=SUM(IF(AA>REF(AA,1),AA*VOL,0),4)/SUM(IF(AA<REF(AA,1),AA*VOL,0),4);
DD1:=REF(100-(100/(1+CC)),1);
A1:=HHV(AA,10);
A2:=LLV(AA,30);
A3:=A1-A2;
A4:=EMA((AA-A2)/A3,1)*100;
B1:=HHV(AA,16);
B2:=LLV(AA,90);
B3:=B1-B2;
B4:=EMA((AA-B2)/B3,1)*100;
C1:=HHV(AA,30);
C2:=LLV(AA,240);
C3:=C1-C2;
C4:=EMA((AA-C2)/C3,1)*100;
中线趋势:B4,colormagenta,LINETHICK2;
STICKLINE(A4>90 AND B4>70,86,94,6,0),coloryellow;
DRAWTEXT((A4>90 AND B4>70)=1, 85,'拉'),coloryellow;
D:=CROSS(ZIG(3,50/5)*1,MA(ZIG(3,50/5)*1,2))*1,colorred;
W:=CROSS(MA(ZIG(3,50/5)*1,2),ZIG(3,50/5)*1)*1,colorblue;
CXH1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
CXH2:=LLV(LOW,34);
CXH3:=HHV(HIGH,34);
多: EMA((CXH1-CXH2)/(CXH3-CXH2)*100,13),colorred,LINETHICK2;
空: EMA(多,3),colorgreen,LINETHICK1;
DRAWTEXT(W=1,多*-0.1,'▼下跌确立' ),COLORGREEN;//http://www.cxh99.com
DRAWTEXT(D=1,多*-0.31,'▲上涨确立'),colorred;
爆发线: 80,colorred;//www.cxh99.com
CXH12:=(HIGH+LOW+CLOSE)/3;
CXH13:=(CXH12-MA(CXH12,14))/(0.015*AVEDEV(CXH12,14));
CXH14:=(CXH12-MA(CXH12,70))/(0.015*AVEDEV(CXH12,70));
CXH15:=IF(CXH13>=150 AND CXH13<200 AND CXH14>=150 AND CXH14<200,10,0);
CXH16:=IF(CXH13<=-150 AND CXH13>-200 AND CXH14<=-150 AND CXH14>-200,-10,CXH15);
CXH17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
CXH18:=100-ABS(CXH17);
CXH19:=IF(CXH18<90,CXH18,100);
CXH1A:=IF(CXHE>0,CXHE,0);
CXH1B:=IF(CXH14>=200 AND CXH13>=150,15,IF(CXH14<=-200 AND CXH13<=-150,-15,CXH16))+60;
CXH1C:=CXH1A>48 AND CXH1B>60 AND CXH19<100;
DRAWTEXT(CXH1C AND COUNT(CXH1C,30)=1,60,'大资金出货'),LINETHICK1,COLORFFCC66;
STICKLINE(CXH1C AND COUNT(CXH1C,30)=1,0,50,5,0),COLORFFCC66,LINETHICK3;
 

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容