以下是做T乾坤眼 分时波段(分时指标)(无源码的请下载附件导入)
{做T乾坤眼}
{分时波段}
日:=500;昨前:=60;
高:=REF(HHV(H,日),昨前);
低:=REF(LLV(L,日),昨前);
H1:=高-(高-低)*1;
H2:=高-(高-低)*0.91;
H3:=高-(高-低)*0.85;
H4:=高-(高-低)*0.809;
H5:=高-(高-低)*0.777;
H6:=高-(高-低)*0.707;
H7:=高-(高-低)*0.666;
H8:=高-(高-低)*0.618;
H9:=高-(高-低)*0.563;
H10:=高-(高-低)*0.5;
H11:=高-(高-低)*0.424;
H12:=高-(高-低)*0.382;
H13:=高-(高-低)*0.309;
H14:=高-(高-低)*0.25;
H15:=高-(高-低)*0.191;
H16:=高-(高-低)*0.1375;
H17:=高-(高-低)*0.0807;
一:REFDATE(H2,DATE)POINTDOT,COLORLIRED;
二:=REFDATE(H3,DATE),COLORYELLOW;
三:=REFDATE(H4,DATE),COLORLIBLUE;
四:=REFDATE(H5,DATE),COLORLIRED;
五:=REFDATE(H6,DATE),COLORYELLOW;
六:=REFDATE(H7,DATE),COLORLIBLUE;
七:=REFDATE(H8,DATE),COLORLIRED;
八:=REFDATE(H9,DATE),COLORYELLOW;
九:=REFDATE(H10,DATE),COLORLIBLUE;
十:=REFDATE(H11,DATE),COLORLIRED;
十一:=REFDATE(H12,DATE),COLORYELLOW;
十二:=REFDATE(H13,DATE),COLORLIBLUE;
十三:=REFDATE(H14,DATE),COLORLIRED;
十四:=REFDATE(H15,DATE),COLORYELLOW;
十五:=REFDATE(H16,DATE),COLORLIBLUE;
十六:REFDATE(H17,DATE)POINTDOT,COLOR00FF00;
底:REFDATE(H1,DATE)DOTLINE,COLOR3A3A3A;
顶:REFDATE(高,DATE)DOTLINE,COLOR3A3A3A;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
买:=CROSS(C,一);
卖:=CROSS(十六,C);
DRAWICON(买,底,34);
DRAWICON(卖,顶,35);
最新:C,LINETHICK9,COLORFFFF00;
IF(C>=REF(C,1),C,DRAWNULL),LINETHICK9,COLORRED;
AA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));
BB:=BETWEEN(C/AA,C+H,C-H);
DRAWICON(ISLASTBAR AND C>REF(C,1),C,1);
DRAWICON(ISLASTBAR AND C<REF(C,1),C,2);
A1:=(VOL/CLOSE)/3;
A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0);
A5:=SUM((IF(((A1<40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((BARSTATUS=2),((100*A2)/A6),0);
A8:=((IF((BARSTATUS=2),((100*A3)/A6),0)));
A9:=((IF((BARSTATUS=2),((100*A4)/A6),0)));
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0)));
机构买盘:=(A2),LINETHICK2;
机构卖盘:=(A3),LINETHICK2;
散户买盘:=(A4);
散户卖盘:=(A5);
DRAWTEXT_FIX(1,0.100,1-0.05,0,STRCAT(STRCAT('★ 机构买盘 ',CON2STR(机构买盘,2)),'万')),COLOR80FFFF;
DRAWTEXT_FIX(1,0.320,1-0.05,0,STRCAT(STRCAT(' 机构卖盘 ',CON2STR(机构卖盘,2)),'万')),COLOR80FFFF;
DRAWTEXT_FIX(1,0.570,1-0.05,0,STRCAT(STRCAT('★ 散户买盘 ',CON2STR(散户买盘,2)),'万')),COLOR80FFFF;
DRAWTEXT_FIX(1,0.800,1-0.05,0,STRCAT(STRCAT(' 散户卖盘 ',CON2STR(散户卖盘,2)),'万')),COLOR80FFFF;
FSHORT:=30;
FLONG:=60;
乾坤线:EMA(CLOSE,FLONG),COLORYELLOW;
操盘线:=EMA(CLOSE,FSHORT);
多线:IFF(操盘线>乾坤线,操盘线 ,DRAWNULL)CIRCLEDOT ,COLORFF00FF,LINETHICK9;
空线:IFF(操盘线<=乾坤线,操盘线,DRAWNULL)CIRCLEDOT ,COLOR00FF00,LINETHICK9;
买信号:=REF(操盘线,1)<=REF(乾坤线,1) AND 操盘线>乾坤线;
卖信号:=REF(操盘线,1)>=REF(乾坤线,1) AND 操盘线<乾坤线;
DRAWICON(买信号,乾坤线,1);
DRAWICON(卖信号,操盘线,2);
73588091.jpg
|