金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
12
返回列表 发新帖
楼主: PIN

信号问题想请教

[复制链接]

33

主题

145

帖子

145

积分

等级: 免费版

注册:
2023-10-12
曾用名:
 楼主| 发表于 2024-1-2 15:59 | 显示全部楼层
还想请帮看下为什么在这根k上(也就是光标定位的那根k)不出开多的信号了,按shift+Q调试检查各项条件因子都是正常,但是cond_buy却显示为0,有点疑惑

//申明参数
input:n(1,1,100,1),ss(1,1,100,1),nmin(10,1,100,1),long_co(1,0.001,1.1,0.001),short_co(1,0.001,1.1,0.001);

//技术指标
up_line:ref(hhv(h,n),1)*long_co;
down_line:ref(llv(l,n),1)*short_co;
middle_line:(up_line+down_line)/2;

//交易条件
buytime:=time>opentime(1) and time<closetime(0)-nmin*100;
selltime:=time>=closetime(0)-nmin*100;

//交易主体
cond_buy:=ref(c>up_line and buytime and holding=0,1);
if cond_buy then begin
        buy(1,ss,thisclose);
        end

if c<middle_line and holding>0 then begin
        sell(1,holding,thisclose);
        end

cond_buyshort:=ref(c<down_line and buytime and holding=0,1);
if cond_buyshort then begin
        buyshort(1,ss,thisclose);
        end

if c>middle_line and holding<0 then begin
        sellshort(1,holding,thisclose);
        end
      
//收盘平仓
if selltime then begin
        sell(holding>0,0,thisclose);
        sellshort(holding<0,0,thisclose);
        end
      
持仓:holding,linethick0;
资产:asset,noaxis,linethick0;
可用现金:cash(0),linethick0;


补充内容 (2024-1-4 10:42):
这个问题是重复提问了,可以不用管哈

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号? 微信登录

x
回复

使用道具 举报

33

主题

145

帖子

145

积分

等级: 免费版

注册:
2023-10-12
曾用名:
 楼主| 发表于 2024-1-3 19:04 | 显示全部楼层
补充个信号小问题哈,针对第一种情况,勾选tick级别刷新可以解决漏单的问题么

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号? 微信登录

x
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-8-3 08:55 , Processed in 0.130986 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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