{P:=10;}
趨勢:ZIG(3,P);
↑:TROUGHBARS(3,P,1),COLOR0000FF,NODRAW;
↓:PEAKBARS(3,P,1),COLOR00FF00,NODRAW;
低:IF(↑=0,C,IF(↓<↑,TROUGH(3,P,1),REF(TROUGH(3,P,1),1))),COLOR00FFFF,,POINTDOT;
高:IF(↓=0,C,IF(↑<↓,PEAK(3,P,1),REF(PEAK(3,P,1),1))),COLOR00FF00,,POINTDOT;
①:IF(↓<↑,REF(高,↑),REF(低,↓)),COLOR0000FF,NODRAW;
②:IF(↓<↑,REF(低,↓),REF(高,↑)),COLOR00FFFF,NODRAW;
③:IF(↓<↑,高,低),COLORFFFFFF,NODRAW;
④:②*③/①,COLOR00FF00,NODRAW;
漲%:IF(↑<↓,(C/低-1)*100,REF((C/低-1)*100,↓)),COLOR0000FF,NODRAW;
跌%:IF(↓<↑,(C/高-1)*100,REF((C/高-1)*100,↑)),COLORFF0000,NODRAW;
{以下設(shè)置主圖顯示方式}
上:IF(趨勢>REF(趨勢,1),趨勢,DRAWNULL),COLORRED,LINETHICK2;
下:IF(趨勢<REF(趨勢,1),趨勢,DRAWNULL),COLOR00FF00,LINETHICK2;
STICKLINE(↑=0,H*1.01,REF(高,1),0,0),COLOR00FF00;
STICKLINE(↓=0,L*0.99,REF(低,1),0,0),COLORFF00FF;
STICKLINE(BETWEEN(↑,0,6),低,低,3,0),COLOR00FFFF;
STICKLINE(BETWEEN(↓,0,6),高,高,3,0),COLOR00FF00;
DRAWTEXT(↓=0,趨勢*1.01,'←高'),COLOR0000FF;
DRAWTEXT(↑=0,趨勢,'←低'),COLORFFFFFF;
{以下設(shè)置自動(dòng)提示文字}
AA:=CONST(LLV(L,120));
DRAWTEXT(CURRBARSCOUNT=100,AA*1.02,'■提醒:①②③求④僅適用于趨勢穩(wěn)定的周期或波段!'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=100,AA*0.98,'■原理:相似漲(跌)幅===> ④÷③=②÷①'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=100,AA*0.94,'■推導(dǎo):★ ④=②×③÷① ★'),COLORFFFFFF;
聯(lián)系客服