您现在的位置:程序化交易>> 期货公式>> 文华财经>> 文华财经知识>>正文内容

[求助]:指标修改 [文华财经]

  • 咨询内容:  老师:叠加技术指标下列一和二时,K线不能完全叠加为一个K线(上下有错层),请将两个K线合二为一。谢谢!
    一、文华系统主图K线形态: DRAWCOLORKLINE(ISUP,COLORRED,M);//收盘价大于开盘价,绘制红色空心K线DRAWCOLORKLINE(ISDOWN,COLORCYAN,N);//收盘价小于开盘价,绘制青色实心K线DRAWCOLORKLINE(ISEQUAL,COLORWHITE,1);//收盘价等于开盘价,绘制白色十字线
    二、  DRAWCOLORKLINE(ISUP,COLORRED,0);//收盘价大于开盘价,绘制红色空心K线DRAWCOLORKLINE(ISDOWN,COLORCYAN,1);//收盘价小于开盘价,绘制青色实心K线DRAWCOLORKLINE(ISEQUAL,COLORWHITE,1);//收盘价等于开盘价,绘制白色十字线 MA5:=MA(C,5),COLORF00FF0;MA10:=MA(C,10);MA20:=MA(C,20);MA60:=MA(C,60),COLORGREEN;买线:=ZIGZAG(C,1,1);卖线:=MA(买线,3);CAPITAL:=GETPRICE1('通股本'; 换手:=V/CAPITAL*100;基线:=MA(REF(LLV(C,30),1),2),NODRAW;AMOUNT:=AVPRICE*V;量能饱和度:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100),NODRAW;MA8:=MA(C,8),COLORYELLOW;MA13:=MA(C,13),COLORE66878;MA50:=MA(C,50),COLORWHITE;MA55:=MA(C,55),COLORGREEN;MA144:=MA(C,144),COLORBLUE;X1:=(C+L+H)/3;X2:=EMA(X1,6);X3:=EMA(X2,5);VARF1:=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);VAR101:=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);VAR111:=VARF1<REF(VAR101,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);游资:=(VAR111 AND COUNT(VAR111,30)=1 AND 买线>=卖线);//DRAWTEXT(游资,(基线*0.97),'-游资进',COLORBLUE;//STICKLINE(游资,(基线*0.96),(基线+0.2),9,0),COLORBLUE;VARS1:=(C-LLV(L,36))/(HHV(H,36)-LLV(L,36))*100;VARS2:=SMA(VARS1,3,1);VARS3:=SMA(VARS2,3,1);VARS4:=SMA(VARS3,3,1);抄底:=((FILTER((CROSS(VARS3,VARS4) AND VARS3<20),10)=1) AND 买线>=卖线);//DRAWTEXT(抄底,(基线*0.94),'-抄底',COLORFF00FF;//STICKLINE(抄底,(基线*0.92),基线,9,0),COLORFF00FF;YY:=(CROSS(X2,X3) AND (买线>=卖线));F:=100*(C-REF(C,1))/REF(C,1);S1:=IF(C<REF(O,1) AND F<0,1,0);S2:=IF(C<REF(O,2) AND F<0,1,0);短买点:=((CROSS((SMA(MAX(C-(REF(C,1)),0),4.1,1)/SMA(ABS(C-(REF(C,1))),4.1,1)*100),11)*1) AND S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND 换手>=3 AND 买线>=卖线);VAR5:=(3*(SMA(SMA(((C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100),3,1),3,1)/28.57)-2*(EMA((SMA(SMA(((C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100),3,1),3,1)/28.57),5)));奔牛:=(CROSS(VAR5,(SMA(SMA(((C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100),3,1),3,1)/28.57)) AND 买线>=卖线);VARQ1:=EMA(CLOSE,3);VARQ2:=EMA(CLOSE,21);VARQ3:=BARSLAST(CROSS(VARQ2,VARQ1))>15;VARQ4:=VOL>MA(VOL,5)*2 AND VOL<MA(VOL,5)*5;黑马:=((CROSS(VARQ1,VARQ2) AND VARQ4 AND VARQ3) AND 买线>=卖线);波段买点:=CROSS((ZIGZAG(C,10,1)),(MA((ZIGZAG(C,10,1)),3)));

    //STICKLINE1(波段买点,(基线*0.96),基线,9,0),COLORRED;VARDD:=(ZIGZAG(C,5,1)<REF(ZIGZAG(C,5,1),1)) AND (REF(ZIGZAG(C,5,1),1)>=REF(ZIGZAG(C,5,1),2)) AND (REF(ZIGZAG(C,5,1),2)>=REF(ZIGZAG(C,5,1),3));

    //STICKLINE1((VARDD=1),(H*1.01),(H*1.03),9,0),COLORWHITE;大黑马:=(IF(CROSS((MA(3*SMA(((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100,6,1)-2*SMA(SMA(((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100,5,1),5,1),2)),0) AND EMA(3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),5)<40,8,0) AND 买线>=卖线);DRAWTEXT(大黑马,(基线*0.94),'大黑马',COLORBLUE;短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6) +13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+REF(H,20))/210,COLORBLUE,LINETHICK1;短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+REF(L,20))/210,COLORBLUE,LINETHICK1;D90H:=EMA(短高H,90),COLORYELLOW,LINETHICK1;D90L:=EMA(短低L,90),COLORYELLOW,LINETHICK1;D90差:=D90H-D90L;D90顶:=D90H+D90差*2,COLORYELLOW,LINETHICK1;D90底:=D90L-D90差*2,COLORYELLOW,LINETHICK1;XH25:=REFX1(MA(H,25),25/2);XXH25:=REFX1(MA(XH25,25),25/2);XL25:=REFX1(MA(L,25),25/2);XXL25:=REFX1(MA(XL25,25),25/2);高0:=(XXH25-XXL25+XXH25),LINETHICK1,COLORWHITE;低0:=XXL25*2-XXH25,LINETHICK1,COLORWHITE;多头定位:=低0>=D90底 AND 高0>=D90顶;空头定位:=高0<=D90顶 AND 低0<=D90底;震荡定位:=低0>=D90底 AND 高0<=D90顶;XH60:=REFX1(MA(H,60),60/2);XXH60:=REFX1(MA(XH60,60),60/2);XL60:=REFX1(MA(L,60),60/2);XXL60:=REFX1(MA(XL60,60),60/2);波段顶0:=4*XXH60-3*XXL60,LINETHICK2,COLORWHITE;波段底0:=4*XXL60-3*XXH60,LINETHICK2,COLORWHITE;多止损:XXL25-(XXH25-XXL25)*3.5,DOT,COLORWHITE;多止盈:(XXH25-XXL25)*1+XXH25,NODRAW,COLORWHITE;空止损:(XXH25-XXL25)*3.5+XXH25,DOT,COLORYELLOW;空止盈:XXL25-(XXH25-XXL25)*0.5,NODRAW,COLORGREEN;做空:(XXH25-XXL25)*1+XXH25,LINETHICK1,COLORGREEN,DOT;做多:XXL25-(XXH25-XXL25)*1,LINETHICK1,COLORRED,DOT;空损:=(XXH25-XXL25)*3.9+XXH25,LINETHICK1,COLORYELLOW;多损:=XXL25-(XXH25-XXL25)*3.9,LINETHICK1,COLORYELLOW;波段顶:=(XXH60-XXL60)*3+XXH60,LINETHICK1,COLORYELLOW;波段底:=XXL60-(XXH60-XXL60)*3,LINETHICK1,COLORWHITE;止盈差:多止盈-空止盈,NODRAW;/*DRAWTEXT(ISLASTBAR,做空,'',COLORGREEN,FONTSIZE25,ALIGN0;DRAWTEXT(ISLASTBAR,做多,'',COLORRED,FONTSIZE25,ALIGN0;DRAWTEXT(ISLASTBAR,空损,'',COLORYELLOW,FONTSIZE25,ALIGN0;DRAWTEXT(ISLASTBAR,多损,'',COLORWHITE,FONTSIZE25,ALIGN0;*/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;今D:=EMA(D,3);昨D:=REF(今D,1);白色点多定位1:=L<做多 AND H>做多;白色点空定位1:=H>做空 AND L<做空;白色点多定位2:=H<做多;白色点空定位2:=L>做空;多头红色点:=今D>昨D;空头红色点:=今D<昨D;多头红色点定位1:=白色点多定位1=1 AND 多头红色点=1;多头红色点定位2:=白色点多定位2=1 AND 多头红色点=1;空头红色点定位2:=白色点空定位2=1 AND 空头红色点=1;空头红色点定位1:=白色点空定位1=1 AND 空头红色点=1;多头多定位:=CROSS(做多,L) AND 多头定位=1;多头平定位:=CROSS(H,做空) AND 多头定位=1 AND 震荡定位=0;空头空定位:=CROSS(H,做空) AND 空头定位=1;空头平定位:=CROSS(做多,L) AND 空头定位=1 AND 震荡定位=0;震荡多定位:=CROSS(做多,L) AND 震荡定位=1;震荡空定位:=CROSS(H,做空) AND 震荡定位=1;DRAWICON(多头多定位=1 OR 震荡多定位=1,多损,'CO116';DRAWICON(空头空定位=1 OR 震荡空定位=1,空损,'CO117';  



    G:=MA5;DY:=MA10;NNH:=BARSLAST(H=HHV(H,15)) ,NODRAW;NNL:=BARSLAST(L=LLV(L,15)) ,NODRAW;NN:=IF(REF(G,NNH)>REF(DY,NNH) AND NNH<=12,NNH,IF(REF(G,NNL)<REF(DY,NNL) AND NNL<=12,NNL,13)) ,NODRAW;YN:=IF(ISLASTBAR AND NN>0,NN,13) ,NODRAW;HHY:=REF(H,YN)=HHV(H,14);LLY:=REF(L,YN)=LLV(L,14);FG01:=BACKSET(HHY,YN+1)>BACKSET(HHY,YN),NODRAW;//只设置前面第6个FD01:=BACKSET(LLY,YN+1)>BACKSET(LLY,YN) ,NODRAW;FG02:=FG01=FD01 AND G>DY,NODRAW;FD02:=FG01=FD01 AND G<DY,NODRAW;TTTT:=BARSLAST(FD01),NODRAW;FG0:=FG01 AND IF(FG02=1,H=HHV(H,BARSLAST(REF(FD01,1))+1),H=HHV(H,IF(BARSLAST(L=LLV(L,7))>=5,5,BARSLAST(FD01)))) AND FD02=0 ,NODRAW;FD0:=FD01 AND IF(FD02=1,L=LLV(L,BARSLAST(REF(FG01,1))+1),L=LLV(L,IF(BARSLAST(H=HHV(L,7))>=5,5,BARSLAST(FG01)))) AND FG02=0 ,NODRAW;GT:=BARSLAST(FG0),NODRAW;DT:=BARSLAST(FD0),NODRAW;LLLL:=DT=0 AND REF(DT,1)<GT AND L>REF(L,REF(DT,1)+1),NODRAW;FG1:=BACKSET(REFX(GT,1)=0 AND GT<DT AND REFX(H,1)>=REF(H,GT),GT+1),NODRAW;FD1:=BACKSET(REFX(DT,1)=0 AND DT<GT AND REFX(L,1)<=REF(L,DT),DT+1),NODRAW;FG11:=IF(GT=0 AND REF(GT,1)<DT AND IF(REF(G,BARSLAST(L=LLV(L,7)))>REF(DY,BARSLAST(L=LLV(L,7))),BARSLAST(L=LLV(L,7))<5,1) AND H<REF(H,REF(GT,1)+1),1,0),NODRAW;FD11:=IF(DT=0 AND REF(DT,1)<GT AND IF(REF(G,BARSLAST(H=HHV(H,7)))<REF(DY,BARSLAST(H=HHV(H,7))),BARSLAST(H=HHV(H,7))<5,1) AND L>REF(L,REF(DT,1)+1),1,0),NODRAW;GT1:=BARSLAST(FG11<>1 AND FG1<>1 AND FG0),NODRAW;DT1:=BARSLAST(FD11<>1 AND FD1<>1 AND FD0),NODRAW;FD2:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)>LLV(L,GT1+5),DT1+1),NODRAW;FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LLV(L,GT1+5) AND REF(H,GT1)>HHV(H,GT1+5),GT1+1),NODRAW;FG2B:=IF(GT1=0 AND DT1<4 AND REF(GT1,1)-DT1<4 AND REF(L,DT1)<=LLV(L,REF(GT1,1)+6) AND H>HHV(H,REF(GT1,1)+6),1,0),NODRAW;FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+5),GT1+1),NODRAW;FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+5) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;FD2B:=IF(DT1=0 AND GT1<4 AND REF(DT1,1)-GT1<4 AND REF(H,GT1)>=HHV(H,REF(DT1,1)+6) AND L>LLV(L,REF(DT1,1)+6),1,0),NODRAW;TTTTTT:= H<REF(H,REF(GT1,1)+1) AND DT1<4,NODRAW;HHHHHH:=REF(LLV(L,10),DT1),NODRAW;FG21:=IF(GT1=0 AND DT1<4 AND H<=REF(H,REF(GT1,1)+1) ,1,0),NODRAW;FD21:=IF(DT1=0 AND GT1<4 AND L>=REF(L,REF(DT1,1)+1) ,1,0),NODRAW;FD231:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND REF(L,DT1)>REF(LLV(L,10),DT1),DT1+1),NODRAW;FG23:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)>REF(H,GT1) AND (REF(H,GT1)<REF(HHV(H,13),GT1) OR REF(FD231,DT1)=0),GT1+1),NODRAW;FG231:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND REF(H,GT1)<REF(HHV(H,10),GT1) ,GT1+1),NODRAW;FD23:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)<REF(L,DT1) AND ( REF(L,DT1)>REF(LLV(L,13),DT1) OR REF(FG231,GT1)=0),DT1+1),NODRAW;FDD23:=REF(H,GT1)<REF(HHV(H,10),GT1) OR REF(FD23,DT1)=0,NODRAW;FD24:=BACKSET(REFX(GT1,1)=0 AND DT1>3 AND GT1>DT1 AND GT1-DT1<4 AND REFX(H,1)<HHV(H,GT1+3) AND REF(L,DT1)>LLV(L,DT1+5),DT1+1),NODRAW;FG24:=BACKSET(REFX(DT1,1)=0 AND GT1>3 AND DT1>GT1 AND DT1-GT1<4 AND REFX(L,1)>LLV(L,DT1+3) AND REF(H,GT1)<HHV(H,GT1+5),GT1+1),NODRAW;GT2:=BARSLAST(FG21<>1 AND FG23<>1 AND FG231<>1 AND FG24<>1  AND FG2<>1 AND FG2A<>1 AND FG2B<>1 AND GT1=0),NODRAW;DT2:=BARSLAST(FD21<>1 AND FD23<>1 AND FD231<>1 AND FD24<>1 AND FD2<>1 AND FD2A<>1 AND FD2B<>1 AND DT1=0),NODRAW;FG3:=BACKSET(REFX(GT2,1)=0 AND GT2<DT2 AND REFX(H,1)>=REF(H,GT2),GT2+1),NODRAW;FD3:=BACKSET(REFX(DT2,1)=0 AND DT2<GT2 AND REFX(L,1)<=REF(L,DT2),DT2+1),NODRAW;FG31:=IF(GT2=0 AND REF(GT2,1)<DT2 AND H<REF(H,REF(GT2,1)+1),1,0),NODRAW;FD31:=IF(DT2=0 AND REF(DT2,1)<GT2 AND L>REF(L,REF(DT2,1)+1),1,0),NODRAW;GT3:=BARSLAST(GT2=0 AND FG3<>1 AND FG31<>1 ),NODRAW;DT3:=BARSLAST(DT2=0 AND FD3<>1 AND FD31<>1),NODRAW;FG4:=BACKSET(REFX(GT3,1)=0 AND GT3<DT3 AND REFX(H,1)>=REF(H,GT3),GT3+1),NODRAW;FD4:=BACKSET(REFX(DT3,1)=0 AND DT3<GT3 AND REFX(L,1)<=REF(L,DT3),DT3+1),NODRAW;FG41:IF(GT3=0 AND REF(GT3,1)<DT3 AND H<REF(H,REF(GT3,1)+1),1,0),NODRAW;FD41:IF(DT3=0 AND REF(DT3,1)<GT3 AND L>REF(L,REF(DT3,1)+1),1,0),NODRAW;HHH:=GT3=0 AND FG31<>1 AND FG3<>1,NODRAW;LLL:=DT3=0 AND FD31<>1 AND FD3<>1,NODRAW;DX:=HHH||LLL;L1:=CROSS(BACKSET(ISLASTBAR,SUMBARS(DX,3)),0.5);L2:=CROSS(BACKSET(ISLASTBAR,SUMBARS(DX,2)),0.5);L3:=CROSS(BACKSET(ISLASTBAR,SUMBARS(DX,1)),0.5);PP:=IF(HHH,H,L);A1:=VALUEWHEN(L1,PP);A2:=VALUEWHEN(L2,PP);A3:=VALUEWHEN(L3,PP);AAA:=REFX1((A2-A1)*0.618+A3,1000);DRAWTEXT(HHH,H,'',COLORGREEN,FONTSIZE40;DRAWTEXT(LLL,L,'',VALIGN0,COLORYELLOW,FONTSIZE40;//DRAWCOLORKLINE(SUMBARS(HHH,1)<SUMBARS(LLL,1),COLORBLUE,0);//DRAWCOLORKLINE(SUMBARS(HHH,1)>SUMBARS(LLL,1),COLORRED,0);//DRAWCOLORKLINE(SUMBARS(HHH,1)>=1&&ISNULL(SUMBARS(LLL,1)),COLORBLUE,0);//DRAWCOLORKLINE(SUMBARS(LLL,1)>=1&&ISNULL(SUMBARS(HHH,1)),COLORRED,0);HHH,SOUND('';LLL,SOUND('';

     

     来源:程序化99

  • 文华技术人员: 第二个指标,您设置的属性错了,您设置成副图指标了,改成K线附属指标加载。

     

     来源: WWW.CXH99.COM

  • 文华客服:  老师:请教一下怎么进行K线附属指标加载。谢谢

     

  • 网友回复:  右上角菜单-》系统工具-》指标管理器,找到第二个指标,看下指标属性。



    文件名:12.jpg

 

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

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

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

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


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

相关文章

    没有相关内容