以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 求助语句毛病 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=34057) |
-- 作者:versus11 -- 发布时间:2012/12/26 15:36:46 -- 求助语句毛病 DY;=h-l if holding>0 and LONG and (c-ENTERPRICE)>DY then sell(holding>0,holding/2,MARKET); if holding>0 and LONG and (c-enterprice)>DY*2 then sell(holding>0,0.MARKFT); 语句在执行过程没有体现2倍DY的价格 在执行过程中会一直开多平多。我只想日内开一次仓。
|
-- 作者:jinzhe -- 发布时间:2012/12/26 15:49:05 -- 那么就是DY设定的价格不合理,改成其他的 每天开一次仓,就需要用全局变量来限定
variable:a=0; if 条件 and a=0 then begin buy; a:=1; end
if time=090100 then a:=0;
|