您現在的位置:程序化交易>> 期貨公式>> 文華財經>> 文華財經知識>>正文內容

麻老師再看看 [文華財經]

  • 咨詢內容: 麻煩老師再看看,我想要的是紅圈里這條線的柤反指標,即現在上面的綠色橫線,和這條豎。現在的編碼完全不是這樣的


    文件名:1646015910605.jpg

    ?

    ?來源:程序化99

  • 文華技術人員: ??來源:程序化99
  • 文華技術人員:提供下完整源碼,我們分析看下。

    ?

    ?來源: www.tumamayizhan.com

  • 文華客服: ? VAR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25); VAR2:=HIGH-REF(HIGH,1); VAR3:=REF(LOW,1)-LOW; VAR4:=SUM(IF(VAR2>0 AND VAR2>VAR3,VAR2,0),25); VAR5:=SUM(IF(VAR3>0 AND VAR3>VAR2,VAR3,0),25); VAR6:=VAR4*100/VAR1; VAR7:=VAR5*100/VAR1; VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15); VAR9:=(VAR8+REF(VAR8,15))/2; A:=(VAR7>VAR6 AND VAR7>25 AND VAR6<25); B:=ZIGZAG(C,5,1)*100; G:=MA(B,2); D:=CROSS(B,G); W:=CROSS(G,B); INDEXL:="999001$L"; INDEXC:="999001$C"; INDEXH:="999001$H"; E:=REF(INDEXC,1); F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1); VAR10:=F AND F<8; VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; VAR12:=SMA(VAR11,3,1); VAR13:=SMA(VAR12,3,1); VAR14:=VAR13 AND VAR13<20;

    //STICKLINE(W=1,O,C,3,0); STICKLINE(D=1,O,C,3,0),COLORRED; 走勢線:ZIGZAG(C,3,1),COLORWHITE,LINETHICK3; DRAWTEXT(CROSS(走勢線,G),L,'',COLORRED,FONTSIZE20; DRAWTEXT(CROSS(G,走勢線),H,''),COLORGREEN,FONTSIZE20; 支撐位:IF((走勢線-REF(走勢線,1))/REF(走勢線,1)*100>=0,




    REF(走勢線,BARSLAST(CROSS((走勢線-REF(走勢線,1))/REF(走勢線,1)*100,0))+1),NULL),RGB(255,128,0),LINETHICK7; //阻力位:IF((走勢線-REF(走勢線,1))/REF(走勢線,1)*100<0, //REF(走勢線,BARSLAST(CROSS(0,(走勢線-REF(走勢線,1))/REF(走勢線,1)*100))+1),NULL),COLORLIGHTGREEN;

    買賣價格位:MA(C,3),RGB(255,0,128),LINETHICK2; 頭部:=PEAKBARS(3,3,1,1)=0; 底部:=TROUGHBARS(3,3,1,1)=0; DRAWTEXT(頭部,H,'----------阻力 ',COLORGREEN; DRAWTEXT(底部,L,'++++++++支撐 ',COLORRED; F1:=ZIGZAG(C,16,1); DRAWICON(CROSS(ZIGZAG(C,10,1),REF(ZIGZAG(C,10,1),1)),LOW*0.997,7); DRAWICON(CROSS(REF(ZIGZAG(C,10,1),1),ZIGZAG(C,10,1)),HIGH*1.004,8);

    ?

  • 網友回復: ?直接對支撐位做相反處理,源碼中沒有豎線標記的部分。
    無法看圖編寫的,如果您有相關思路請具體量化下。
    參考:

    VAR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25); VAR2:=HIGH-REF(HIGH,1); VAR3:=REF(LOW,1)-LOW; VAR4:=SUM(IF(VAR2>0 AND VAR2>VAR3,VAR2,0),25); VAR5:=SUM(IF(VAR3>0 AND VAR3>VAR2,VAR3,0),25); VAR6:=VAR4*100/VAR1; VAR7:=VAR5*100/VAR1; VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15); VAR9:=(VAR8+REF(VAR8,15))/2; A:=(VAR7>VAR6 AND VAR7>25 AND VAR6<25); B:=ZIGZAG(C,5,1)*100; G:=MA(B,2); D:=CROSS(B,G); W:=CROSS(G,B); INDEXL:="999001$L"; INDEXC:="999001$C"; INDEXH:="999001$H"; E:=REF(INDEXC,1); F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1); VAR10:=F AND F<8; VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; VAR12:=SMA(VAR11,3,1); VAR13:=SMA(VAR12,3,1); VAR14:=VAR13 AND VAR13<20;

    //STICKLINE(W=1,O,C,3,0); STICKLINE(D=1,O,C,3,0),COLORRED; 走勢線:ZIGZAG(C,3,1),COLORWHITE,LINETHICK3; DRAWTEXT(CROSS(走勢線,G),L,'',COLORRED,FONTSIZE20; DRAWTEXT(CROSS(G,走勢線),H,''),COLORGREEN,FONTSIZE20; 支撐位:IF((走勢線-REF(走勢線,1))/REF(走勢線,1)*100>=0,REF(走勢線,BARSLAST(CROSS((走勢線-REF(走勢線,1))/REF(走勢線,1)*100,0))+1),NULL),RGB(255,128,0),LINETHICK7; //阻力位:IF((走勢線-REF(走勢線,1))/REF(走勢線,1)*100<0, //REF(走勢線,BARSLAST(CROSS(0,(走勢線-REF(走勢線,1))/REF(走勢線,1)*100))+1),NULL),COLORLIGHTGREEN; 壓力位:IF((走勢線-REF(走勢線,1))/REF(走勢線,1)*100<0,REF(走勢線,BARSLAST(CROSSDOWN((走勢線-REF(走勢線,1))/REF(走勢線,1)*100,0))+1),NULL),RGB(0,240,0),LINETHICK7;
    買賣價格位:MA(C,3),RGB(255,0,128),LINETHICK2; 頭部:=PEAKBARS(3,3,1,1)=0; 底部:=TROUGHBARS(3,3,1,1)=0; DRAWTEXT(頭部,H,'----------阻力 ',COLORGREEN; DRAWTEXT(底部,L,'++++++++支撐 ',COLORRED; F1:=ZIGZAG(C,16,1); DRAWICON(CROSS(ZIGZAG(C,10,1),REF(ZIGZAG(C,10,1),1)),LOW*0.997,7); DRAWICON(CROSS(REF(ZIGZAG(C,10,1),1),ZIGZAG(C,10,1)),HIGH*1.004,8);

    ?

  • 網友回復: ?老師能不能把這改改滿足上述條件就出豎線 S:=1; M:=20; NNH:=BARSLAST(H=HHV(H,M)) ,NODRAW; NNL:=BARSLAST(L=LLV(L,M)) ,NODRAW; NN:=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 NN>0,NN,M-2) ,NODRAW; H13:=REF(H,NNN)=HHV(H,M-1); L13:=REF(L,NNN)=LLV(L,M-1); FG01:=BACKSET(H13,NNN+1)>BACKSET(H13,NNN),NODRAW;//只設置前面第M-1個 FD01:=BACKSET(L13,NNN+1)>BACKSET(L13,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; 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;

    ?DRAWTEXT(HHH,H,'',COLORGREEN,FONTSIZE20,COLORGREEN ,ALIGN1,VALIGN2;
    //DRAWSL(HHH,L,-99999,10,0,COLORYELLOW),LINETHICK5; DRAWLINE(HHH,L,1,L-9999*MINPRICE,COLORCYAN),DASHDOTDOT,LINETHICK3;
    //DRAWSL(LLL,H,99999,1,0,COLORRED),LINETHICK5; DRAWLINE(LLL,H,1,H+50*MINPRICE,RGB(255,128,0)),LINETHICK3;
    DRAWTEXT(LLL,L,'',COLORRED,VALIGN2,ALIGN1,FONTSIZE10;
    AA:BACKSET(ISLASTBAR,BARSLAST(HHH)+1),NODRAW; BB:BACKSET(ISLASTBAR,BARSLAST(LLL)+1),NODRAW; N1:BARSLAST(HHH)+1;
    DRAWLINE3(HHH&&AA,H,0,ISLASTBAR||LLL,VALUEWHEN(HHH,H),0,1),COLORWHITE,DASHDOT,LINETHICK3; DRAWLINE3(LLL&&BB,L,0,ISLASTBAR||HHH,VALUEWHEN(LLL,L),0,1),COLORWHITE,DASHDOT,LINETHICK4;

 

有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友

可聯系技術人員 QQ: 262069696  點擊在線交流或微信號:cxh99cxh99  進行 有償收費 編寫!

怎么收費,代編流程等詳情請點擊閱讀!

(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
主站蜘蛛池模板: 99精品久久99久久久久| 无码一区二区波多野结衣播放搜索 | 国产精品99久久不卡| 国产99久久亚洲综合精品| 亚洲精品无码专区在线| 久久精品国产精品亚洲| 一本久道中文无码字幕av| 2016天天干| 美女吸乳羞羞漫画| 欧美性猛交xxxx乱大交中文| 日本一本一道波多野结衣| 在线观看老湿视频福利| 国产免费黄色大片| 亚洲精品无码久久久久YW| 亚洲视频一区二区在线观看| 久久亚洲精品无码VA大香大香| a级毛片在线免费观看| 赵云腹肌下的紫黑巨龙h| 正在播放乱人伦| 成人无遮挡裸免费视频在线观看| 国产精品免费久久久久影院| 午夜毛片免费看| 五月婷中文字幕| Aⅴ精品无码无卡在线观看| 草莓视频国产在线观看| 欧美卡2卡4卡无卡免费| 夫妇交换性三中文字幕| 国产成人免费在线| 亚洲成熟人网站| 人妻丰满熟妇av无码区| 久久大香香蕉国产| 2019av在线视频| 片成年免费观看网站黄| 无码少妇一区二区浪潮AV | 天天色天天干天天射| 国产91免费在线观看| 亚洲av无码一区二区三区不卡 | 小小的日本乱码在线观看免费 | 国产小视频免费在线观看| 亚洲最大免费视频网| gⅴh372hd禁断介护老人|