金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
123
返回列表 发新帖
楼主: 100019656

001

[复制链接]

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-8-25 09:39 | 显示全部楼层

ss:=1;
if tbuyholdingex('','',2)=0 then begin tbuy(1,ss,mkt);

if  tbuyholdingex('','',1)>0  then
begin      
tsell(1,tbuyholdingex('','',1),lmt,tavgenterpriceex2('','',0)+10*mindiff),allowrepeat;
end
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

28

主题

153

帖子

163

积分

Rank: 2

等级: 标准版

注册:
2022-6-27
曾用名:
 楼主| 发表于 2023-8-25 10:17 | 显示全部楼层
老师
加载一个止损语句,当亏损5个点,撤掉平仓单,止损,用于后台程序化
回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-8-25 10:39 | 显示全部楼层
[PEL] 复制代码
ss:=1;

if  tavgenterpriceex2('','',0)-dynainfo(  7)>5*MINDIFF then
begin  
if tremainqty(2,'',stklabel)>0  then 
begin
tcancelex(1,2,'',stklabel);
exit;
end

//止损平仓
if  tremainqty(2,'',stklabel)=0 and  tbuyholdingex('','',1)>0 then 
begin 
tsell(1,0,mkt),allowrepeat;
end
 
end 


if tbuyholdingex('','',2)=0 then  tbuy(1,ss,mkt);

if  tbuyholdingex('','',1)>0  then
begin       
tsell(1,tbuyholdingex('','',1),lmt,tavgenterpriceex2('','',0)+10*mindiff),allowrepeat;
end


如果价格反复波动在止损的临界点 是可能会反复撤单挂单的。不过这个没办法的。因为你这个止盈是挂单等成交而不是触发式的。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

28

主题

153

帖子

163

积分

Rank: 2

等级: 标准版

注册:
2022-6-27
曾用名:
 楼主| 发表于 2023-8-25 10:55 | 显示全部楼层
开空头语句,是这样吗?

ss:=1;

if  tavgenterpriceex2('','',0)-dynainfo(  7)>ZS*MINDIFF then
begin
if tremainqty(2,'',stklabel)>0  then
begin
tcancelex(1,2,'',stklabel);
exit;
end

//止损平仓
if  tremainqty(2,'',stklabel)=0 and  tbuyholdingex('','',1)>0 then
begin
tsell(1,0,mkt),allowrepeat;
end
  
end

if tsellholdingex('','',2)=0 then begin TBUYSHORT(1,ss,lmt,c);
end
if  tsellholdingex('','',1)>0 then
begin      
tsellshort(1,tsellholdingex('','',1),lmt,tavgenterpriceex2('','',1)-N*mindiff),allowrepeat;
end
回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-8-25 10:58 | 显示全部楼层
撤单,未成交,平仓 语句都要改。你这就是硬组合。

你看下函数说明呀。。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

28

主题

153

帖子

163

积分

Rank: 2

等级: 标准版

注册:
2022-6-27
曾用名:
 楼主| 发表于 2023-8-25 11:05 | 显示全部楼层
是的,后台程序化,多空方向都做,不预测行情,选个适合此处策略的品种
回复

使用道具 举报

28

主题

153

帖子

163

积分

Rank: 2

等级: 标准版

注册:
2022-6-27
曾用名:
 楼主| 发表于 2023-8-25 11:08 | 显示全部楼层
技术009 发表于 2023-8-25 10:58
撤单,未成交,平仓 语句都要改。你这就是硬组合。

你看下函数说明呀。。

老师,帮我空头方向的语句也写一下,
回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-8-25 11:13 | 显示全部楼层

ss:=1;

if  tavgenterpriceex2('','',1)-dynainfo(  7)>zs*mindiff then
begin
if tremainqty(4,'',stklabel)>0  then
begin
tcancelex(1,4,'',stklabel);
exit;
end

//止损平仓
if  tremainqty(4,'',stklabel)=0 and  tsellholdingex('','',1)>0 then
begin
tsellshort(1,0,mkt),allowrepeat;
end
  
end

if tsellholdingex('','',2)=0 then begin tbuyshort(1,ss,lmt,c);
end
if  tsellholdingex('','',1)>0 then
begin      
tsellshort(1,tsellholdingex('','',1),lmt,tavgenterpriceex2('','',1)-n*mindiff),allowrepeat;
end
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

28

主题

153

帖子

163

积分

Rank: 2

等级: 标准版

注册:
2022-6-27
曾用名:
 楼主| 发表于 2023-9-8 15:17 | 显示全部楼层
技术009 发表于 2023-8-25 11:13
ss:=1;

if  tavgenterpriceex2('','',1)-dynainfo(  7)>zs*mindiff then

老师,你怎么把改后台程序化的策略给删了
回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-9-8 15:19 | 显示全部楼层
标题不规范。请以可读的文字内容作为标题。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2025-7-30 19:46 , Processed in 0.103600 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表