以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- [求助]日内每天第一笔交易亏损X (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=68930) |
-- 作者:wzywzy292 -- 发布时间:2014/8/19 15:23:50 -- [求助]日内每天第一笔交易亏损X 日内每天第一笔交易亏损X,就停止全天的交易,图表怎么编,谢谢!!! |
-- 作者:jinzhe -- 发布时间:2014/8/19 15:30:37 -- variable:n=0; if 平空条件 and holding<0 and n=0 then begin sellshort.......; if numprofit(1)<=x then n:=1; end
if 平多条件 and holding>0 and n=0 then begin sell....; if numprofit(1)<=x then n:=1; end if closetime(0)=time then n:=0; 框架大体如此,只需在开仓条件加入n=0即可 |
-- 作者:wzywzy292 -- 发布时间:2014/8/19 15:50:59 -- 我可能表达的不够清楚。 每天第一笔开仓后,如果亏损达到X,就平仓,并且全天不再开仓,谢谢!!! |
-- 作者:jinzhe -- 发布时间:2014/8/19 15:55:48 -- 差不多的,修改一下就行
variable:n=0; if 平空条件 and holding<0 and totaldaytrade=0 and openprofit<=x then begin sellshort.......; n:=1 end
if 平多条件 and holding>0 and totaldaytrade=0 and openprofit<=x then begin sell....; n:=1; end if closetime(0)=time then n:=0; 然后开仓条件加入n=0 [此贴子已经被作者于2014/8/19 15:55:57编辑过]
|
-- 作者:wzywzy292 -- 发布时间:2014/8/19 16:22:40 -- “然后开仓条件加入n=0” 是 开仓条件 and n ? |
-- 作者:jinzhe -- 发布时间:2014/8/19 16:28:08 -- 开仓条件 and n=0 |
-- 作者:wzywzy292 -- 发布时间:2014/8/19 16:31:38 -- 谢谢!!! 过了!!! |