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

主力抄底指标 公式 源码[同花顺公式]

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

 

总体编程思路和操作建议
指标计算和数据处理:
 
确保所有指标的计算逻辑正确并有效地处理异常情况。
用适当的方法处理数据的缺失或异常值,例如使用MA、EMA、SMA等平均函数来平滑数据。
条件判断和信号发生:
 
根据具体的交易策略,设置好买入和卖出的条件。
考虑指标之间的关系和权重,以及市场趋势的判断。
可视化和输出:
 
使用绘图函数(如STICKLINE、DRAWTEXT)将交易信号和市场状态可视化,便于交易员或算法理解和执行

 

源码:

 

CXH2:=1/WINNER(CLOSE);
CXH3:=MA(CLOSE,13);
CXH4:=100-ABS((CLOSE-CXH3)/CXH3*100);
CXH5:=LLV(LOW,75);
CXH6:=HHV(HIGH,75);
CXH7:=(CXH6-CXH5)/100;
CXH8:=SMA((CLOSE-CXH5)/CXH7,20,1);
CXH9:=SMA((OPEN-CXH5)/CXH7,20,1);
CXHA:=3*CXH8-2*SMA(CXH8,15,1);
CXHB:=3*CXH9-2*SMA(CXH9,15,1);
CXHC:=100-CXHB;
主力仓位: (100-CXHA),colorred,LINETHICK3;
CXHE:=REF(LOW,1)*0.9;
CXHF:=LOW*0.9;
CXH10:=(CXHF*VOL+CXHE*(CAPITAL-VOL))/CAPITAL;
CXH11:=EMA(CXH10,30);
CXH12:=CLOSE-REF(CLOSE,1);
CXH13:=MAX(CXH12,0);
CXH14:=ABS(CXH12);
CXH15:=SMA(CXH13,7,1)/SMA(CXH14,7,1)*100;
CXH16:=SMA(CXH13,13,1)/SMA(CXH14,13,1)*100;
CXH17:=BARSCOUNT(CLOSE);
CXH18:=SMA(MAX(CXH12,0),6,1)/SMA(ABS(CXH12),6,1)*100;
CXH19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
CXH1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
CXH1B:=SMA((SMA(CXH1A,4,1)-50)*2,3,1);
CXH1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
CXH1D:=SMA(CXH1C,4,1);//www.cxh99.com
CXH1E:=SMA(CXH1D,3,1);
CXH1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
CXH20:=CXH18<=25 AND CXH19<-95 AND CXH1F>20 AND CXH1B<-30 AND CXH1E<30 AND CXH11-CLOSE>=-0.25 AND CXH15<22 AND CXH16<28 AND CXH17>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,5,0),LINETHICK5,colorred;
DRAWTEXT(CROSS(CXH20,0.5) AND COUNT(CXH20=1,10)=1,95,'主力建仓!'),LINETHICK7 , colorred;
筹码集中:100*(1-WINNER(CLOSE)),colorligray,LINETHICK2;
天堂:100,colorblue;
V6:=CLOSE/REF(CLOSE,3)>=1.1;
V7:=BACKSET(V6,3);
买:IF((V7 AND COUNT(V7,3)=1),50,0),colormagenta,LINETHICK2;
DRAWTEXT(买,50,'买 '),colormagenta;
V10:=PEAKBARS(3,15,1)<10; V12:=IF(V10=1,50,0);
头部:= IF(V12=50,100,0);
卖:IF(头部>REF(头部,1),50,0),colorgreen,LINETHICK2;DRAWTEXT(卖,50,'高顶出货 '),COLORGREEN;//http://www.cxh99.com
V9:=TROUGHBARS(3,15,1)<10; V11:=IF(V9=1,50,0);
底部:= IF(V11=50,50,0);
买:IF( 底部>REF(底部,1),40,0),coloryellow,LINETHICK3; DRAWTEXT(买,40,'主力抄底 '),coloryellow;
V7:=TROUGHBARS(3,15,1)<10; V9:=IF(V7=1,50,0);
机构拉升筹码:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),colorlimagenta,LINETHICK2;
B:=ZIG(3,50/5)*1;
G:=MA(B,2);
D:=CROSS(B,G)*10;
W:=CROSS(G,B)*10;
DRAWTEXT(W=10,0.1,'↓跌势确立' ),colorgreen,;
DRAWTEXT(D=10,0.1,'▲涨势确立'),coloryellow;
CXH2:=REF(LOW,1);CXH3:=SMA(ABS(LOW-CXH2),3,1)/SMA(MAX(LOW-CXH2,0),3,1)*100;
CXH4:=EMA(IF(CLOSE*1.3,CXH3*10,CXH3/10),3);
CXH5:=LLV(LOW,30);
CXH6:=HHV(CXH4,30);
CXH7:=IF(MA(CLOSE,58),1,0);
CXH8:=EMA(IF(LOW<=CXH5,(CXH4+CXH6*2)/2,0),3)/618*CXH7;
CXH9:=IF(CXH8>100,100,CXH8);
STICKLINE(CXH9>-150,0,CXH9,3,0), colorff00ff;
底部吸筹指标: (CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100, color00ff00;
STICKLINE(CROSS(底部吸筹指标,-24),100,0,6,0), colorffffff;
先知: (CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100, colorff00ff;
可能放量拉升: IF(CROSS(底部吸筹指标,-24),1,0), colorffffff;
短线获利:STICKLINE(REF("KDJ.J",1)<0 AND "KDJ.J">0,60,0,2,0),color0000ff;
强弱分界线:50;

 

 

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

 

 

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

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

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

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

 


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

相关文章

    没有相关内容