你懂的主圖指標公式.副圖指標公式[通達信公式]
相關標簽:
?
?
原理解析:
?
?來源:程序化99( www.kzuj.com.cn )
源碼:
?
?
?
DRAWBAND(MA(CLOSE,5),RGB(200,150,200),MA(CLOSE,10),RGB(83,123,68));
DRAWKLINE(H,O,L,C);
狼上軌:REF(HHV(H,21),1),COLORGRAY;
中軌:REF((HHV(H,63)+LLV(L,63))/2,1),COLORYELLOW;
狼下軌:REF(LLV(L,126),1),COLORRED;
頂:=HHV(H,21);
底:=LLV(L,126);
H19:=底+(頂-底)*0.618;
H中:=底+(頂-底)*0.5;
H61:=底+(頂-底)*1.236;
起點H80:=底+(頂-底)*0.382;
【底】:REFDATE(底,DATE),COLORRED;
【0.618】:REFDATE(H19,DATE),COLORGREEN,POINTDOT;
【0.5】:REFDATE(H中,DATE),COLORWHITE,POINTDOT;
【1.236】:REFDATE(H61,DATE),COLORLIRED,POINTDOT;
【0.382】:REFDATE(起點H80,DATE),COLORBLUE;
【頂】:REFDATE(頂,DATE),COLORGREEN;
DRAWNUMBER(ISLASTBAR ,起點H80,起點H80),COLORRED;
{設置參數:N,1,100,10}
T1:=CONST(LLVBARS(LOW,10));
T1HIGH:=CONST(REF(HIGH,T1));
CC:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST(CURRBARSCOUNT>CC+T1 AND H>T1HIGH));
T2HIGH:=CONST(REF(HIGH,T2));
T3:=CONST(BARSLAST(CURRBARSCOUNT>CC+T2 AND HIGH>T2HIGH));
T3HIGH:=CONST(REF(HIGH,T3));
獵擊線:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK2,COLOR0000FF;
DRAWTEXT(ISLASTBAR, T3HIGH, '獵擊線')LINETHICK1,COLOR0000FF;
AABB:=CROSS(MA(C,3),MA(C,8)) AND MA(C,8)>REF(MA(C,8),1) ;
STICKLINE(AABB AND PERIOD>4,L,L*0.990,6,0),COLORRED;
AA:=起點;
BB:=終點;
CYC:=IF(C>900,(SUM(C,AA)-SUM(C,BB))/(AA-BB),(SUM(AMOUNT,AA)-SUM(AMOUNT,BB))/(SUM(VOL,AA)-SUM(VOL,BB))/100);
區間成本:CONST(CYC),NODRAW;
區間換手:(SUM(VOL,AA)-SUM(VOL,BB))/CAPITAL*100,NODRAW;
計算周期:AA-BB,NODRAW;
HH:=REFDATE(HHV(H,起點),DATE);
LL:=REFDATE(LLV(L,起點),DATE);
N1:=IF(PERIOD=7,1.05,IF(PERIOD=6,1.02,1.01));
N2:=IF(PERIOD=7,0.95,IF(PERIOD=6,0.98,0.99));
STICKLINE(CURRBARSCOUNT<=終點,區間成本*N1,區間成本*N2,5,0),COLOR808080;
STICKLINE(CURRBARSCOUNT<=終點,區間成本,區間成本,5,0),COLORWHITE;
STICKLINE(CURRBARSCOUNT=起點,HH,LL,0,-1),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=終點,HH,LL,0,-1),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=起點,LL,'起點'),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=終點,LL,'終點'),COLORWHITE;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
高區:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),0)),DRAWNULL),COLORRED,DOTLINE;
低區:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),0)),DRAWNULL),COLORMAGENTA,DOTLINE;
STICKLINE(CCI>=200 AND H>=高區,O,C,2,0),COLORGREEN;
STICKLINE(CCI<=100 AND L<=低區,O,C,2,0),COLORYELLOW;
參數N,1,100,10
M,1,100,5......起點0..9999.8;;終點0.9999.1下面是量
DRAWBAND(MA(VOL,5),RGB(155,50,50),MA(VOL,21),RGB(83,123,68));
WOL:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,WOL,0,3,-1),COLORFFFFFF;
VOLUME:VOL,VOLSTICK; V5:MA(VOLUME,5)COLORWHITE; V10:MA(VOLUME,10)COLORYELLOW;
V21:MA(VOLUME,21)COLORGREEN; VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主買:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT;
主賣:IF(CLOSE>OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,VAR1*(HIGH-LOW),VOL/2)),COLORYELLOW,POINTDOT;
N1:=21;
頂:=HHV(V,120);
底:=LLV(V,120);
H19:=底+(頂-底)*0.618;
H中:=底+(頂-底)*0.5;
H61:=底+(頂-底)*1.236;
起點H80:=底+(頂-底)*0.382;
【底】:REFDATE(底,DATE),COLORGREEN;
【0.618】:REFDATE(H19,DATE),COLORGREEN,POINTDOT;
【0.5】:REFDATE(H中,DATE),COLORWHITE,POINTDOT;
【1.236】:REFDATE(H61,DATE),COLORLIRED,POINTDOT;
【0.382】:REFDATE(起點H80,DATE),COLORBLUE;
【頂】:REFDATE(頂,DATE),COLORCYAN;
倍量柱:=V/REF(V,1)>1.89;
STICKLINE(倍量柱 AND C>O,V,V/2,1,0)COLORYELLOW;
?
公式導入教程: 【通達信公式源碼導入方法教程】 【同花順公式源碼導入方法教程】 【大智慧新一代公式源碼導入方法教程】
?
有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友
可聯系技術人員 QQ: 262069696 或微信:cxhjy888 進行 有償收費 編寫!(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關文章
-
沒有相關內容