金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
查看: 1784|回复: 3

夜盘11点和白盘3点平仓怎么编写?

[复制链接]

4611

主题

4696

帖子

4721

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
发表于 2023-8-2 15:17 | 显示全部楼层 |阅读模式
请教:夜盘11点和白盘3点平仓怎么编写?
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-8-2 15:32 | 显示全部楼层
如果是图表模型得话
if time=30000 or time=190000 then
begin
收盘平多:sell(1,holding,market);
收盘平空:sellshort(1,holding,market);       
end
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

18

主题

32

帖子

32

积分

Rank: 1

等级: 新手上路

注册:
2023-8-2
曾用名:
发表于 2023-8-2 16:05 | 显示全部楼层
老师您好,好像不大对劲,这是源码,烦请老师帮助改一下,夜盘11点和白盘3点   都平仓,不过夜。谢谢。T2:=TIME>=CLOSETIME(0);


if C > 开盘 then
   colorb := rgb(88,0,0);
else if C < 开盘 then
   colorb := rgb(0,88,0);
// DRAWGBK(1 ,colorb ,colorb , 1);

if 多  then begin
sellshort(holding<0, 0, thisclose),COLORBLACK;//平仓 黑色看不见
buy(holding=0 {AND T1}, 1, thisclose)COLORRED;

end

if  T2 then sell(holding>0, 0, thisclose)COLORBLUE;//尾盘平仓及多止损
//Enterprice-C>=幅度*1.5 OR   幅度止损语句

if 空   then begin
sell(holding>0, 0, thisclose)COLORBLACK;//平仓 黑色看不见
buyshort(holding=0 {AND T1}, 1, thisclose)COLORGREEN;
end

if  T2 then sellshort(holding<0, 0, thisclose)COLORBLUE;//尾盘平仓及空止损

回复

使用道具 举报

21

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-8-2 16:14 | 显示全部楼层
代码没有问题的。

你直接把上面代码放进去就行了。你自己源码里T2控制的部分直接去掉了就行了。



if 多  then begin
sellshort(holding<0, 0, thisclose),COLORBLACK;//平仓 黑色看不见
buy(holding=0, 1, thisclose),COLORRED;
end


if 空   then begin
sell(holding>0, 0, thisclose),COLORBLACK;//平仓 黑色看不见
buyshort(holding=0, 1, thisclose)COLORGREEN;
end


if time=30000 or time=190000 then
begin
收盘平多:sell(1,holding,market);
收盘平空:sellshort(1,holding,market);        

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-16 12:58 , Processed in 0.121355 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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