Rss & SiteMap

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

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

标题:variable如何使用,希望实现上面语句在满足条件时只执行一次

1楼
代人发贴 发表于:2017/12/15 8:46:54
 if o<4000 and c>3900 and o>c then buyshort(holding=0,3,market);

if ENTERPRICE<4000 and c>4000 and o>4000 and  c>o and holding<0 then sellshort(1,2,MARKET);

variable如何使用,希望实现上面语句在满足条件时只执行一次。谢谢 
2楼
FireScript 发表于:2017/12/15 9:00:01

举个例子:

variable:mark:=1;

 

if buycond and mark then

begin

buy(holding=0,1,market);

mark:=0;

end

 

//这样执行一次后不再执行第二次,只有重置mark才能有第二次执行的情况

共2 条记录, 每页显示 10 条, 页签: [1]


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