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

很简单的一个修改,请老师帮忙 [文华财经]

  • 咨询内容:  老师好,请帮我把途中的 价格改成实际价格, 不要四舍五入, 如图

    M:=5;//M值需要大于等于5 G:=MA(C,5);D:=MA(C,10);NNH:=BARSLAST(H=HHV(H,M)) ,NODRAW;NNL:=BARSLAST(L=LLV(L,M)) ,NODRAW;NNY:=IF(REF(G,NNH)>REF(D,NNH) AND NNH<=M-3,NNH,IF(REF(G,NNL)<REF(D,NNL) AND NNL<=M-3,NNL,M-2)) ,NODRAW;NNN:=IF(ISLASTBAR AND NNY>0,NNY,M-2) ,NODRAW;H1:=REF(H,NNN)=HHV(H,M-1);L1:=REF(L,NNN)=LLV(L,M-1);FG01:=BACKSET(H1,NNN+1)>BACKSET(H1,NNN),NODRAW;//只设置前面第M-1个FD01:=BACKSET(L1,NNN+1)>BACKSET(L1,NNN) ,NODRAW;FG02:=FG01=FD01 AND G>D,NODRAW;FD02:=FG01=FD01 AND G<D,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,M))>=M-2,M-2,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,M))>=M-2,M-2,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,M)))>REF(D,BARSLAST(L=LLV(L,M))),BARSLAST(L=LLV(L,M))<M-2,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,M)))<REF(D,BARSLAST(H=HHV(H,M))),BARSLAST(H=HHV(H,M))<M-2,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+M-2),DT1+1),NODRAW;FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LLV(L,GT1+M-2) AND REF(H,GT1)>HHV(H,GT1+M-2),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)+M-1) AND H>HHV(H,REF(GT1,1)+M-1),1,0),NODRAW;FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+M-2),GT1+1),NODRAW;FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+M-2) AND REF(L,DT1)>LLV(L,DT1+M-2),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)+M-1),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;//前短后长,去2;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;//前短后长,去3;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; 

    //最后一段画线N1:=BARSLAST(HHH)+1;NY2:=BARSLAST(LLL)+1;TJX1:=BARSLAST(HHH)+1>=5,NODRAW;TJX2:=BARSLAST(LLL)+1>=5,NODRAW; 

    HAC:=VALUEWHEN(HHH,H);LAC:=VALUEWHEN(LLL,L);TLC:=BARSLAST(LLL);THC:=BARSLAST(HHH);NNNC:=COUNT(HHH||LLL,BARPOS);AAAC:=MOD(NNNC,2); 

    //DRAWLINE1(HHH&&TJX2 ,H,LLL&&TJX1||ISLASTBAR,L,0),RGB(0,128,255),LINETHICK2;//分型线//DRAWLINE1(LLL&&TJX1,L,HHH&&TJX2||ISLASTBAR ,H,0),COLORMAGENTA,LINETHICK2;//分型线

    //DRAWNUMBER(ISLASTBAR&&BARSLAST(HHH&&TJX2)<BARSLAST(LLL&&TJX1),C,C,0,RGB(0,128,255)),FONTSIZE30,ALIGN0;//DRAWNUMBER(ISLASTBAR&&BARSLAST(HHH&&TJX2)>BARSLAST(LLL&&TJX1),C,C,0,COLORMAGENTA),FONTSIZE30,ALIGN0;
     
     

    HHR:=H>HV(H,BARSLAST(LLL)),NODRAW;DRAWSL((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR,H,0,1,0,RGB(0,128,255)),LINETHICK2;LLR:=L<LV(L,BARSLAST(HHH)),NODRAW;DRAWSL((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR,L,0,1,0,RGB(0,128,255)),LINETHICK2;

    HHPP1:=VALUEWHEN((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR,AVPRICE),COLORRED,LINETHICK2;HHPP2:=VALUEWHEN((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR,AVPRICE),COLORGREEN,LINETHICK2;

    //CROSS(BACKSET(LLL||ISLASTBAR,BARSLAST((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR)+1),0.5),ICON(1,'CO107';//B//CROSS(BACKSET(HHH||ISLASTBAR,BARSLAST((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR)+1),0.5),ICON(1,'CO106';//S//DRAWTEXT(CROSS(BACKSET(LLL||ISLASTBAR,BARSLAST((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR)+1),0.5),L,'',FONTSIZE30,COLORYELLOW;//B//DRAWTEXT(CROSS(BACKSET(HHH||ISLASTBAR,BARSLAST((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR)+1),0.5),L,'',FONTSIZE30,COLORYELLOW;//S
     

    SAR11:=SAR1(18,2,10),CIRCLEDOT;SAR2:=SAR11;

    //QSA:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;//QSA1:(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4,COLORBLUE,LINETHICK3,NOTEXT;

    //DRAWICON(C<ABS(SAR2) AND C<REF(C,1)*0.9995 ,QSA1,'CO11';//DRAWICON(C>ABS(SAR2) AND C>REF(C,1)*1.0005 ,QSA1,'CO12';

    //PARTLINE1(C>ABS(SAR2) AND SAR2>0,QSA1),COLORRED,LINETHICK3; //PARTLINE1(C<ABS(SAR2) AND SAR2>0,QSA1),COLORFF0000,LINETHICK3;

    //QS1:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;//KJC:=QS1*0.93;//DRAWTEXT(CROSS(KJC,C) AND C<KJC,L*0.99,'单减仓',COLORYELLOW;MI1:=C-REF(C,1);MI:=IF(PERIOD-6>=2 AND PERIOD-6<6,MI1,0);AMI:=SMA(MI,3,1);F:=MA(REF(AMI,1),10)-MA(REF(AMI,1),20);DD:=SMA(F,10,1);DRAWBMP( CROSS(DD,F ) AND C>SAR2 ,H*1.007,'阳眼',VALIGN2;

    DRAWBMP(FILTER(CROSS(C,ABS(SAR2)),10),L*0.9995,'CON5',VALIGN0;//B,S点//DRAWBMP(FILTER(CROSS(ABS(SAR2),C),10),H*1.0015,'CON9',VALIGN2;//{加速点}//压力支持位1:=MA(CLOSE,26);//{压力支撑线}//

    //线条:MA(CLOSE,28),COLORFF00FF,LINETHICK3,NOTEXT;

    //PARTLINE1(C>压力支持位1 AND 压力支持位1>0,线条),COLORFF00FF,LINETHICK3; //PARTLINE1(C<压力支持位1 AND 压力支持位1>0,线条),COLOR00FFFF,LINETHICK3; //PARTLINE1(C=压力支持位1 AND 压力支持位1>0,线条),COLOR000000,LINETHICK3;

    A:=BARSLAST(HHH&&TJX2);B:=BARSLAST(LLL&&TJX1);

    //STICKLINE1(A>B,H,MAX(O,C),0,0),COLORRED;//STICKLINE1(A>B,L,MIN(O,C),0,0),COLORRED;//{红色K}//STICKLINE1(A>B&&ISUP,C,O,3,1),COLORRED;//STICKLINE1(A>B&&ISDOWN,C,O,3,0),COLORRED;
     

    //STICKLINE1(A<B,H,MAX(O,C),0,0),COLORGREEN;//STICKLINE1(A<B,L,MIN(O,C),0,0),COLORGREEN;//{绿色K}//STICKLINE1(A<B&&ISUP,C,O,3,1),COLORGREEN;//STICKLINE1(A<B&&ISDOWN,C,O,3,0),COLORGREEN;
     
     
     

    MA3:=MA(C,170);//DRAWGBK(MA3>C,RGB(0,0,0),RGB(9,60,1),0);//DRAWGBK(MA3<C,RGB(0,0,0),RGB(62,1,1),0);//DRAWGBK(MA3=0,RGB(0,0,0),RGB(0,0,0),0);TY:=H;TY1:=L;A1:=REF(TY,10)=HHV(TY,2*10+1); VB1:=FILTER(A1,10); C11:=BACKSET(VB1,10+1); HD:=FILTER(C11,10);A2:=REF(TY1,10)=LLV(TY1,2*10+1); VB2:=FILTER(A2,10); C2:=BACKSET(VB2,10+1); LD:=FILTER(C2,10);AA:=REF(H,BARSLAST(HD)); BA:=REF(L,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD);T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);A3:=LLV(LOW,1);A4:=LLV(LOW,5);A5:=LLV(LOW,8);A6:=HHV(H,21);A7:=LLV(LOW,21),COLORRED;A8:=(A6+A7)/2;

    上涨压力:IF(T1,AA,AA),COLORLIGHTGREEN,DASH,NODRAW,PRECIS0;下跌支撑:IF(T2,BA,BA),COLORRED,DASH,NODRAW,PRECIS0;

    开盘价:O,NODRAW,PRECIS0,COLORWHITE;收盘价:C,NODRAW,PRECIS0,COLORYELLOW;最高价:H,NODRAW,PRECIS0,COLORRED;最低价:L,NODRAW,PRECIS0,COLORGREEN;
     
     

    支撑:=REF(LOW,BARSLAST(LD)),COLOR008000,DASHDOT;压力:=REF(HIGH,BARSLAST(HD)),COLORFF0000,DASHDOT;

    DRAWSL(ISLASTBAR  ,支撑,0,-BARSLAST(CROSS(BACKSET(ISLASTBAR,BARSLAST(LLL&&TJX1)+1),0.5))+1,0,COLOR008000),COLORMAGENTA,DASHDOT;DRAWSL(ISLASTBAR   ,压力,0,-BARSLAST(CROSS(BACKSET(ISLASTBAR,BARSLAST(HHH&&TJX2)+1),0.5))+1,0,COLORFF0000),COLORYELLOW,DASHDOT;

    DRAWNUMBER1(ISLASTBAR,上涨压力,上涨压力,0),COLORYELLOW,FONTSIZE30,ALIGN0,VALIGN1;DRAWNUMBER1(ISLASTBAR,下跌支撑,下跌支撑,0),COLORMAGENTA,FONTSIZE30,ALIGN0,VALIGN1;

    LC:= REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC, 0), 6, 1)/SMA(ABS(CLOSE-LC), 6, 1)*100;//DRAWTEXT(FILTER(CROSS(RSI,30) AND (CLOSE>REF(HIGH,1.5)),5),LOW-LOW*0.001,'止赢',COLORGREEN,FONTSIZE26;//DRAWTEXT(FILTER(CROSS(70,RSI) AND (CLOSE<REF(LOW,1.5)),5),HIGH+HIGH*0.001,'止赢',COLORRED,FONTSIZE26;

    DRAWTEXT(HHH&&TJX2,H,'',COLORYELLOW,FONTSIZE26;DRAWTEXT(LLL&&TJX1,L,'',COLORMAGENTA,FONTSIZE26,VALIGN0;

    HZDWR:=MA((CLOSE-LLV(LOW,98))/(HHV(HIGH,98)-LLV(LOW,98))*120,8),COLORWHITE; HZZWR:=MA((CLOSE-LLV(LOW,88))/(HHV(HIGH,88)-LLV(LOW,88))*120,8),COLORYELLOW; RSV:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26)); DY1:=(OPEN+CLOSE+HIGH+LOW)/4; DY2:=LLV(LOW,13); DY3:=HHV(HIGH,13); DYA:=MA((DY1-DY2)/(DY3-DY2)*100,1); DYB:=MA(DYA,5); A11:=EMA((DY1-DY2)/(DY3-DY2)*180,20); B1:=EMA(REF(A1,1),1); B2:=MA((0.667*REF(RSV,1)+0.333*RSV),1); RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;RSV2:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100;J1:=SMA(RSV1,3,1);J2:=SMA(J1,3,1);MA1:=MA(CLOSE,92);资金线1:=3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),NODRAW,COLOR00FFFF;资金线:3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),NODRAW,COLOR00FFFF,NOTEXT;

    DRAWBKBMP( 资金线>=70.0000 AND 资金线<101.0000,  'FKP',ALIGN2;DRAWBKBMP(资金线>=36.0000 AND 资金线<69.0000,     'KZD',ALIGN2;DRAWBKBMP( 资金线>=1.0000 AND 资金线<36.0000,      'FKP',ALIGN2;

    //DRAWNUMBER(ISLASTBAR,线条,线条,0,COLORCYAN),FONTSIZE20,ALIGN0,VALIGN1;


    文件名:1564494695(1).jpg

     

     来源:程序化99

  • 文华技术人员:  参考:
    M:=5;//M值需要大于等于5 G:=MA(C,5);D:=MA(C,10);NNH:=BARSLAST(H=HHV(H,M)) ,NODRAW;NNL:=BARSLAST(L=LLV(L,M)) ,NODRAW;NNY:=IF(REF(G,NNH)>REF(D,NNH) AND NNH<=M-3,NNH,IF(REF(G,NNL)<REF(D,NNL) AND NNL<=M-3,NNL,M-2)) ,NODRAW;NNN:=IF(ISLASTBAR AND NNY>0,NNY,M-2) ,NODRAW;H1:=REF(H,NNN)=HHV(H,M-1);L1:=REF(L,NNN)=LLV(L,M-1);FG01:=BACKSET(H1,NNN+1)>BACKSET(H1,NNN),NODRAW;//只设置前面第M-1个FD01:=BACKSET(L1,NNN+1)>BACKSET(L1,NNN) ,NODRAW;FG02:=FG01=FD01 AND G>D,NODRAW;FD02:=FG01=FD01 AND G<D,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,M))>=M-2,M-2,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,M))>=M-2,M-2,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,M)))>REF(D,BARSLAST(L=LLV(L,M))),BARSLAST(L=LLV(L,M))<M-2,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,M)))<REF(D,BARSLAST(H=HHV(H,M))),BARSLAST(H=HHV(H,M))<M-2,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+M-2),DT1+1),NODRAW;FG2A:=BACKSET(REFX(GT1,1)=0 AND DT1<3 AND GT1-DT1<4 AND REF(L,DT1)<=LLV(L,GT1+M-2) AND REF(H,GT1)>HHV(H,GT1+M-2),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)+M-1) AND H>HHV(H,REF(GT1,1)+M-1),1,0),NODRAW;FG2:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)<HHV(H,DT1+M-2),GT1+1),NODRAW;FD2A:=BACKSET(REFX(DT1,1)=0 AND GT1<3 AND DT1-GT1<4 AND REF(H,GT1)>=HHV(L,DT1+M-2) AND REF(L,DT1)>LLV(L,DT1+M-2),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)+M-1),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;//前短后长,去2;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;//前短后长,去3;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; 

    //最后一段画线N1:=BARSLAST(HHH)+1;NY2:=BARSLAST(LLL)+1;TJX1:=BARSLAST(HHH)+1>=5,NODRAW;TJX2:=BARSLAST(LLL)+1>=5,NODRAW; 

    HAC:=VALUEWHEN(HHH,H);LAC:=VALUEWHEN(LLL,L);TLC:=BARSLAST(LLL);THC:=BARSLAST(HHH);NNNC:=COUNT(HHH||LLL,BARPOS);AAAC:=MOD(NNNC,2); 

    //DRAWLINE1(HHH&&TJX2 ,H,LLL&&TJX1||ISLASTBAR,L,0),RGB(0,128,255),LINETHICK2;//分型线//DRAWLINE1(LLL&&TJX1,L,HHH&&TJX2||ISLASTBAR ,H,0),COLORMAGENTA,LINETHICK2;//分型线

    //DRAWNUMBER(ISLASTBAR&&BARSLAST(HHH&&TJX2)<BARSLAST(LLL&&TJX1),C,C,0,RGB(0,128,255)),FONTSIZE30,ALIGN0;//DRAWNUMBER(ISLASTBAR&&BARSLAST(HHH&&TJX2)>BARSLAST(LLL&&TJX1),C,C,0,COLORMAGENTA),FONTSIZE30,ALIGN0;
     
     

    HHR:=H>HV(H,BARSLAST(LLL)),NODRAW;DRAWSL((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR,H,0,1,0,RGB(0,128,255)),LINETHICK2;LLR:=L<LV(L,BARSLAST(HHH)),NODRAW;DRAWSL((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR,L,0,1,0,RGB(0,128,255)),LINETHICK2;

    HHPP1:=VALUEWHEN((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR,AVPRICE),COLORRED,LINETHICK2;HHPP2:=VALUEWHEN((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR,AVPRICE),COLORGREEN,LINETHICK2;

    //CROSS(BACKSET(LLL||ISLASTBAR,BARSLAST((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR)+1),0.5),ICON(1,'ICO107');//B//CROSS(BACKSET(HHH||ISLASTBAR,BARSLAST((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR)+1),0.5),ICON(1,'ICO106');//S//DRAWTEXT(CROSS(BACKSET(LLL||ISLASTBAR,BARSLAST((BARSLAST(HHH)<=BARSLAST(LLL)||LLL)&&MOD(COUNT(LLR,BARSLAST(HHH)),3)=0&&LLR)+1),0.5),L,'B'),FONTSIZE30,COLORYELLOW;//B//DRAWTEXT(CROSS(BACKSET(HHH||ISLASTBAR,BARSLAST((BARSLAST(HHH)>=BARSLAST(LLL)||HHH)&&MOD(COUNT(HHR,BARSLAST(LLL)),3)=0&&HHR)+1),0.5),L,'S'),FONTSIZE30,COLORYELLOW;//S
     

    SAR11:=SAR1(18,2,10),CIRCLEDOT;SAR2:=SAR11;

    //QSA:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;//QSA1:(MA(CLOSE,2)+MA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/4,COLORBLUE,LINETHICK3,NOTEXT;

    //DRAWICON(C<ABS(SAR2) AND C<REF(C,1)*0.9995 ,QSA1,'ICO11');//DRAWICON(C>ABS(SAR2) AND C>REF(C,1)*1.0005 ,QSA1,'ICO12');

    //PARTLINE1(C>ABS(SAR2) AND SAR2>0,QSA1),COLORRED,LINETHICK3; //PARTLINE1(C<ABS(SAR2) AND SAR2>0,QSA1),COLORFF0000,LINETHICK3;

    //QS1:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;//KJC:=QS1*0.93;//DRAWTEXT(CROSS(KJC,C) AND C<KJC,L*0.99,'空单减仓'),COLORYELLOW;MI1:=C-REF(C,1);MI:=IF(PERIOD-6>=2 AND PERIOD-6<6,MI1,0);AMI:=SMA(MI,3,1);F:=MA(REF(AMI,1),10)-MA(REF(AMI,1),20);DD:=SMA(F,10,1);DRAWBMP( CROSS(DD,F ) AND C>SAR2 ,H*1.007,'太阳眼'),VALIGN2;

    DRAWBMP(FILTER(CROSS(C,ABS(SAR2)),10),L*0.9995,'ICON5'),VALIGN0;//B,S点//DRAWBMP(FILTER(CROSS(ABS(SAR2),C),10),H*1.0015,'ICON9'),VALIGN2;//{加速点}//压力支持位1:=MA(CLOSE,26);//{压力支撑线}//

    //线条:MA(CLOSE,28),COLORFF00FF,LINETHICK3,NOTEXT;

    //PARTLINE1(C>压力支持位1 AND 压力支持位1>0,线条),COLORFF00FF,LINETHICK3; //PARTLINE1(C<压力支持位1 AND 压力支持位1>0,线条),COLOR00FFFF,LINETHICK3; //PARTLINE1(C=压力支持位1 AND 压力支持位1>0,线条),COLOR000000,LINETHICK3;

    A:=BARSLAST(HHH&&TJX2);B:=BARSLAST(LLL&&TJX1);

    //STICKLINE1(A>B,H,MAX(O,C),0,0),COLORRED;//STICKLINE1(A>B,L,MIN(O,C),0,0),COLORRED;//{红色K}//STICKLINE1(A>B&&ISUP,C,O,3,1),COLORRED;//STICKLINE1(A>B&&ISDOWN,C,O,3,0),COLORRED;
     

    //STICKLINE1(A<B,H,MAX(O,C),0,0),COLORGREEN;//STICKLINE1(A<B,L,MIN(O,C),0,0),COLORGREEN;//{绿色K}//STICKLINE1(A<B&&ISUP,C,O,3,1),COLORGREEN;//STICKLINE1(A<B&&ISDOWN,C,O,3,0),COLORGREEN;
     
     
     

    MA3:=MA(C,170);//DRAWGBK(MA3>C,RGB(0,0,0),RGB(9,60,1),0);//DRAWGBK(MA3<C,RGB(0,0,0),RGB(62,1,1),0);//DRAWGBK(MA3=0,RGB(0,0,0),RGB(0,0,0),0);TY:=H;TY1:=L;A1:=REF(TY,10)=HHV(TY,2*10+1); VB1:=FILTER(A1,10); C11:=BACKSET(VB1,10+1); HD:=FILTER(C11,10);A2:=REF(TY1,10)=LLV(TY1,2*10+1); VB2:=FILTER(A2,10); C2:=BACKSET(VB2,10+1); LD:=FILTER(C2,10);AA:=REF(H,BARSLAST(HD)); BA:=REF(L,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD);T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);A3:=LLV(LOW,1);A4:=LLV(LOW,5);A5:=LLV(LOW,8);A6:=HHV(H,21);A7:=LLV(LOW,21),COLORRED;A8:=(A6+A7)/2;

    上涨压力:IF(T1,AA,AA),COLORLIGHTGREEN,DASH,NODRAW,PRECIS2;下跌支撑:IF(T2,BA,BA),COLORRED,DASH,NODRAW,PRECIS2;

    开盘价:O,NODRAW,PRECIS2,COLORWHITE;收盘价:C,NODRAW,PRECIS2,COLORYELLOW;最高价:H,NODRAW,PRECIS2,COLORRED;最低价:L,NODRAW,PRECIS2,COLORGREEN;
     
     

    支撑:=REF(LOW,BARSLAST(LD)),COLOR008000,DASHDOT;压力:=REF(HIGH,BARSLAST(HD)),COLORFF0000,DASHDOT;

    DRAWSL(ISLASTBAR  ,支撑,0,-BARSLAST(CROSS(BACKSET(ISLASTBAR,BARSLAST(LLL&&TJX1)+1),0.5))+1,0,COLOR008000),COLORMAGENTA,DASHDOT;DRAWSL(ISLASTBAR   ,压力,0,-BARSLAST(CROSS(BACKSET(ISLASTBAR,BARSLAST(HHH&&TJX2)+1),0.5))+1,0,COLORFF0000),COLORYELLOW,DASHDOT;

    DRAWNUMBER1(ISLASTBAR,上涨压力,上涨压力,2),COLORYELLOW,FONTSIZE30,ALIGN0,VALIGN1;DRAWNUMBER1(ISLASTBAR,下跌支撑,下跌支撑,2),COLORMAGENTA,FONTSIZE30,ALIGN0,VALIGN1;

    LC:= REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC, 0), 6, 1)/SMA(ABS(CLOSE-LC), 6, 1)*100;//DRAWTEXT(FILTER(CROSS(RSI,30) AND (CLOSE>REF(HIGH,1.5)),5),LOW-LOW*0.001,'空止赢'),COLORGREEN,FONTSIZE26;//DRAWTEXT(FILTER(CROSS(70,RSI) AND (CLOSE<REF(LOW,1.5)),5),HIGH+HIGH*0.001,'多止赢'),COLORRED,FONTSIZE26;

    DRAWTEXT(HHH&&TJX2,H,'卖'),COLORYELLOW,FONTSIZE26;DRAWTEXT(LLL&&TJX1,L,'买'),COLORMAGENTA,FONTSIZE26,VALIGN0;

    HZDWR:=MA((CLOSE-LLV(LOW,98))/(HHV(HIGH,98)-LLV(LOW,98))*120,8),COLORWHITE; HZZWR:=MA((CLOSE-LLV(LOW,88))/(HHV(HIGH,88)-LLV(LOW,88))*120,8),COLORYELLOW; RSV:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26)); DY1:=(OPEN+CLOSE+HIGH+LOW)/4; DY2:=LLV(LOW,13); DY3:=HHV(HIGH,13); DYA:=MA((DY1-DY2)/(DY3-DY2)*100,1); DYB:=MA(DYA,5); A11:=EMA((DY1-DY2)/(DY3-DY2)*180,20); B1:=EMA(REF(A1,1),1); B2:=MA((0.667*REF(RSV,1)+0.333*RSV),1); RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;RSV2:=(CLOSE-LLV(LOW,26))/(HHV(HIGH,26)-LLV(LOW,26))*100;J1:=SMA(RSV1,3,1);J2:=SMA(J1,3,1);MA1:=MA(CLOSE,92);资金线1:=3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),NODRAW,COLOR00FFFF;资金线:3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),NODRAW,COLOR00FFFF,NOTEXT;

    DRAWBKBMP( 资金线>=70.0000 AND 资金线<101.0000,  'DFKP'),ALIGN2;DRAWBKBMP(资金线>=36.0000 AND 资金线<69.0000,     'DKZD'),ALIGN2;DRAWBKBMP( 资金线>=1.0000 AND 资金线<36.0000,      'KFKP'),ALIGN2;

    //DRAWNUMBER(ISLASTBAR,线条,线条,0,COLORCYAN),FONTSIZE20,ALIGN0,VALIGN1;

     

     来源: WWW.CXH99.COM

  • 文华客服:  还有,能否将出现 了 买卖的字样后, 出一个 铃声提示

     

  • 网友回复:  谢谢老师拉

     

  • 网友回复:  老师,修改的还是不对,我看 欧元09的时候,只有小数点后两位

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

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

怎么收费,代编流程等详情请点击阅读,或QQ微信联系我们!


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

相关文章

    没有相关内容