|
楼主 |
发表于 2011-9-20 00:05:34
|
显示全部楼层
阿布依建議加入陰陽燭選項:
即
長上影陰燭 先沽
長下影陽燭 先楂
{長上下影買賣 20110919}
nPlan:=Input("Leg's Level [1/2]=1, [2/3]=2",1,2,2);
nWBcandle:=Input("Leg's Candle White / Black On=1, Off=0",0,1,1);
nCanPnt:=Input("High - Low >= Points:",1,1000,30);
nConf:=Input("After confirmed-[On=1,Off=0]:",0,1,1);
nVol:=Input("Volume:",1,9999,1);
nDirect:=Input("Up&Dn=0, Up=1, Dn=2:",0,2,0);
{------- PLan 1 = 1/2 長影方法 -----------------}
upLegL1:= Abs(C > (H-L)/2+L) AND Abs(O > (H-L)/2+L) AND V >= nVol;
upLegL2:= Abs(C > (H-L)/3*2+L) AND Abs(O > (H-L)/3*2+L)AND V >= nVol;
dnLegL1:= Abs(C < (H-L)/2+L) AND Abs(O < (H-L)/2+L) AND V >= nVol;
dnLegL2:= Abs(C < (H-L)/3*1+L) AND Abs(O < (H-L)/3*1+L)AND V >= nVol;
nBuy2:=If(nPlan=1, upLegL1, upLegL2 ) AND Abs(H-L) >= nCanPnt and C >= O ;
nSell2:=If(nPlan=1, dnLegL1, dnLegL2 ) AND Abs(H-L) >= nCanPnt and O >= C ;
nBuy1:=if( nWBcandle=1, nBuy2 , If(nPlan=1, upLegL1, upLegL2 ) AND Abs(H-L) >= nCanPnt );
nSell1:=if( nWBcandle=1, nSell2 , If(nPlan=1, dnLegL1, dnLegL2 ) AND Abs(H-L) >= nCanPnt ) ;
{}
{方法}
BuyMethod:= If(nConf=0, nBuy1 , Ref( nBuy1 ,-1) AND C >=Ref(L,-1) );
SellMethod:= If(nConf=0, nSell1, Ref( nSell1 ,-1) AND C <= Ref(H,-1) );
{}
buy:= If( nDirect=0 OR nDirect=1 , BuyMethod,0);
sell:= If( nDirect=0 OR nDirect=2 , SellMethod,0);
{}
{}
RetVal:=If(buy=1,0.3, If(Sell=1,0.03,0.00));
Retval;
nVol/100000;
nCanPnt/100000;
nConf/100000;
nDirect/100000;
C/100000
附件為原碼檔案:
長上下影買賣 20110919.txt
(1.4 KB, 下载次数: 2196)
及可用MS import 檔案:
BP-AUTO9 20110919.rar
(68.66 KB, 下载次数: 2125)
你地慢用...我不負責測試成效.....
|
|