Rss & SiteMap

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

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

标题:[求助]请教下这样可以实现吗?

1楼
saintlucifer 发表于:2011/11/17 10:07:44
请问一下,例如当前K线出现开仓信号,先做一个判断,如果当前K线涨幅大于一定百分比,这里先不进行开仓,然后推迟到下周期收盘(或者下下)才进行开仓,请问可以实现吗?
2楼
26327756l 发表于:2011/11/17 10:57:50

可以

将下单语句放在IF的条件判断下,满足 当前K线涨幅大于一定百分比

然后在执行下单。

3楼
saintlucifer 发表于:2011/11/17 11:00:53
呃,具体要怎么写呢
4楼
26327756l 发表于:2011/11/17 11:14:30
那你具体是什么条件呢?
5楼
saintlucifer 发表于:2011/11/17 11:19:49
看来你不是很理解我的问题,我的问题是当开仓条件成立时,如果当根k线涨幅超过一定百分比,就把开仓时间推迟到下一根k线才进行开仓,这个就是具体条件啊~ IF Condition and ((close - open) / open >= x%) then xxx,我是问xxx那些内容,不是问condition那个...
6楼
saintlucifer 发表于:2011/11/17 11:21:07
我是问如何推迟开仓时间,而不是问如何开仓...
7楼
26327756l 发表于:2011/11/17 11:29:22

这样的话,我想想

8楼
阿火 发表于:2011/11/17 12:22:28

在强大的金字塔面前,It is so easy !

variable:cc=0;

ma5:=ma(c,5);

ma10:=ma(c,10);

if cc>0 and ma5<ma10 then begin

  sell(1,1,thisclose);

  cc:=0;

end

if cc<0 and ma5>ma10 then begin

  sellshort(1,1,thisclose);

  cc:=0;

end

if cc=0 and ma5>ma10 then begin

  cc:=1;

  kpos:=barpos;

  buy((c-o/o<0.001),1,thisclose);

end

if cc=0 and ma5<ma10 then begin

  cc:=-1;

  kpos:=barpos;

  buyshort((c-o)/o>-0.001,1,thisclose);

end

if holding=0 and cc=1 and barpos-kpos>=1 then buy(1,1,thisclose);//出信号时不符合开仓条件,则推迟1根K线开仓

if holding=0 and cc=-1 and barpos-kpos>=1 then buyshort(1,1,thisclose);

9楼
saintlucifer 发表于:2011/11/17 14:05:28
真的很强大,十分感谢!!
共9 条记录, 每页显示 10 条, 页签: [1]


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