以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  请教止损的模型编写  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=6959)

--  作者:threefootcat
--  发布时间:2011/6/22 23:26:21
--  请教止损的模型编写


BK :=CLOSE>B AND TIME<145500 AND TIME>090000; 
SP :=TIME=145500 ;


BUY(tt0 and BK and  holding=0,20%,market);
SELL(tt0 and SP and holding>0,holding,market); {145500分止损操作}
SELL(tt0 and holding>0,holding,Stopr,HHV(H,ENTERBARS)-NS); {从最高价回落NS,止损操作}

可是在图形上显示 ,开仓后就马上平仓,不知需要修改什么地方 


--  作者:王锋
--  发布时间:2011/6/22 23:33:48
--  
SP :=TIME=145500 ; 这不是金字塔的语法结构,请仔细看看这句话到底错在哪里
--  作者:threefootcat
--  发布时间:2011/6/23 18:55:21
--  

BUY(tt0 and BK and  holding=0,20%,market);
SELL(tt0 and SP and holding>0,holding,market); {145500分止损操作}
SELL(tt0 and holding>0,holding,Stopr,HHV(H,ENTERBARS)-NS); {从最高价回落NS,止损操作}

谢谢您的回答,可是如果我取消 Stopr,HHV(H,ENTERBARS)-NS 程序是可以正确执行的,应该还是这句话出错了


--  作者:王锋
--  发布时间:2011/6/23 19:08:26
--  

请贴出完整的公式代码,我们帮你看看