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

[求助] 幫忙編寫預警公式 [文華財經]

  • 咨詢內容: 老師您好:請幫忙編寫一下同時出現"多”“多.BMP"和”空“”空.BMP"預警公式,謝謝

    LHS:IF(DATE>200421,NULL,1),NODRAW;A:=EMA2(HIGH,30);
    B:=EMA2(LOW,30);
    A1:=EMA2(HIGH,150),LINETHICK2;
    B1:=EMA2(LOW,150)*LHS,LINETHICK2;
    S1:=CROSS(CLOSE,EMA2(HIGH,150))*LHS,LINETHICK2;
    X1:=CROSS(EMA2(LOW,150),CLOSE)*LHS,LINETHICK2;
    WS1:=BARSLAST(S1)+1*LHS,LINETHICK2;
    WX1:=BARSLAST(X1)+1*LHS,LINETHICK2;
    SS1:=CROSS(SUM(S1,WX1),0.5)*LHS,LINETHICK2;
    XX1:=CROSS(SUM(X1,WS1),0.5)*LHS,LINETHICK2;
    S:=CROSS(CLOSE,EMA2(HIGH,30))*LHS,LINETHICK2;
    X:=CROSS(EMA2(LOW,30),CLOSE)*LHS,LINETHICK2;
    WS:=BARSLAST(S)+1*LHS,LINETHICK2;
    WX:=BARSLAST(X)+1,LINETHICK2;
    SS:=CROSS(SUM(S,WX),0.5)*LHS,LINETHICK2;
    XX:=CROSS(SUM(X,WS),0.5)*LHS,LINETHICK2;
    ?STICKLINE(SUM(X,WS)>0.5 && CLOSE>=OPEN,OPEN,CLOSE,COLORCYAN,1);
    STICKLINE(SUM(X,WS)>0.5 && CLOSE<OPEN,OPEN,CLOSE,COLORCYAN,0);
    DRAWLINE(SUM(X,WS)>0.5,HIGH,CLOSE>OPEN,CLOSE,COLORCYAN);
    DRAWLINE(SUM(X,WS)>0.5,LOW,CLOSE>OPEN,OPEN,COLORCYAN);
    DRAWLINE(SUM(X,WS)>0.5,HIGH,CLOSE<OPEN,OPEN,COLORCYAN);
    DRAWLINE(SUM(X,WS)>0.5,LOW,CLOSE<OPEN,CLOSE,COLORCYAN);
    DRAWLINE(SUM(X,WS)>0.5,HIGH,CLOSE=OPEN,LOW,COLORCYAN);
    STICKLINE(SUM(S,WX)>0.5 && CLOSE>=OPEN,OPEN,CLOSE,COLORRED,1);
    STICKLINE(SUM(S,WX)>0.5 && CLOSE<OPEN,OPEN,CLOSE,COLORRED,0);
    DRAWLINE(SUM(S,WX)>0.5,HIGH,CLOSE>OPEN,CLOSE,COLORRED);
    DRAWLINE(SUM(S,WX)>0.5,LOW,CLOSE>OPEN,OPEN,COLORRED);
    DRAWLINE(SUM(S,WX)>0.5,HIGH,CLOSE<OPEN,OPEN,COLORRED);
    DRAWLINE(SUM(S,WX)>0.5,LOW,CLOSE<OPEN,CLOSE,COLORRED);
    DRAWLINE(SUM(S,WX)>0.5,HIGH,CLOSE=OPEN,LOW,COLORRED);
    DRAWBMP(SS,LOW-5,'.BMP';
    DRAWBMP(XX,HIGH+5,'.BMP';
    DIFF:=(EMA(C,12)-EMA(C,26)),COLORWHITE;
    DEA? : =EMA(DIFF,9),COLORYELLOW;
    MACD := 2*(DIFF-DEA),COLORYELLOW;
    MACDMA:=EMA(MACD,3),COLORMAGENTA,LINETHICK1;
    RMACD:=REF(MACD,1);
    J:=CROSS(DIFF,DEA);
    AT:=2*(DIFF-DEA),COLORSTICK,NOTEXT;
    MACDD:IF(AT>0,AT,NULL),COLORRED,NODRAW;
    MACDD.:IF(AT<0,AT,NULL),COLORGREEN,NODRAW;
    VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
    VA2:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);
    P:=BACKSET(ISLASTBAR,SUMBARS(VA2,1));
    VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
    VA4:=CROSS(BACKSET(CROSS(MACD,0) OR (ISLASTBAR AND MACD<0),REF(VA3,1)+2),0.5);
    Q:=BACKSET(ISLASTBAR,SUMBARS(VA4,1));
    TT:=BACKSET(ISLASTBAR,MAX(SUMBARS(VA2,1),SUMBARS(VA4,1)));
    DRAWTEXT(CROSS(Q,0.5)&&BARSLASTCOUNT(P)<BARSLASTCOUNT(Q),VALUEWHEN(VA4,H),'',VALIGN1,COLORRED,FONTSIZE30;
    DRAWTEXT(CROSS(P,0.5)&&BARSLASTCOUNT(P)>BARSLASTCOUNT(Q),VALUEWHEN(VA2,H),'',VALIGN1,COLORGREEN,FONTSIZE20;
    DRAWTEXT(BARSLASTCOUNT(P)<BARSLASTCOUNT(Q)&&CROSS(P,0.5),VALUEWHEN(VA2,H),'',VALIGN1,COLORGREEN,FONTSIZE30;
    DRAWTEXT(BARSLASTCOUNT(P)>BARSLASTCOUNT(Q)&&CROSS(Q,0.5),VALUEWHEN(VA4,L),'',VALIGN1,COLORYELLOW,FONTSIZE20;
    FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);
    VAR1:=(2*CLOSE+HIGH+LOW)/40;
    VAR2:=EMA(EMA(EMA(VAR1,4),4),4);
    DRAWSL(ISLASTBAR&&BARSLASTCOUNT(P)<BARSLASTCOUNT(Q),VALUEWHEN(VA2,H),0,-BARSLASTCOUNT(P)+1,0,COLORWHITE),LINETHICK1;
    DRAWSL(ISLASTBAR&&BARSLASTCOUNT(P)>BARSLASTCOUNT(Q),VALUEWHEN(VA4,L),0,-BARSLASTCOUNT(Q)+1,0,COLORWHITE),LINETHICK1;
    DRAWLINE3(ISLASTBAR&&BARSLASTCOUNT(P)>BARSLASTCOUNT(Q),VALUEWHEN(VA2,H),BARSLASTCOUNT(Q)-1,1,VALUEWHEN(VA2,H),BARSLASTCOUNT(P)-1,0),COLORWHITE,LINETHICK1;
    DRAWLINE3(ISLASTBAR&&BARSLASTCOUNT(P)<BARSLASTCOUNT(Q),VALUEWHEN(VA4,L),BARSLASTCOUNT(P)-1,1,VALUEWHEN(VA4,L),BARSLASTCOUNT(Q)-1,0),COLORWHITE,LINETHICK1;

    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);
    HH1:=IFELSE(H<REF(H,1)&&REF(H,1)<REF(H,2),REF(H,2),0)*LHS,LINETHICK2;
    LL1:=IFELSE(L>REF(L,1)&&REF(L,1)>REF(L,2),REF(L,2),0)*LHS,LINETHICK2;
    HH2:=VALUEWHEN(HH1>0,HH1)*LHS,LINETHICK2;
    LL2:=VALUEWHEN(LL1>0,LL1)*LHS,LINETHICK2;
    K1:=IFELSE(CLOSE>HH2,-3,IFELSE(CLOSE<LL2,1,0))*LHS,LINETHICK2;
    K2:=VALUEWHEN(K1<>0,K1)*LHS,LINETHICK2;
    G:=IFELSE(K2=1,HH2,LL2)*LHS,LINETHICK2;
    G1:=VALUEWHEN(ISLASTBAR,G)*LHS,LINETHICK2;
    DRAWNUMBER(L>0,G1,G1,0,COLORCYAN);
    W1:=K2*LHS,LINETHICK2;
    W2:=OPEN-CLOSE*LHS,LINETHICK2;
    HT:=IFELSE(OPEN>CLOSE,OPEN,CLOSE)*LHS,LINETHICK2;
    LT:=IFELSE(OPEN<CLOSE,OPEN,CLOSE)*LHS,LINETHICK2;
    ?
    DRAWLINE(W1=1&&REF(W1,1)=1,G,W1=1&&REF(W1,1)=1,REF(G,1),COLORGREEN),DOT;
    DRAWLINE(W1=-3&&REF(W1,1)=-3,G,W1=-3&&REF(W1,1)=-3,REF(G,1),COLORYELLOW),DOT;
    DRAWSL(K2=1,G,0,1,0,COLORGREEN),DOT;
    DRAWSL(K2=-3,G,0,1,0,COLORYELLOW),DOT;
    DRAWTEXT(CROSS(W1,0),HT+6,'',COLORGREEN,ALIGN0,FONTSIZE20;
    DRAWTEXT(CROSS(0,W1),LT-5,'',COLORYELLOW,ALIGN0,FONTSIZE20;
    N3:=BARSLAST(CROSS(W1>0,0.5))*LHS,LINETHICK2;
    N4:=BARSLAST(CROSS(W1<=0,0.5))*LHS,LINETHICK2;
    HH3:=IF(W1<=0,REF(HV(H,N4),N3),NULL),COLORYELLOW,DOT;
    LL3:=IF(W1>0,REF(LV(L,N3),N4),NULL),COLORGREEN,DOT;

    ?

    ?來源:程序化99

  • 文華技術人員: ?加入下面兩句
    DRAWBMP(CROSS(W1,0),HT+6,''; DRAWBMP(CROSS(0,0\W1),LT-5,'';

 

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

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

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

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


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 日日干夜夜操s8| 第一福利官方导航| 欧美成人精品第一区| 国产三级在线观看完整版| 91av最新地址| 日批视频网址免费观看| 亚洲午夜精品在线| 真实的国产乱xxxx| 国产又色又爽又刺激在线观看| 91亚洲精品第一综合不卡播放| 性欧美丰满熟妇XXXX性久久久| 久久综合九色综合欧美就去吻| 激情内射日本一区二区三区| 国产精品99久久免费观看| 一本一道波多野结衣大战黑人| 日韩在线观看免费完整版视频| 亚洲欧美日韩另类| 精品久久久噜噜噜久久久| 国产免费一区二区三区在线观看 | 福利一区二区三区视频午夜观看| 国产性一交一乱一伦一色一情| 99re6热视频精品免费观看| 成年女人色费视频免费| 九九久久精品国产免费看小说| 欧美激情综合色综合啪啪五月| 免费少妇荡乳情欲视频| 16女性下面扒开无遮挡免费| 宅男影院在线观看| 亚洲国产精品人久久电影| 精品乱子伦一区二区三区| 国产剧情在线视频| h在线免费视频| 国内一区亚洲综合图区欧美| 一个人看的日本www| 斗罗大陆动漫完整免费| 久久精品天天中文字幕人妻| 欧美在线视频一区在线观看| 亚洲精品视频网| 香港黄页亚洲一级| 夭天曰天天躁天天摸在线观看| 久久se精品一区二区|