beyond202104 发表于 2023-8-28 16:47:39

量学趋势主图123Q4(通达信公式 主图 源码 测试图)


{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;




千山落月坝 发表于 2024-1-13 03:40:04

感谢分享优质资源

关儿1 发表于 2024-1-30 07:07:20

thanks for the sharing!

心满琢言咳 发表于 2024-2-14 04:35:56

good!vevy good!

冬月小七 发表于 2024-2-16 21:24:24

路过,帮顶一下!
页: [1]
查看完整版本: 量学趋势主图123Q4(通达信公式 主图 源码 测试图)