macd顶底背离dif线背离共振副图金叉选股 股票指标炒股软件公式
28
2024 / 11 / 20
2023-01-29 16:25:23 通达信指标网
{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;
{以下设置主图显示方式}
上: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;
{以下设置自动提示文字}
AA:=CONST(LLV(L,120));
DRAWTEXT(CURRBARSCOUNT=100,AA*1.02,'■提醒:①②③求④仅适用于趋势稳定的周期或波段!'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=100,AA*0.98,'■原理:相似涨(跌)幅===> ④÷③=②÷①'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=100,AA*0.94,'■推导:★ ④=②×③÷① ★'),COLORFFFFFF;
原文链接:https://www.tdxzb.com/?id=981
本文版权:如无特别标注,本站文章均为原创。