飞狐神奇周期副图指标
源码
{神奇周期}
{参数 n 1 488 89 ; m 1 488 89}
da:=REF(DATE,BARSLAST( h=hhv(h,n))) ;
db:=REF(DATE,BARSLAST( L=LLv(L,m)));
对高±2:stickline(
between(BARSLAST(date=da ),6,10) or between(BARSLAST(date=da ),11,15) or
between(BARSLAST(date=da ),19,23) or between(BARSLAST(date=da ),32,36) or
between(BARSLAST(date=da ),53,57) or between(BARSLAST(date=da ),87,91) or
between(BARSLAST(date=da ),142,146) or between(BARSLAST(date=da ),231,235) or
between(BARSLAST(date=da ),375,379),
0,1,10,0) colorred;
对高:2*(
BARSLAST(date=da )=8 or BARSLAST(date=da )=13 or
BARSLAST(date=da )=21 or BARSLAST(date=da )=34 or
BARSLAST(date=da )=55 or BARSLAST(date=da )=89 or
BARSLAST(date=da )=144 or BARSLAST(date=da )=233 or
BARSLAST(date=da )=377) stick,coloryellow,linethick2;
对低±2:stickline(
between(BARSLAST(date=db ),6,10) or between(BARSLAST(date=db ),11,15) or
between(BARSLAST(date=db ),19,23) or between(BARSLAST(date=db ),32,36) or
between(BARSLAST(date=db ),53,57) or between(BARSLAST(date=db ),87,91) or
between(BARSLAST(date=db ),142,146) or between(BARSLAST(date=db ),231,235) or
between(BARSLAST(date=db ),375,379),
0,-1,10,0) colorgreen;
对低:0-2*(
BARSLAST(date=db )=8 or BARSLAST(date=db )=13 or
BARSLAST(date=db )=21 or BARSLAST(date=db )=34 or
BARSLAST(date=db )=55 or BARSLAST(date=db )=89 or
BARSLAST(date=db )=144 or BARSLAST(date=db )=233 or
BARSLAST(date=db )=377) stick,colorwhite,linethick2;
polyline(c>0,0) colorblue,linethick3;
DRAWTEXT(date=da ,1 ,'★' ) coloryellow;
DRAWTEXT(date=db ,1 ,'☆' ) colorwhite;