以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  上次赢利差大于100点,本次开仓后止损由原来正常的6点改为20点止损  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=57200)

--  作者:ok
--  发布时间:2013/10/1 19:21:38
--  上次赢利差大于100点,本次开仓后止损由原来正常的6点改为20点止损
老师,若股指上次赢利差大于100点,本次开仓后止损由原来正常的6点改为20点止损,而原来正常的6点止损条件不变
。如何写,谢谢

if holding>0 and o<=enterprice-6   then begin 
 多单止损:sell(1,1,limitr,o);


--  作者:jinzhe
--  发布时间:2013/10/8 9:14:07
--  

variable:zhisun=6;

if ref(平仓条件,1) and holding=0 and ref(holding,1)>0 and ref(openprofit,1)>100*mindiff*multiplier then zhisun:=20;

 

if zhisun=20 and holding<>0 and enterprice-c>zhisun*mindiff then begin

 sell(1,0,limitr,o);

 zhisun:=6;

end


--  作者:ok
--  发布时间:2013/10/9 10:49:25
--  
谢谢老师!