以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://www.weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://www.weistock.com/bbs/list.asp?boardid=4) ---- 请教 如何求得连续亏损两次交易到现在的时间 (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=69645) |
-- 作者:qq代人发帖 -- 发布时间:2014/9/5 15:10:42 -- 请教 如何求得连续亏损两次交易到现在的时间 请教 如何求得连续亏损两次交易到现在的时间
|
-- 作者:jinzhe -- 发布时间:2014/9/5 15:13:37 -- variable:n=0; if 平仓条件 and 持仓判断 then begin 平仓语句; if numprofit(1)>=0 then n:=0; if numprofit(1)<0 then n:=n+1; end
周期:barslast(ref(n=1,1) and n=2)+1; |