導航:首頁 > 源碼編譯 > 在文華期貨的支撐點指標公式源碼

在文華期貨的支撐點指標公式源碼

發布時間:2023-09-14 09:20:29

1. 請高人幫我編寫一個MACD 文華財經程序化交易的公式

//該模型僅僅用來示範如何根據指標編寫簡單的模型
//用戶需要根據自己交易經驗,進行修改後再實際應用!!!
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIFF,M);
MACD:2*(DIFF-DEA),COLORSTICK;
MACD<0 AND REF(MACD,1)<MACD,BPK;
MACD>0 AND REF(MACD,1)>MACD,SPK;
AUTOFILTER;
這個模型問題在於,當紅綠柱參差不齊的時候會發生頻繁的反手買賣,所以實戰上不建議,僅供參考。

2. 您好可以幫我寫一個文華財經期貨行情軟體五分鍾macd金叉和死叉的預警提示公式嗎

文華贏順wh6,指標公式:

D: ="HOUR$1$CLOSE " ;
DIFFD : =EMA(D,12*12) - EMA(D,26*12);
DEAD := EMA(DIFFD,9*12);
DIFF : =EMA(C,12) - EMA(C,26);
DEA := EMA(DIFF,9);
CROSS(DIFF,DEA)&&BARSLAST(CROSS(DIFFD,DEAD))<BARSLAST(CROSSDOWN(DIFFD,DEAD)),SOUND('A');
CROSSDOWN(DIFF,DEA)&&BARSLAST(CROSS(DIFFD,DEAD))>BARSLAST(CROSSDOWN(DIFFD,DEAD)),SOUND('B');

3. 請高手幫忙破解文華公式源碼,一經驗證加到200分

