金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 1511|回复: 4

急请老师帮完善策略,因为交易发现有不符合要求的地方。

[复制链接]

50

主题

203

帖子

213

积分

Rank: 4

等级: 专业版

注册:
2022-8-5
曾用名:
发表于 2023-2-15 13:05 | 显示全部楼层 |阅读模式
请老师帮改善策略,因为交易发现有不符合要求的地方:
1、先限制最大开仓数300张(因为同时执行很多合约,所以每个合约要限定最大持仓数);
2、初始开仓300张,当持仓达到300张后,再符合条件开仓,要先检查持仓是否达到限制最大开仓数,如果达到限制最大开仓数,不执行再开仓;
3、当持仓获利15%,平仓50%后,这时限制最大开仓数变为150张(300张/2);(这个很重要,否则后面继续开仓到300张)
4、当执行过一次持仓获利15%,平仓50%后,不能再执行第二次,否则行情延续时,会不停的减半仓位;
5、当条件平仓符合(ma5>ma10)平掉全部持仓。
MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
cond1:currenttime>093050 ;
if cond1 and (ma10>ma5) then
begin
        tbuyshort(1,300,lmt,DYNAINFO( 34)-0.0002);
END

if cond1 and (ma5>ma10) and tsellholding(1)>0 then
begin
        tsellshort(1,300,lmt,DYNAINFO(28));
END

if (close-TAVGENTERPRICEEX2('','',1))/TAVGENTERPRICEEX2('','',1)>(15/100) and tsellholding(1)>0 then
begin
        tsellshort(1,50%,lmt,DYNAINFO(28)),PERTRADER;
END


if currenttime>145500 and tsellholding(1)>0 then
begin
        tsellshort(1,tsellholding(1),lmt,DYNAINFO(28));
END

回复

使用道具 举报

50

主题

203

帖子

213

积分

Rank: 4

等级: 专业版

注册:
2022-8-5
曾用名:
 楼主| 发表于 2023-2-15 15:29 | 显示全部楼层
请老师帮助解决这个问题,谢谢
回复

使用道具 举报

3

主题

2万

帖子

2万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-24
曾用名:
发表于 2023-2-15 15:37 | 显示全部楼层
MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
cond1:currenttime>093050 ;
//用flag来标记是否平过半仓
GLOBALVARIABLE:flag=0;
if currenttime>093000 and currenttime<093100 then flag:=0;
if cond1 and (ma10>ma5) and tsellholding(1)<300 then
begin
        tbuyshort(1,300-tsellholding(1),lmt,DYNAINFO( 34)-0.0002);
END

if cond1 and (ma5>ma10) and tsellholding(1)>0 then
begin
        tsellshort(1,tsellholding(1),lmt,DYNAINFO(28));
END

if flag=0 and (close-TAVGENTERPRICEEX2('','',1))/TAVGENTERPRICEEX2('','',1)>(15/100) and tsellholding(1)>0 then
begin
        tsellshort(1,50%,lmt,DYNAINFO(28)),PERTRADER;
        flag:=1;
END


if currenttime>145500 and tsellholding(1)>0 then
begin
        tsellshort(1,tsellholding(1),lmt,DYNAINFO(28));
END
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

50

主题

203

帖子

213

积分

Rank: 4

等级: 专业版

注册:
2022-8-5
曾用名:
 楼主| 发表于 2023-2-15 18:26 | 显示全部楼层
非常感谢老师
回复

使用道具 举报

50

主题

203

帖子

213

积分

Rank: 4

等级: 专业版

注册:
2022-8-5
曾用名:
 楼主| 发表于 2023-2-15 21:47 | 显示全部楼层
老师你真厉害!谢谢您
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-20 15:08 , Processed in 0.277654 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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