通达信中主图上怎么把高点低点 也就是颈线 怎么用公式自动画出来 谢谢 求公式
发布网友
发布时间:2022-05-08 13:24
我来回答
共1个回答
热心网友
时间:2024-01-24 14:50
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLOREE00EE;
年:MA(CLOSE,22),LINETHICK2,COLORWHITE;
日:=150;昨前:=3;
高1:=REF(HHV(H,日),昨前);
低1:=REF(LLV(L,日),昨前);
H1:=高1-(高1-低1)*0.191;
H2:=高1-(高1-低1)*0.382;
H3:=高1-(高1-低1)*0.5;
H4:=高1-(高1-低1)*0.618;
H5:=高1-(高1-低1)*0.809;
顶:REFDATE(高1,DATE),COLORRED;
一0.809:REFDATE(H1,DATE),COLORYELLOW;
二0.618:REFDATE(H2,DATE),COLORMAGENTA;
三0.500:REFDATE(H3,DATE),COLORWHITE;
四0.382:REFDATE(H4,DATE),COLORGREEN;
五0.191:REFDATE(H5,DATE),COLORYELLOW;
低:REFDATE(低1,DATE),COLORRED;
VAR31:=HHVBARS(ZIG(3, 19)>REF(ZIG(3,19),1)
AND REF(ZIG(3,19), 1)<REF(ZIG(3,19), 2),0);
STICKLINE(VAR31=2,L*0.95,L*0.98,8,0),COLOR0000FF;
DRAWTEXT(VAR31=2,L*0.95,'3天'),COLORYELLOW;
STICKLINE(VAR31=4,H*1.05,H*1.02,8,0),COLOR9966FF;
DRAWTEXT(VAR31=4,H*1.06,'5天'),COLORYELLOW;
STICKLINE(VAR31=7,L*0.95,L*0.98,8,0),COLOR00FFFF;
DRAWTEXT(VAR31=7,L*0.95,'8天'),COLORYELLOW;
STICKLINE(VAR31=12,H*1.05,H*1.02,8,0),COLORFF33FF;
DRAWTEXT(VAR31=12,H*1.06,'13天'),COLORYELLOW;
STICKLINE(VAR31=20,L*0.95,L*0.98,8,0),COLOR0066FF;
DRAWTEXT(VAR31=20,L*0.95,'21天'),COLORYELLOW;
STICKLINE(VAR31=33,H*1.05,H*1.02,8,0),COLORFFFF00;
DRAWTEXT(VAR31=33,H*1.06,'34天'),COLORYELLOW;
STICKLINE(VAR31=54,L*0.95,L*0.98,8,0),COLOR006600;
DRAWTEXT(VAR31=54,L*0.95,'55天'),COLORYELLOW;
STICKLINE(VAR31=88,H*1.05,H*1.02,8,0),COLOR00FF00;
DRAWTEXT(VAR31=88,H*1.06,'89天'),COLORYELLOW;
STICKLINE(VAR31=143,L*0.95,L*0.98,8,0),COLORCCFFFF;
DRAWTEXT(VAR31=143,L*0.95,'144天'),COLORYELLOW;
STICKLINE(VAR31=232 ,H*1.05,H*1.02,8,0),COLORFF0033;
DRAWTEXT(VAR31=232,H*1.06,'233天'),COLORYELLOW;
STICKLINE(VAR31=376,L*0.95,L*0.98,8,0),COLORFF9966;
DRAWTEXT(VAR31=376,L*0.95,'377天'),COLORYELLOW;
这是黄金分割的主图