Rss & SiteMap

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

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

标题:请教关于开仓的问题

1楼
punkcat401 发表于:2013/11/25 10:08:30

IF 条件A THEN BUY 之后


1、针对条件A的多头开仓,如果平仓,日内不再做多。

 

2、针对条件A的多头开仓,如果平仓,30根K线内不做多。

2楼
jinzhe 发表于:2013/11/25 10:16:29

什么是针对A的平仓?有很多个开仓条件? 

 

3楼
punkcat401 发表于:2013/11/25 10:23:30
以下是引用jinzhe在2013/11/25 10:16:29的发言:

什么是针对A的平仓?有很多个开仓条件? 

 

是的,同时有条件A时做多,条件B时做多,条件C时做多

只针对条件A的多单,平仓后不再做多

4楼
jinzhe 发表于:2013/11/25 10:28:47

variable:n=0;

variable:m=0;

if 开仓条件A and holding=0 and m<>1 then begin

   buy;

   n:=1;

end

 

if 开仓条件b and holding=0 and m<>1  then begin

   buy;

   n:=2;

end

 

if 开仓条件c and holding=0 and m<>1 then begin

   buy;

   n:=3;

end

 

if 平仓条件a and holding>0 and n=1 then begin

   sell;

   m:=1;

end

 

 

5楼
punkcat401 发表于:2013/11/25 10:34:03
以下是引用jinzhe在2013/11/25 10:28:47的发言:

 

不是条件A平仓后一直不做多,是在两种时间限制的情况下

1、日内不再做多

2、30根K线内不做多

[此贴子已经被作者于2013/11/25 10:34:22编辑过]
6楼
jinzhe 发表于:2013/11/25 10:39:42

variable:n=0;

variable:m=0;

if 开仓条件A and holding=0 and m<>1 then begin

   buy;

   n:=1;

end

 

if 开仓条件b and holding=0 and m<>1  then begin

   buy;

   n:=2;

end

 

if 开仓条件c and holding=0 and m<>1 then begin

   buy;

   n:=3;

end

 

if 平仓条件a and holding>0 and n=1 then begin

   sell;

   m:=1;

end

 

if time=closetime(0) then m:=0;

if m=1 and ref(m,30)=1 then m:=0;

[此贴子已经被作者于2013/11/25 10:40:06编辑过]
共6 条记录, 每页显示 10 条, 页签: [1]


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