以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 这一单盈利了,下一单就不开仓,请问怎么写? (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=69994) |
-- 作者:幽幽 -- 发布时间:2014/9/15 15:41:45 -- 这一单盈利了,下一单就不开仓,请问怎么写? RT |
-- 作者:幽幽 -- 发布时间:2014/9/15 15:42:07 -- 然后再下一单继续开仓 |
-- 作者:jinzhe -- 发布时间:2014/9/15 15:56:38 -- variable:n=0; if 平仓条件 and 持仓判断 then begin 平仓语句; if numprofit(1)>0 then n:=1; end
if 开仓条件 and 持仓判断 and n=1 then begin n:=0; end
if 开仓条件 and 持仓判断 and n=0 then begin 开仓语句; end
|