Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共7 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]日内每天第一笔交易亏损X

1楼
wzywzy292 发表于:2014/8/19 15:23:50
 日内每天第一笔交易亏损X,就停止全天的交易,图表怎么编,谢谢!!!
2楼
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即可

3楼
wzywzy292 发表于:2014/8/19 15:50:59
 我可能表达的不够清楚。

每天第一笔开仓后,如果亏损达到X,就平仓,并且全天不再开仓,谢谢!!!
4楼
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编辑过]
5楼
wzywzy292 发表于:2014/8/19 16:22:40
“然后开仓条件加入n=0”   是  开仓条件 and n ?
6楼
jinzhe 发表于:2014/8/19 16:28:08
开仓条件 and n=0
7楼
wzywzy292 发表于:2014/8/19 16:31:38
谢谢!!! 过了!!!
共7 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03125 s, 3 queries.