macd:stkindi('','macd.macd1',0,17,-1); upper:stkindi('','boll.upper',0,17,-1); lower:stkindi('','boll.lower',0,17,-1); FILLRGN(macd>0 ,upper ,lower , colorred); 涂红色的范围为信号出现后的下个3分钟,怎么解决?上面的代码是只要MACD>0都是红色的 |
VARIABLE:n=0,x=0;
MID: MA(CLOSE,M);//布林中轨
UPPER: MID + K*STD(CLOSE,M);//布林上轨
LOWER: MID - K*STD(CLOSE,M);//布林下轨
macd:stkindi('','macd.macd1',0,17,-1);
if macd>0 then begin
n:=n+1;
x:=1;
end
if macd<0 then begin
n:=0;
x:=0;
end
FILLRGN(macd>0 and n>=1 and n<=6 and x=1 ,upper ,lower , colorred);