1.
HH1:=IFELSE(H<REF(H,2)&&REF(H,1)<REF(H,2),REF(H,2),0); LL1:=IFELSE(L>REF(L,2)&&REF(L,1)>REF(L,2),REF(L,2),0); HH2:=VALUEWHEN(HH1>0,HH1); LL2:=VALUEWHEN(LL1>0,LL1); K1:=IFELSE(CLOSE>HH2,-3,IFELSE(CLOSE<LL2,1,0)); K2:=VALUEWHEN(K1<>0,K1); G:=IFELSE(K2=1,HH2,LL2); G1:=VALUEWHEN(ISLASTBAR,G); DRAWNUMBER(L>0,G1,G1,0,COLORCYAN); W1:=K2; W2:=OPEN-CLOSE; HT:=IFELSE(OPEN>CLOSE,OPEN,CLOSE); LT:=IFELSE(OPEN<CLOSE,OPEN,CLOSE); DRAWLINE(W1=1,HIGH,W1=1,HT,COLORCYAN); DRAWLINE(W1=1,LOW,W1=1,LT,COLORCYAN); DRAWLINE(W1=-3,HIGH,W1=-3,HT,COLORRED); DRAWLINE(W1=-3,LOW,W1=-3,LT,COLORRED); STICKLINE(W1>0,OPEN,CLOSE,COLORCYAN,1); STICKLINE(W1<=0,OPEN,CLOSE,COLORRED,1); STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,COLORRED,0); STICKLINE(W2>0&&W1>0,OPEN,CLOSE,COLORCYAN,0); DRAWLINE(W1=1&&REF(W1,1)=1,G,W1=1&&REF(W1,1)=1,REF(G,1),COLORGREEN); DRAWLINE(W1=-3&&REF(W1,1)=-3,G,W1=-3&&REF(W1,1)=-3,REF(G,1),COLORYELLOW); DRAWSL(K2=1,G,0,1,0,COLORGREEN); DRAWSL(K2=-3,G,0,1,0,COLORYELLOW);
HH:=IFELSE(H>REF(H,1)&&H>REF(H,2)&&H>REF(H,3)&&H>REF(H,4)&&H>REF(H,5)&&L<REF(L,1)&&L<REF(L,2)
&&L<REF(L,3)&&L<REF(L,4)&&L<REF (L,5),H-(H-L)*0.333,H); LL:=IFELSE(H>REF(H,1)&&H>REF(H,2)&&H>REF(H,3)&&H>REF(H,4)&&H>REF(H,5)&&L<REF(L,1)&&L<REF(L,2)
&&L<REF(L,3)&&L<REF(L,4)&&L<REF (L,5),(H-L)*0.333+L,L); H1:=IFELSE(H>=REF(H,1)&&H>=REF(H,2)&&H>=REF(H,3)&&H>=REF(H,4)&&H>=REF(H,5)&& H>REFX(H,1)
&&H>REFX(H,2)&&H>REFX(H,3)&&H>REFX(H,4) &&H>REFX(H,5),HH,0); L1:=IFELSE(L<=REF(L,1)&&L<=REF(L,2)&&L<=REF(L,3)&&L<=REF(L,4)&&L<=REF(L,5)&& L<REFX(L,1)
&&L<REFX(L,2)&&L<REFX(L,3)&&L<REFX(L,4) &&L<REFX(L,5),LL,0); H2:=BARSLAST(H1); L2:=BARSLAST(L1); H3:=REFX(REF(H1,H2),2); L3:=REFX(REF(L1,L2),2); H4:=ZIGZAG(H3,0,0); L4:=ZIGZAG(L3,0,0); H5:=VALUEWHEN(H4<REF(H4,1)&&REF(H4,1)>REF(H4,2),HH); L5:=VALUEWHEN(L4>REF(L4,1)&&REF(L4,1)<REF(L4,2),LL); POLYLINE(H5>0,H5,COLORWHITE); POLYLINE(L5>0,L5,COLORWHITE); DRAWNUMBER(H5<>REF(H5,1),H5,H5-L5,0,COLORMAGENTA); DRAWNUMBER(L5<>REF(L5,1),L5,H5-L5,0,COLORMAGENTA); D:=VALUEWHEN(ISLASTBAR,H5); E:=VALUEWHEN(ISLASTBAR,L5); DRAWNUMBER(LOW>0,D,D,0,COLORWHITE); DRAWNUMBER(LOW>0,E,E,0,COLORWHITE);
=======================================================================================
2.
N:0 50 2
N1:0 5 2
Q:0 1000 0
Q1:0 9000 0
HH:=HHV(HIGH,N);
LH:=LLV(LOW,N);
H1:=IFELSE(HH<REF(HH,1)&&LH<REF(LH,1)&&REF(OPEN,1) >CLOSE&&OPEN>CLOSE&&(HHV(OPEN,Q)-CLOSE)>Q1,REF(HH,N1),0);
L1:=IFELSE(LH>REF(LH,1)&&HH>REF(HH,1)&&REF(OPEN,1) <CLOSE&&OPEN<CLOSE&&(CLOSE-LLV(OPEN,Q))>Q1,REF(LH,N1),0);
H2:=VALUEWHEN(H1>0,H1);
L2:=VALUEWHEN(L1>0,L1);
K1:=IFELSE(CLOSE>H2,-3,IFELSE(CLOSE<L2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IFELSE(K2=1,H2,L2);
G1:=VALUEWHEN(ISLASTBAR,G);
DRAWNUMBER(LH>0,G1,G1,0,COLORCYAN);
TMP:=K2;W1:=K2;
W2:=OPEN-CLOSE;
HT:=IFELSE(OPEN>CLOSE,OPEN,CLOSE);
LT:=IFELSE(OPEN<CLOSE,OPEN,CLOSE);
DRAWLINE(W1=1,HIGH,W1=1,HT,COLORCYAN);
DRAWLINE(W1=1,LOW,W1=1,LT,COLORCYAN);
DRAWLINE(W1=-3,HIGH,W1=-3,HT,COLORRED);
DRAWLINE(W1=-3,LOW,W1=-3,LT,COLORRED);
STICKLINE(W1>0,OPEN,CLOSE,COLORCYAN,1);
STICKLINE(W1<=0,OPEN,CLOSE,COLORRED,1);
STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,COLORRED,0);
STICKLINE(W2>0&&W1>0,OPEN,CLOSE,COLORCYAN,0);
DRAWLINE(TMP=1&&REF(TMP,1)=1,G,TMP=1&&REF(TMP,1)=1,REF (G,1),COLORCYAN);DRAWLINE(TMP=-3&&REF(TMP,1)=-3,G,TMP=-3&&REF (TMP,1)=-3,REF(G,1),COLORRED);DRAWSL(K2=1,G,0,1,0,COLORCYAN);DRAWSL (K2=-3,G,0,1,0,COLORRED);
DRAWTEXT(CROSS(TMP,0),HH,'賣↓');
DRAWTEXT(CROSS(0,TMP),LH,'買↑');
MA55:=MA(CLOSE,55);
DRAWTEXT(CROSS(TMP,0)&&CLOSE<=MA55,HH,'賣↓');
DRAWTEXT(CROSS(0,TMP)&&CLOSE>=MA55,LH,'買↑');
=======================================================================================
3.
VAR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR6:=(VAR3+VAR4+VAR5)/3;
VAR7:=EMA(VAR6,5);
ZHIB: EMA(EMA(VAR3,5),5)*3, COLORSTICK;
VAR8:=IFELSE(VAR6<=-20,10,0);
VAR9:=HHV(VAR8,10);
STICKLINE(VAR8=10,20,10,COLORRED,0);
VARA:=IFELSE(VAR9 && CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:EMA(VAR7,5)*2,COLORGREEN;
D:EMA(K,5), COLORWHITE;
J:K*3-D*2, COLORYELLOW;
VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) && J>10;
DRAWTEXT(VARA=20,15,'底部');
STICKLINE((VARA=20),0,10,COLORWHITE,0);
VARC:=(ZIGZAG(CLOSE,5,1)>REF(ZIGZAG(CLOSE,5,1),1)) && (REF(ZIGZAG(CLOSE,5,1),1)<=REF(ZIGZAG(CLOSE,5,1),2)) && (REF(ZIGZAG
(CLOSE,5,1),2)<=REF(ZIGZAG(CLOSE,5,1),3));
VARD:=(ZIGZAG(CLOSE,5,1)<REF(ZIGZAG(CLOSE,5,1),1)) && (REF(ZIGZAG(CLOSE,5,1),1)>=REF(ZIGZAG(CLOSE,5,1),2)) && (REF(ZIGZAG
(CLOSE,5,1),2)>=REF(ZIGZAG(CLOSE,5,1),3));
STICKLINE((VARC=1),(-14),0,COLORMAGENTA,0);
DRAWTEXT((VARC=1),(-14),'買');
STICKLINE((VARD=1),14,0,COLORGREEN,0);
DRAWTEXT((VARD=1),18,'賣');
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=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);
VAR10:=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);
VAR11:=VARF<REF(VAR10,1) && VOL>REF(VOL,1) && CLOSE>REF(CLOSE,1);
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IFELSE(VAR13>=150 && VAR13<200 && VAR14>=150 && VAR14<200,10,0);
VAR16:=IFELSE(VAR13<=-150 && VAR13>-200 && VAR14<=-150 && VAR14>-200,-10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-ABS(VAR17);
VAR19:=IFELSE(VAR18<90,VAR18,100);
VAR1A:=IFELSE(VARE>0,VARE,0);
VAR1B:=IFELSE(VAR14>=200 && VAR13>=150,15,IFELSE(VAR14<=-200 && VAR13<=-150,-15,VAR16))+60;
VAR1C:=VAR1A>48 && VAR1B>60 && VAR19<100;

這個應該是飛狐的, "&&"通達信里應該是用and

閱讀全文

與在文華期貨的支撐點指標公式源碼相關的資料

熱點內容
電腦伺服器地址ip地址 瀏覽:823
對矩陣壓縮是為了 瀏覽:910
setfacl命令 瀏覽:172
linux子系統中斷 瀏覽:342
linux查看進程ps 瀏覽:224
知識庫系統php 瀏覽:623
小波變換壓縮圖像python 瀏覽:151
阿里巴巴程序員怎麼月入百萬 瀏覽:173
如何使用國外伺服器 瀏覽:188
燃燈者pdf 瀏覽:468
編譯器用數學嗎 瀏覽:7
圖形化apk反編譯工具 瀏覽:48
考勤表加密怎麼辦 瀏覽:735
arj壓縮與解壓批處理怎麼寫 瀏覽:658
php和大數據哪個好 瀏覽:930
未來最值得投資的加密貨幣 瀏覽:526
ascii碼是編譯的時候用嗎 瀏覽:782
壓縮機感應包可以通用嗎 瀏覽:413
方舟伺服器怎麼發布到搜索列表 瀏覽:271
xml防反編譯 瀏覽:242