通达信高抛低吸主图公式

2016-02-16 11:04:00来源:本站整理浏览:315

通达信高抛低吸主图公式

源码

N8:=STRCAT(CON2STR(YEAR,0),' 年 ');

Y8:=STRCAT(CON2STR(MONTH,0),' 月 ');

R8:=STRCAT(CON2STR(DAY,0),' 日 ');

N:=120;

K:=BARSLAST(CURRBARSCOUNT=N);

GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));{高点}

DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));{低点}

KJ:=GD-DD;{高低点差值=分区高度}

GD4:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL);

低:IF(CURRBARSCOUNT<=N/30,DD,DRAWNULL),COLORFFFF00;

高:IF(CURRBARSCOUNT<=N/30,GD,DRAWNULL),COLOR00FFFF;

支撑:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.191,DRAWNULL),COLOR00FFFF;

强势: IF(CURRBARSCOUNT<=N/30,DD+KJ*0.382,DRAWNULL),COLORFF00FF;

突破:IF(CURRBARSCOUNT<=N/30,DD+KJ/2,DRAWNULL),COLOR0000FF;

警示:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.618,DRAWNULL),COLOR00FFFF;

压力:IF(CURRBARSCOUNT<=N/30,DD+KJ*0.809,DRAWNULL),COLOR00FF00;

低涨:IF(CURRBARSCOUNT<=N/30,(C/LLV(LOW,K)-1)*100,DRAWNULL),COLOR0000FF,NODRAW;

天数:BARSLAST(L=DD),COLORCYAN,NODRAW;

今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLORCC3299,NODRAW;

顶点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,DOTLINE;

低点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAGENTA,DOTLINE;

STICKLINE(CCI>=200 AND H>=顶点,O,C,3,0),COLORBLUE;

STICKLINE(CCI<=100 AND L<=低点,O,C,3,0),COLORYELLOW;

DRAWBAND(高,RGB(200,200,0),压力,RGB(0,0,0));

DRAWBAND(压力,RGB(0,190,0),警示,RGB(0,0,0));

DRAWBAND(警示,RGB(220,120,0),突破,RGB(0,0,0));

DRAWBAND(突破,RGB(120,0,120),强势,RGB(0,0,0));

DRAWBAND(强势,RGB(120, 0,0),支撑,RGB(0,0,0));

DRAWBAND(支撑,RGB(80,80,80),低,RGB(0,0,0));

STICKLINE(CURRBARSCOUNT=N/30,GD,DD,0,0),COLORGREEN;

STICKLINE(CURRBARSCOUNT=1,GD,DD,0,0),COLORGREEN;

STICKLINE(CURRBARSCOUNT<=N/30,支撑,支撑,4,0),COLORFF00FF;

STICKLINE(CURRBARSCOUNT<=N/30,强势,强势,4,0),COLORFF00FF;

STICKLINE(CURRBARSCOUNT<=N/30,突破,突破,4,0),COLORABABAB;

STICKLINE(CURRBARSCOUNT<=N/30,警示,警示,4,0),COLOR00FFFF;

STICKLINE(CURRBARSCOUNT<=N/30,压力,压力,4,0),COLOR00FFFF;

DRAWTEXT(CURRBARSCOUNT=1,压力,'0.809'),COLOR00FFFF;

DRAWTEXT(CURRBARSCOUNT=1,警示,'0.618'),COLOR00FFFF;

DRAWTEXT(CURRBARSCOUNT=1,突破,'0.500'),COLORFFFFFF;

DRAWTEXT(CURRBARSCOUNT=1,强势,'0.382'),COLOR00FFFF;

DRAWTEXT(CURRBARSCOUNT=1,支撑,'0.191'),COLOR00FFFF;

VA2:=(CLOSE+HIGH+LOW)/(3);

VA3:=(EMA(VA2,10));

VA4:=(REF(VA3,1));

SJ8:=STRCAT(STRCAT(N8,Y8), R8);

STICKLINE((VA3>VA4),VA3,VA4,3,0),COLORYELLOW;

STICKLINE((VA3<VA4),VA3,VA4,3,0),COLORGREEN;

MA1:=MA(CLOSE,5);

MA2:=MA(CLOSE,10);

MA3:=MA(CLOSE,20);

MA4:=MA(CLOSE,60);

VAR1:=HHV(HIGH,25);

VAR2:=LLV(LOW,25);

VAR3:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,20);

VAR4:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,5);

VAR5:=CROSS(VAR4,VAR3);

DRAWBMP(CROSS(VAR3,VAR4),H*1.04,'SELL1');

DRAWBMP(CROSS(VAR4,VAR3),L*0.99,'BUY1');

DRAWTEXT_FIX(C>0,0.88,0,0,SJ8),COLOR00FFFF;

STICKLINE(C<O,O,C,3,0),COLORFF6600;

STICKLINE(C<O,O,C,2,0),COLORFF9900;

STICKLINE(C<O,O,C,1.2,0),COLORFFCC00;

STICKLINE(C<O,O,C,0.2,0),COLORCYAN;

STICKLINE(C>O,O,C,3,0),COLOR000099;

STICKLINE(C>O,O,C,2,0),COLOR0000CC;

STICKLINE(C>O,O,C,1.3,0),COLOR0000FF;

STICKLINE(C>O,O,C,0.3,0),COLORCC66FF;




 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式