|
|

楼主 |
发表于 2005-10-8 00:59
|
显示全部楼层
送大家一个主图公式,上涨和下跌的顾比倒数线.不要谢我,要谢就谢南客老师.
input:p1(10,2,100),p2(10,2,100);
bh:=peakbars(4,p1,1)+1;
bll:=llv(low,bh);
btj1:=bll=low and (bll<ref(bll,1) or bh=1);
bts:=sumbars(btj1,3)-1;
btj:=troughbars(4,p1,1)=0 and bts<=bh;
drawicon(btj,low,10); //最后1根参考K线,用小红点表示
drawsl(btj,ref(high,bts),0,bts,1),colorred; //短横线标示参考价
bl:=barslast(btj);
btj_2:=close>ref(ref(high,bts),bl);
drawicon(count(btj_2,bl+1)=1 and btj_2,c,4); //向上的箭头表示介入点
买点:if(btj,ref(high,bts),0),linethick0;
sl:=troughbars(4,p2,1)+1;
shh:=HHV(HIGH,sl);
stj1:=shh=HIGH and (shh>ref(shh,1) or sl=1);
sts:=sumbars(stj1,3)-1;
stj:=peakbars(4,p2,1)=0 and sts<=sl;//?ts>ph
drawicon(stj,HIGH,11); //最后1根参考K线,用小掳点表示
drawsl(stj,ref(LOW,sts),0,sts,1),colorgreen; //短横线标示参考价
sh:=barslast(stj);
stj_2:=close<ref(ref(LOW,sts),sh);
drawicon(count(stj_2,sh+1)=1 and stj_2,c,5); //向下的箭头表示出局点
卖点:if(stj,ref(low,sts),0),linethick0; |
|
|