您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

世事如棋[其他软件公式]

相关标签:

 

都是从网收集来的指标,我放在一起啦,方便看。信号较多,可靠程序自已参照历史分析吧,不同个股的准确度是不一样的,因为主力操作手法不一样的。
股市变幻不定,主力也要跟大势,大家也有跟大势操作。
安全点操作,就是MA18变绿时操作。
有什么建议可说出控讨一下,以便修改,因为在大智慧中运行太慢,不建议在大智慧中使用。
参数较多,自已看图添加吧。共七个参数。

公式取名:世事如棋
以下源码是一个公式,不要分开,不想输参数把这个放在第一行试下:
input:N1(30,1,100),N2(3,1,100),P1(15,1,100),P2(3,1,100),Long(26,1,100),Short(12,1,100),M(9,1,100),N(5,1,10);

上百人看了,只有一个回贴的,可能大家不喜欢这类公式吧。
===========================================================================================
CXHiable:a1=0;

{MA5:MA(C,5),COLORYELLOW;}
MA10:=MA(CLOSE,10);
MA18:MA(CLOSE,18),COLORGREEN;{http://www.cxh99.com}
IF(MA10>MA18,MA10,MA18),COLORRED;

{薛斯通道}
薛斯长顶: MA(HIGH,n1)*(1+p1/100),colorwhite;
薛斯短顶: MA(HIGH,n2)*(1+p2/100),coloryellow;
薛斯短底: MA(LOW,n2)*(1-p2/100),colorff00ff;
薛斯长底: MA(LOW,n1)*(1-p1/100),colorFF9933;

{机构MACD买卖}
{需要参数Long:26,20,100 Short:12,5,40 M:9,2,60}
DIFF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIFF,M);
MACD2:=2*(DIFF-DEA);
DU0:=CROSS(DIFF,0);
UD0:=CROSS(0,DIFF);
TDU0:=BARSLAST(DU0);
TUD0:=BARSLAST(UD0);
DU3:=REF(DU0,1);
UD3:=REF(UD0,1);
TDU3:=BARSLAST(DU3);
TUD3:=BARSLAST(UD3);
UDGLINE:=IF(TDU3<TUD3,REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3));
JDU0:=REF(CLOSE,1)<=REF(UDGLINE,1) AND CLOSE>UDGLINE AND TDU0<TUD0;
JUD0:=REF(CLOSE,1)>=REF(UDGLINE,1) AND CLOSE<UDGLINE AND TUD0<TDU0;
JDU1:=JDU0 AND COUNT(JDU0,TDU0)=1;
JUD1:=JUD0 AND COUNT(JUD0,TUD0)=1;
JDU2:=JDU1 AND REF(BARSLAST(JUD1),1)<REF(BARSLAST(JDU1),1);
JUD2:=JUD1 AND REF(BARSLAST(JUD1),1)>REF(BARSLAST(JDU1),1);
JDU3:=JDU1 AND REF(BARSLAST(JUD1),1)>REF(BARSLAST(JDU1),1);
JUD3:=JUD1 AND REF(BARSLAST(JUD1),1)<REF(BARSLAST(JDU1),1);
{BSLINE:=IF(BARSLAST(JDU2)<BARSLAST(JUD2),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));}
DEFUT:=BARSLAST(CROSS(MACD2,0));
DEFDT:=BARSLAST(CROSS(0,MACD2));
DEFUL:=IF(MACD2>=0,HHV(MACD2,DEFUT+1),REF(HHV(MACD2,DEFUT+1),DEFDT+1));
DEFDL:=IF(MACD2<0,LLV(MACD2,DEFDT+1),REF(LLV(MACD2,DEFDT+1),DEFUT+1));
DEFU2L:=REF(DEFUL,DEFUT+1);
DEFD2L:=REF(DEFDL,DEFDT+1);
DRAWTEXT(LLV(MACD2,4)>0 AND MACD2<REF(MACD2,1) AND REF(MACD2,1)>REF(MACD2,2) AND REF(MACD2,2)>REF(MACD2,3),HIGH*1.04,'机构卖'),COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(HHV(MACD2,4)<0 AND MACD2>REF(MACD2,1) AND REF(MACD2,1)<REF(MACD2,2) AND REF(MACD2,2)<REF(MACD2,3),LOW*0.98,'机构买'),color0033CC;
DRAWTEXT((JUD1 OR BARSLAST(JDU1)>BARSLAST(JUD1)) AND MACD2>=0 AND REF(MACD2,1)<REF(DEFU2L,1) AND MACD2>DEFU2L,HIGH*1.04,'关注卖'),colorFFFF33;
DRAWTEXT((JDU1 OR BARSLAST(JDU1)<BARSLAST(JUD1)) AND MACD2<0 AND REF(MACD2,1)>REF(DEFD2L,1) AND MACD2<DEFD2L,LOW*0.98,'关注买'),color66cccc;

