老師麻煩增加 [文華財經]
-
咨詢內容:
? //顯示N天內大量紅藍K+大量高低顏色填充
K2:=SUMBARS(DAYBARPOS=1,15);//10日
VV2:="DAY$1$V";//日
HH2:="DAY$1$H";//日
LL2:="DAY$1$L";//日
OO2:="DAY$1$O";//日
CC2:="DAY$1$C";//日//K4:=SUMBARS(WEEKDAY<REF(WEEKDAY,1),15);//5周
//VV4:="WEEK$1$V";
//HH4:="WEEK$1$H";
//LL4:="WEEK$1$L";
//OO4:="WEEK$1$O";
//CC4:="WEEK$1$C";
//STICKLINE1(VALUEWHEN(VV2=HHV(VV2,K2),CC2>=OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2),4,0),RGB(170,170,170);//紅色填充
//STICKLINE1(VALUEWHEN(VV2=HHV(VV2,K2),CC2<OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2) ,4,0),RGB(170,170,170);//綠色填充
//STICKLINE1(ISLASTBAR&&VALUEWHEN(VV2=HHV(VV2,K2),CC2>=OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2),5,0),RGB(170,170,170);//紅色填充后段
//STICKLINE1(ISLASTBAR&&VALUEWHEN(VV2=HHV(VV2,K2),CC2<OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2),5,0),RGB(170,170,170);//綠色 填充后段QQ:=VALUEWHEN(VV2=HHV(VV2,K2),HH2)<>REF(VALUEWHEN(VV2=HHV(VV2,K2),HH2),1);
Q:=BACKSET(REFX(QQ=1,1)||ISLASTBAR,HHVBARS(V,BARSLAST(QQ=1)+1)+1);XX:CROSS(Q=1&&QQ,0.5)&&ISUP||CROSS(Q=1,0.5)&&ISUP,NODRAW;
YY:CROSS(Q=1&&QQ,0.5)&&ISDOWN||CROSS(Q=1,0.5)&&ISDOWN,NODRAW;
AX:BACKSET(ISLASTBAR,SUMBARS(XX||YY,1)),NODRAW;
STICKLINE1(AX,VALUEWHEN(XX&&AX ,H),VALUEWHEN(XX&&AX ,L),5,0),COLORRED;//前段填充顯示
STICKLINE1(AX,VALUEWHEN(YY&&AX,H),VALUEWHEN(YY&&AX ,L),5,0),COLORBLUE;//前段填充顯示
STICKLINE1(ISLASTBAR&&BARSLAST(XX)>BARSLAST(YY),VALUEWHEN(YY&&AX,H),VALUEWHEN(YY&&AX ,L),15,0),COLORBLUE;//后段填充顯示
STICKLINE1(ISLASTBAR&&BARSLAST(XX)<BARSLAST(YY),VALUEWHEN(XX&&AX,H),VALUEWHEN(XX&&AX ,L),15,0),COLORRED;//后段填充顯示
DRAWKLINE1(H,O,L,C);//K線顯示
老師麻煩把指標中的填充帶的K線用紅藍K持續顯示:出現紅色帶時,只要收盤價不破紅色帶下邊緣,就持續顯示紅K(上漲用空心紅K,下跌用實心紅K),如收盤價破紅色帶下邊緣就用藍K持續顯示(下跌用實心藍,上漲用空心藍),反之當出現藍色帶時只要收盤價不破藍色帶上邊緣,就持續顯示藍K(上漲用空心藍K,下跌用實心藍K),如收盤價破紅藍色帶上邊緣就用紅K持續顯示(下跌用實心紅,上漲用空心紅)謝謝老師!?
?來源:程序化99
-
文華技術人員:
參考:
K2:=SUMBARS(DAYBARPOS=1,15);//10日 VV2:="DAY$1$V";//日 HH2:="DAY$1$H";//日 LL2:="DAY$1$L";//日 OO2:="DAY$1$O";//日 CC2:="DAY$1$C";//日
//K4:=SUMBARS(WEEKDAY<REF(WEEKDAY,1),15);//5周 //VV4:="WEEK$1$V"; //HH4:="WEEK$1$H"; //LL4:="WEEK$1$L"; //OO4:="WEEK$1$O"; //CC4:="WEEK$1$C"; //STICKLINE1(VALUEWHEN(VV2=HHV(VV2,K2),CC2>=OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2),4,0),RGB(170,170,170);//紅色填充 //STICKLINE1(VALUEWHEN(VV2=HHV(VV2,K2),CC2<OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2) ,4,0),RGB(170,170,170);//綠色填充 //STICKLINE1(ISLASTBAR&&VALUEWHEN(VV2=HHV(VV2,K2),CC2>=OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2),5,0),RGB(170,170,170);//紅色填充后段 //STICKLINE1(ISLASTBAR&&VALUEWHEN(VV2=HHV(VV2,K2),CC2<OO2),VALUEWHEN(VV2=HHV(VV2,K2),HH2),VALUEWHEN(VV2=HHV(VV2,K2),LL2),5,0),RGB(170,170,170);//綠色 填充后段
QQ:=VALUEWHEN(VV2=HHV(VV2,K2),HH2)<>REF(VALUEWHEN(VV2=HHV(VV2,K2),HH2),1); Q:=BACKSET(REFX(QQ=1,1)||ISLASTBAR,HHVBARS(V,BARSLAST(QQ=1)+1)+1);
XX:CROSS(Q=1&&QQ,0.5)&&ISUP||CROSS(Q=1,0.5)&&ISUP,NODRAW; YY:CROSS(Q=1&&QQ,0.5)&&ISDOWN||CROSS(Q=1,0.5)&&ISDOWN,NODRAW; AX:BACKSET(ISLASTBAR,SUMBARS(XX||YY,1)),NODRAW; STICKLINE1(AX,VALUEWHEN(XX&&AX ,H),VALUEWHEN(XX&&AX ,L),5,0),COLORRED;//前段填充顯示 STICKLINE1(AX,VALUEWHEN(YY&&AX,H),VALUEWHEN(YY&&AX ,L),5,0),COLORBLUE;//前段填充顯示 STICKLINE1(ISLASTBAR&&BARSLAST(XX)>BARSLAST(YY),VALUEWHEN(YY&&AX,H),VALUEWHEN(YY&&AX ,L),15,0),COLORBLUE;//后段填充顯示 STICKLINE1(ISLASTBAR&&BARSLAST(XX)<BARSLAST(YY),VALUEWHEN(XX&&AX,H),VALUEWHEN(XX&&AX ,L),15,0),COLORRED;//后段填充顯示 DRAWKLINE1(H,O,L,C);//K線顯示
DRAWCOLORKLINE(C>VALUEWHEN(AX,VALUEWHEN(YY&&AX,H))&&(ISUP||ISEQUAL),COLORBLUE,1); DRAWCOLORKLINE(C>VALUEWHEN(AX,VALUEWHEN(YY&&AX,H))&&ISDOWN,COLORBLUE,0); DRAWCOLORKLINE(C<VALUEWHEN(AX,VALUEWHEN(YY&&AX,H))&&(ISUP||ISEQUAL),COLORRED,1); DRAWCOLORKLINE(C<VALUEWHEN(AX,VALUEWHEN(YY&&AX,H))&&ISDOWN,COLORRED,0);
DRAWCOLORKLINE(C>VALUEWHEN(AX,VALUEWHEN(XX&&AX ,L))&&(ISUP||ISEQUAL),COLORRED,1); DRAWCOLORKLINE(C>VALUEWHEN(AX,VALUEWHEN(XX&&AX ,L))&&ISDOWN,COLORRED,0); DRAWCOLORKLINE(C<VALUEWHEN(AX,VALUEWHEN(XX&&AX ,L))&&(ISUP||ISEQUAL),COLORBLUE,1); DRAWCOLORKLINE(C<VALUEWHEN(AX,VALUEWHEN(XX&&AX ,L))&&ISDOWN,COLORBLUE,0);
有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友
可聯系技術人員 QQ: 262069696 或微信號:cxh99cxh99 進行 有償收費 編寫!
(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關文章
-
沒有相關內容