 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
本帖最后由 技术008 于 2025-6-18 14:51 编辑
GLOBALVARIABLE:n=0,m=0;
//有老仓,并且价格大于昨收1%,并且n=0就平100
if tbuyholdingex('','',0)>0 and close>ref(close,1)*1.01 and n=0 then
begin
tsell(1,100,mkt);
n:=1;
END
if tbuyholdingex('','',0)>0 and close>ref(close,1)*1.02 and n=1 then
begin
tsell(1,100,mkt);
n:=2;
END
if tbuyholdingex('','',1)=0 and close<ref(close,1)*0.99 and m=0 then
begin
tbuy(1,100,mkt);
m:=1;
END
if tbuyholdingex('','',1)=0 and close<ref(close,1)*0.98 and m=1 then
begin
tbuy(1,100,mkt);
m:=2;
END
用这个,前面开多那里用了老仓大于0才能开所以导致开不了
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?
x
|