- variable:sj=1150605,fc=close,fo=open,fh=high,fl=low;//记义一些常量$ _' n0 U- s* l. v) |
- d0:=barssince(date>=sj);//从给定的时间到当前的周期
5 f8 n8 o+ S- Z( N$ |3 E* V - d1:BARSLAST(low=LLV(L,d0))+1;//周期内到达最低点的周期数
* {, ?' t- Y1 W6 _# i- h1 f - g1:barslast(high=hhv(h,d0))+1;//周期内到达最高点的周期数' ~* x& Y! h* M) D, U
- qs:if(d1[datacount]>g1[datacount],1,0),linethick0;//趋势向上为1,向下为0" j$ H6 [0 q+ S$ d" f6 t8 M
- dz:fl[datacount-d1[datacount]+1];//低点值
" H) T" |1 x. [2 f6 g8 Y) M6 r5 w2 F - gz:fh[datacount-g1[datacount]+1];//高点值
复制代码 |