您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信公式>>正文内容

不被套均线主图指标公式源码[通达信公式]

一个技术指标的公式,主要用于衡量股票价格的趋势和波动情况,从而帮助投资者预测未来的市场走势。

具体的操作建议,应该是在股票价格显示出上涨趋势时进行买入操作,而在价格开始下跌时进行卖出,避免损失。此外,该指标还可以用于判断股票价格是否处于合理水平,从而帮助投资者做出更准确的决策。

 

BL_1:=5;BL_2:=13;BL_3:=34;BL_4:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));BL_5:=DYNAINFO(5)<0.01 OR DYNAINFO(6)<0.01;BL_6:=IF(BL_5,1,BL_4<DYNAINFO(5)+0.01 AND BL_4>DYNAINFO(6)-0.01);BL_7:=IF(BL_6,DMA(AMOUNT/(100*V),100*V/FINANCE(7)),EMA((H+L+C)/3,120));BL_8:=EVERY(BL_7>REF(BL_7,1),1);BL_9:=IF(BL_8,BL_7,DRAWNULL);区一:STICKLINE(EVERY(EMA(SLOPE(C,15)*20+C,30)>REF(EMA(SLOPE(C,15)*20+C,30),1),1) AND EVERY(MA(10000*C/INDEXC,10)>REF(MA(10000*C/INDEXC,10),1),1) AND EVERY(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30)>REF(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30),1),1),REFDATE(HHV(H,(-5)),DATE),REFDATE(LLV(L,(-5)),DATE),6,0),COLOR001030;区二:STICKLINE(EVERY(XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1>REF(XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,1),1) AND COST(EMA(SLOPE(C,15)*20+C,30))>=REF(COST(EMA(SLOPE(C,15)*20+C,30)),1) AND COST(20)>=REF(COST(20),1) AND EVERY(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30)>REF(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30),1),1) AND V/MA(V,55)*100>50 AND EVERY(EMA(EMA(C,12)-EMA(C,26),9)>REF(EMA(EMA(C,12)-EMA(C,26),9),1),1),REFDATE(HHV(H,(-5)),DATE),REFDATE(LLV(L,(-5)),DATE),4,0),COLOR001040;区三:STICKLINE(EVERY(EMA(SLOPE(C,15)*20+C,30)>REF(EMA(SLOPE(C,15)*20+C,30),1),1) AND EVERY(MA(10000*C/INDEXC,10)>REF(MA(10000*C/INDEXC,10),1),1) AND EVERY(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30)>REF(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30),1),1) AND IF(MA(WINNER(C*0.9)*100*C,3)>10,MA(WINNER(C*0.9)*100*C,3),0)/2/8>0,REFDATE(HHV(H,(-5)),DATE),REFDATE(LLV(L,(-5)),DATE),4,0),COLOR001050;区四:STICKLINE(BL_9 AND EVERY(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30)>REF(EMA(SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),V,-V)/100),0),30),1),1) AND IF(MA(WINNER(C*0.9)*100*C,3)>10,MA(WINNER(C*0.9)*100*C,3),0)/2/8>0,REFDATE(HHV(H,(-5)),DATE),REFDATE(LLV(L,(-5)),DATE),4,0),COLOR001075;底仓5:COST(1),COLORWHITE,LINETHICK2;建仓10:COST(10),COLORBLUE,LINETHICK2;平衡30:COST(30),NODRAW,COLORMAGENTA,LINETHICK2;BL_10:=COST(40);BL_11:=COST(50);BL_12:=COST(60);BL_13:=COST(70);BL_14:=COST(80);BL_15:=COST(90);BL_16:=COST(99);DRAWKLINE(H,O,L,C);BL_17:=SUMBARS(V,CAPITAL*1);BL_18:=SUM(COST(10),BL_17)/BL_17;BL_19:=SUM(COST(20),BL_17)/BL_17;BL_20:=SUM(COST(30),BL_17)/BL_17;BL_21:=SUM(COST(40),BL_17)/BL_17;BL_22:=SUM(COST(50),BL_17)/BL_17;BL_23:=LLV(L,250)=L;BL_24:=BARSLAST(BL_23);庄家成本:(5*BL_18+4*BL_19+3*BL_20+2*BL_21+BL_22)/15,NODRAW,COLORRED;BL_25:=IF(BL_6,0.01*EMA(AMOUNT,BL_1)/EMA(V,BL_1),EMA((H+L+C)/3,BL_1));圴2:IF(BL_6,0.01*EMA(AMOUNT,BL_2)/EMA(V,BL_2),EMA((H+L+C)/3,BL_2)),NODRAW;圴3:IF(BL_6,0.01*EMA(AMOUNT,BL_3)/EMA(V,BL_3),EMA((H+L+C)/3,BL_3)),NODRAW;圴成本:IF(BL_6,DMA(AMOUNT/(100*V),100*V/FINANCE(7)),EMA((H+L+C)/3,120)),NODRAW;BL_26:=EVERY(圴成本>REF(圴成本,1),1);成本值:IF(BL_26,圴成本,DRAWNULL),COLORYELLOW,LINETHICK2;成本金叉:DRAWTEXT(CROSS(BL_25,圴成本) AND 成本值,圴成本-0.5,1),COLORYELLOW;上升均斜:EMA(SLOPE(C,20)*30+C,40),COLORBLUE;趋势:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,NODRAW,COLORRED,LINETHICK2;提高~1:STICKLINE(CROSS(C,庄家成本) AND BL_24>=40 AND EVERY(上升均斜>REF(上升均斜,1),M),L,C,4,0),COLORFF0080;BL_27:=EVERY(庄家成本>=REF(庄家成本,1),M);BL_28:=REF(LLV(L,150),3);BL_29:=REFDATE(BL_28,DATE)*0.9;BL_30:=(-100)*(HHV(H,10)-C)/(HHV(H,10)-LLV(L,10))+100;BL_31:=(-100)*(HHV(H,6)-C)/(HHV(H,6)-LLV(L,6))+100;BL_32:=BL_30>=REF(BL_30,1);BL_33:=BL_30<REF(BL_30,1);BL_34:=BL_31>=REF(BL_31,1);BL_35:=BL_31<REF(BL_31,1);BL_36:=BL_31>=80 AND BL_34;BL_37:=V/((H-L)*2-ABS(C-O));BL_38:=IF(C>O,BL_37*(H-L),IF(C<O,BL_37*(H-O+(C-L)),V/2));BL_39:=BL_38/V*100;BL_40:=BL_39>=REF(BL_39,1);BL_41:=BL_39/50;BL_42:=BL_39>=80 AND BL_40 AND BL_41>=1.5 AND REF(BL_39,1)<=90;BL_43:=EMA(SLOPE(C,22)*20+C,55);BL_44:=BL_43-(EMA(C,1)-BL_43);BL_45:=BL_43-(EMA(C,3)-BL_43);BL_46:=REF(BL_44,1)/BL_44;BL_47:=IF(BL_46>1,BL_46,1);BL_48:=BL_47/REF(BL_47,1);BL_49:=BL_47>=REF(BL_47,1) AND BL_47>=1.02 AND BL_43>=BL_44;BL_50:=WINNER(C*1.1)-WINNER(C*0.9);BL_51:=WINNER(C);BL_52:=BL_51/BL_50;BL_53:=BL_50<=REF(BL_50,1);BL_54:=REF(BL_50,1)/BL_50;BL_55:=BL_52>=2 AND BL_53 OR BL_54>=1.3;BL_56:=REF(C,1);BL_57:=BL_56*1.1>=COST(90);BL_58:=BL_36 AND BL_42 AND BL_49 AND BL_55 AND BL_57;BL_59:=(O-REF(C,1))/REF(C,1)*100<=5;BL_60:=(C-REF(C,1))/REF(C,1)*100;BL_61:=REF(BL_60,1);BL_62:=BL_59 AND BL_60>=6.2 AND BL_61<=6.5;BL_63:=BL_36 AND BL_42 AND BL_49 AND BL_55 AND BL_62;BL_64:=BL_36 AND BL_42 AND BL_49 AND BL_55 AND BL_59 AND BL_61<=6.5;BL_65:=BL_51>=BL_50;BL_66:=IF(BL_65,BL_43*0.96,BL_43);界线:BL_43,COLORGREEN,LINETHICK2;界:IF(BL_43>=REF(BL_43,1),BL_43,DRAWNULL),COLORRED,LINETHICK3;DRAWTEXT(FILTER(界>1 AND EMA(界线,15)>REF(EMA(界线,8),1),10),界,2),COLORWHITE;DRAWTEXT(BL_58 AND BL_64,L*0.946,3),COLORWHITE;DRAWTEXT(BL_63,L*0.91,4),COLORWHITE;BL_67:=C*V;BL_68:=EMA((EMA(BL_67,2)/EMA(V,2)+EMA(BL_67,4)/EMA(V,4)+EMA(BL_67,8)/EMA(V,8)+EMA(BL_67,16)/EMA(V,16))/4,15);BL_69:=1.05*BL_68;BL_70:=EMA(BL_69-(EMA(C,3)-BL_69),5);下开:IF(BL_70<=BL_69,BL_70,BL_69),COLORMAGENTA,LINETHICK2;BL_71:=2*BL_69-下开;上开:IF(BL_71>=BL_69,BL_71,BL_69),COLORYELLOW,LINETHICK2;观望:IF(下开=上开,下开,DRAWNULL),COLORGREEN,LINETHICK2;BL_72:=EVERY(观望>REF(观望,1),M);均值上:IF(BL_72,观望,DRAWNULL),COLORRED,LINETHICK2;BL_73:=REF(C,1)*1.1-C<0.01 AND H=C;

 

 

 

 

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

 

 

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

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

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

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

 


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

相关文章

    没有相关内容