|
本帖最后由 贝尔哥力士 于 2011-5-22 01:31 编辑
来源 网络
作者:梦想田园生活 ?
文华-盈利百分比回调止损
//第一次多头止损,数字为盈利值, 可修改为百分比;
1STBUYPRICE:=VALUEWHEN(1STDTJC,C);
1STDTDAYS:=BA-VALUEWHEN(1STDTJC,BA);
1STDTYL:=IFELSE(1STDTDAYS=0,0,HHV(C-1STBUYPRICE,1STDTDAYS));
1STDTZS01:= 1STBUYPRICE-80;
1STDTZS02:=IFELSE(1STDTYL>100,1STBUYPRICE+1STDTYL*0.40,1STDTZS01);
1STDTZS03:=IFELSE(1STDTYL>200,1STBUYPRICE+1STDTYL*0.65,1STDTZS02);
1STDTZS04:=IFELSE(1STDTYL>300,1STBUYPRICE+1STDTYL*0.70,1STDTZS03);
1STDTZS05:=IFELSE(1STDTYL>400,1STBUYPRICE+1STDTYL*0.75,1STDTZS04);
1STDTZS06:=IFELSE(1STDTYL>500,1STBUYPRICE+1STDTYL*0.80,1STDTZS05);
DTS:=1STDTZS06;
DTPCZS:=(L<=DTS)&&(BA<>VALUEWHEN(1STDTJC,BA));//第一次空头止损
1STSALEPRICE:=VALUEWHEN(1STKTJC,C);
1STKTDAYS:=BA-VALUEWHEN(1STKTJC,BA);
1STKTYL:=IFELSE(1STKTDAYS=0,0,HHV(1STSALEPRICE-C,1STKTDAYS));
1STKTZS01:=1STSALEPRICE+80;
1STKTZS02:=IFELSE(1STKTYL>100,1STSALEPRICE-1STKTYL*0.40,1STKTZS01);
1STKTZS03:=IFELSE(1STKTYL>200,1STSALEPRICE-1STKTYL*0.65,1STKTZS02);
1STKTZS04:=IFELSE(1STKTYL>300,1STSALEPRICE-1STKTYL*0.70,1STKTZS03);
1STKTZS05:=IFELSE(1STKTYL>400,1STSALEPRICE-1STKTYL*0.75,1STKTZS04);
1STKTZS06:=IFELSE(1STKTYL>500,1STSALEPRICE-1STKTYL*0.80,1STKTZS05);
请参考
|
|