Rss & SiteMap

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

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

标题:新手的买入问题

1楼
shark 发表于:2013/2/24 23:03:07
 <!--[if gte mso 9]> Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 <![endif]-->

你好,

 

上叉买多盈利后止盈,其后未下叉且符合条件再次买多,希望控制“再买”次数,最多2次。

超过2次后等待下叉卖出。 写了2个方法控制次数,都无法成功,具体表现是经常超过2次。请帮助修改一下。谢谢

 

IF long then

begin

SELLSHORT(HOLDING<0,HOLDING,MARKET);

BUY (holding=0,1,thisclose);

end

方法1

variable:cishu=1;

IF MA1>MA2 and cishu<3 then begin

if止盈 then SELL(HOLDING>0,0,MARKET);

If再买then begin

buy(1,0,market) ;

Cishu:=cishu+1;

End

 

方法2

variable:cishu=1;

if 止盈

then begin

sell(holding>0,0,MARKET);

if再买then

for cishu=1 to 2 do begin

BUYSHORT (holding=0,1,thisclose);

Cishu:=cishu+1;

end

end

<!--[if gte mso 9]> <![endif]--><!--[if gte mso 10]> <![endif]-->
2楼
jinzhe 发表于:2013/2/25 9:07:53

variable:cishu=1;

if cishu<=2 and 再买条件 then begin

buy;

cishu:=cishu+1;

end

3楼
shark 发表于:2013/2/25 11:42:28
 我发了个邮件,请查收
4楼
shark 发表于:2013/2/25 11:42:43
 还是有问题
共4 条记录, 每页显示 10 条, 页签: [1]


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