比如 最近10根K线之内 (0-10),和 最近10根K线之前 10根K线(10-20)
VARIABLE:s=0;
macd:stkindi('','macd.MACD1',0,1,0);
s:=macd;
l1:=llv(l,10); //B
l2:=ref(llv(l,10),10);//A
Bbars:LLVBARS(l ,10);//B位置
Abars:ref(LLVBARS(l,10),10);//A位置
Bmacd:ref(s,Bbars);//b点macd
Amacd:ref(s,Abars);//a点macd
if l1>l2 and Amacd<BBARS
then
begin
DRAWICON(1 ,l , 1);//
end