需要注意加油站是调用未来函数BACKSET显示的结果,条件连续5天成立会在5天前的位置显示信号,
当信号出现时一般都会在次日(信号位置后第6天)大幅回调,根据5天的涨幅判断是否抢反弹。
Input:N1(7,1,30);
VAR0:SMA(MAX(C-REF(C,1),0),N1,1)/SMA(ABS(C-REF(C,1)),N1,1)*100,COLORYELLOW;
VAR1:HHV(VAR0,N1),COLORGREEN;
VAR2:LLV(VAR0,N1),COLORRED;
FILLRGN(VAR0,VAR1,VAR0 VAR1,RGB(0,255,0));
FILLRGN(VAR0,VAR2,VAR0 VAR2,RGB(255,0,0));
stickline(VAR2=REF(VAR2,1) AND REF(VAR2,1) REF(VAR2,2),VAR2,0,8,0),colorred;
stickline(VAR1=REF(VAR1,1) AND REF(VAR1,1) REF(VAR1,2),VAR2,0,8,0),colorgreen;
RSV1:=SMA(VAR1,7,1);
RSV2:=SMA(VAR2,7,1);
STICKLINE(C REF(C,1),RSV1,RSV2,1,0),COLORYELLOW;
STICKLINE(C REF(C,1),RSV1,RSV2,1,0),COLORBLUE;
STICKLINE(C=REF(C,1),RSV1,RSV2,1,0),COLORMAGENTA;
加油站:BACKSET(L/REF(L,5) =1.15,5) AND COUNT(BACKSET(L/REF(L,5) =1.15,5),5)=1;
DRAWICON(加油站=1,VAR1+(VAR1-VAR2)/2,15);