{创幻搜牛-主图}
生命线:=WMA(WMA((3*CLOSE+LOW+OPEN+HIGH)/6,18),1);
CXH1:=(OPEN+CLOSE+LOW+HIGH)/4;
分水岭:= WMA(3*CXH1-2*WMA(CXH1,38),18);
CXH2:=IF(CXH1<分水岭,CXH1,分水岭);
CXH3:=2*WMA(LLV(CXH1,18),18)-CXH1;
搜牛:=3*CXH3-2*DMA(CXH3,10)+0.05*9;
DRAWTEXT(CROSS(生命线,搜牛),LOW*0.84,'牛起'),colorred;
CYC5:=0.01*EMA(AMOUNT,P1)/EMA(VOL,P1);
maxcyc:=dma((c+o)/2,v/capital);
c1:=INTPART(CYC5*100*0.96)/100;
a2:=INTPART(REF(CYC5,1)*100)/100;
a3:=INTPART(REF(CYC5,1)*0.96*100)/100;
vv:=INTPART(MIN(CAPITAL*0.05,REF(MA(VOL,34),1))/100);
a40:=INTPART(maxcyc*100)/100;
a41:=INTPART(REF(MAXCYC,1)*100)/100;
a4:=a1=0 and CLOSE>a2 or (REF(VOL/100,1)<vv and CLOSE>INTPART(a2*0.98*100)/100 and VOL>MIN(CAPITAL*0.05,REF(MA(VOL,34),1)));
a5:=a1=1 and CLOSE<MIN(a3,a41);
a1:=IF(a4=1,1,IF(a5=1,0,REF(a1,1)));
DRAWTEXT(CROSS(a1,0),LOW*0.94,'B'),coloryellow;
DRAWTEXT(CROSS(1,a1),HIGH*1.06,'S'),COLORGREEN;{http://www.cxh99.com}
{DRAWFLAGTEXT(a1=0 and (c1*0.98-CLOSE)/CLOSE>0.1,CLOSE,'持币');
DRAWFLAGTEXT(a1=0 and (c1*0.98-CLOSE)/CLOSE<=0.1 and REF(VOL/100,1)<vv,CLOSE,'明日收盘价超过'+str(c1)+';或收盘价超过'+str(INTPART(c1*0.98*100)/100)+'且成交量大于'+str(vv)+'买入');
DRAWFLAGTEXT(a1=0 and (c1*0.98-CLOSE)/CLOSE<=0.1 and REF(VOL/100,1)>=vv,CLOSE,'明日收盘价超过'+str(c1)+'买入');
DRAWFLAGTEXT(a1=1 and (CLOSE-MIN(c1,a40))/MIN(c1,a40)>0.1 ,CLOSE,'持股');
DRAWFLAGTEXT(a1=1 and (CLOSE-MIN(c1,a40))/MIN(c1,a40)<=0.1 ,CLOSE,'明日收盘价跌破'+str(MIN(c1,a40))+'卖出');
}
{创幻雷达顶点}
RSV1:=(HHV(HIGH,9.8)-CLOSE)/(HHV(HIGH,9.8)-LLV(LOW,9.8))*101;
KK:=SMA(RSV1,3,1);
DD:=SMA(KK,3,1);
JJ:=3*KK-2*DD;
XW1:=IF(JJ>=100,100,IF(JJ<=0,0,JJ));
DRAWTEXT(REF(XW1,1)=0 AND XW1>0,HIGH*1.08,'见顶'),COLORGREEN;{http://www.cxh99.com}

{操盘铁律-采用低进和逃命和上穿买入和买入和买入时机和卖出和止损价位}
LC:=REF(CLOSE,1);
{DRAWTEXTABS(10,8,'止损价位:'+(LC*1.0035*97+0.2)/99.65),ColorAFFF00;}
滤网:=CLOSE>REF(HIGH,1) and CLOSE>OPEN;
RSI5:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
R:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
A:=SMA(R,3,1);
B:=SMA(A,3,1);
CCC:=(B/2+40)*1.1;
D:=SMA(CCC,3,1);
DRAWTEXT(CROSS(80,RSI5),HIGH*1.1,'逃命'),COLORGREEN;{http://www.cxh99.com}
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
DRAWTEXT(CROSS(cci,-100) and 滤网,LOW*0.92,'上穿买入'),colorwhite;
DRAWTEXT(CROSS(Cci,-150),LOW*0.96,'时机'),COLORred;
C2:=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));
DRAWTEXT(CROSS(C2,-70),LOW*0.88,'牛启动'),COLORGREEN;{http://www.cxh99.com}
DRAWTEXT(CROSS(100,cci) and CLOSE<REF(LOW,1),HIGH*1.14,'卖出'),COLORGREEN;{http://www.cxh99.com}
AA:=REF(cci,14)=HHV(cci,2*14+1);
CXH6:=4*SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1),3,1);
CXH7:=8;
DRAWTEXT(CROSS(CXH6,CXH7),LOW*0.9,'买入信号'),COLORGREEN;{http://www.cxh99.com}
RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X AND J<19,LOW*0.86,'低进'),COLORFFFF00;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX(CLOSE - LC,0),4.1,1))/(SMA(ABS(CLOSE - LC),4.1,1)))*(100);
DRAWTEXT(CROSS(RSI,11),LOW*0.84,'底部反转'),COLORGREEN;{http://www.cxh99.com}

CXH11:=(close-LLV(low,27))/(HHV(high,27)-LLV(low,27))*100;
CXH12:=SMA(CXH11,3,1);
CXH13:=SMA(CXH12,3,1);
CXH14:=SMA(CXH13,3,1);
箱顶:=MA(REF(HHV(close,30),1),2);
DRAWTEXT(CROSS(CXH14,CXH13) AND CXH14>75 ,箱顶*1.12,'减仓'),COLORf0f000;

 

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

 

 

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

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

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

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

 


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

相关文章

    没有相关内容