通达信公式指标源码:提升准确率缠论主图

时间:2019-09-09 09:58 文章来源:无道配资 点击次数::

原文标题:通达信公式指标源码:提升准确率缠论主图


通达信公式指标源码:提升准确率缠论主图 布林:=1; 均线:=1; M1:=5; M2:=13; M3:=21; {箱体} TC1S:=IF(H=HHV(H,48),H,DRAWNULL); TC2S:=CONST(BARSLAST(TC1S=H))+1; UPPERS:=CONST(IF(TC2S=1,H,REF(H,TC2S-1))); BC1

通达信公式指标源码:提升准确率缠论主图

复星医药600196股票最新价格

布林:=1;

均线:=1;

M1:=5;

M2:=13;

M3:=21;

{箱体}

TC1S:=IF(H=HHV(H,48),H,DRAWNULL);

TC2S:=CONST(BARSLAST(TC1S=H))+1;

UPPERS:=CONST(IF(TC2S=1,H,REF(H,TC2S-1)));

BC1S:=IF(L=LLV(L,48),L,DRAWNULL);

BC2S:=CONST(BARSLAST(BC1S=L))+1;

LOWERS:=CONST(IF(BC2S=1,L,REF(L,BC2S-1)));

LPS:=CURRBARSCOUNT<=BC2S AND L=LOWERS;

HPS:=CURRBARSCOUNT<=TC2S AND H=UPPERS;

AB1S:=EMA(((2*C+H+L)/4-LLV(LOW,30))/

(HHV(HIGH,30)-LLV(LOW,30))*100,8);

BA1S:=EMA(AB1S,5);

上轨:=REFDATE(REF(HHV(MAX(C,O),96),5),DATE);

下轨:=REFDATE(REF(LLV(MIN(C,O),96),5),DATE);

中轨:=((上轨)+(下轨))/2;

YXHX:=DATE>=REF(DATE,BARSLAST(IF(BC2S>TC2S,LPS,HPS)));

上沿:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,上轨,上轨),COLOR555555,LINETHICK2;

中枢:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,中轨,中轨),COLOR555555,LINETHICK2;

下沿:IF(AB1S>0 AND AB1S-BA1S<=0 AND YXHX,下轨,下轨),COLOR555555,LINETHICK2;

{三K线}

三K线:=1;

DG:=MAX(MAX(REFX(L,1),REFX(L,2)),REFX(L,3));

GD:=MIN(MIN(REFX(H,1),REFX(H,2)),REFX(H,3));

AA11:=(DG+GD)/2;

A11:=AA11>REFX(L,3) AND REFX(L,2)< AA11 AND REFX(L,1) <AA11 ;

A21:=FILTER(A11,BARSLAST(A11)+2);

A41:=A11 AND A21;

A51:=IF(REF(A41,1),H,0),NODRAW;

STICKLINE(三K线=1 && REF(A41,2),REF(GD,2),REF(DG,2),13,-1),COLORMAGENTA;

DRAWKLINE(H,O,L,C);

{峰谷}

峰谷:=1;

PA:=10;

PB:=REF(HIGH,PA)=HHV(HIGH,2*PA+1);

PC:=FILTER(PB,PA);

PD:=BACKSET(PC,PA+1);

PE:=FILTER(PD,PA);{高点}

峰线:(REF(HIGH,BARSLAST(PE)))*峰谷,COLORRED,POINTDOT,LINETHICK2;

AA21:=REF(LOW,PA)=LLV(LOW,2*PA+1);

BB21:=FILTER(AA21,PA);

CC21:=BACKSET(BB21,PA+1);

DD21:=FILTER(CC21,PA);{低点}

谷线:(REF(LOW,BARSLAST(DD21)))*峰谷,COLORGREEN,POINTDOT,LINETHICK2;

{三角形中枢}

时间:=4;

A:=H=HHV(H,时间*5) AND HHV(H,时间*5)>REF(HHV(H,时间*5),1);

B:=L=LLV(L,时间*5) AND LLV(L,时间*5)<REF(LLV(L,时间*5),1);

CCA:DRAWLINE(A,H,B,L,0),COLORGREEN,LINETHICK2;

CCB:DRAWLINE(B,L,A,H,0),COLORRED,LINETHICK2;

N:=(0,1,1);

{缠论高低点}

局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);

局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);

局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);

局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);

局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);

局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);

本文由无道配资整理编辑发布,地址:http://wudaoseo.com/1509.html,转载请注明出处!

相关内容