设为首页收藏本站

 找回密码
 注册
查看: 931|回复: 0
打印 上一主题 下一主题

请教关于尾盘平仓跨周期调用问题 [复制链接]

Rank: 1

精华
0
UID
264292
积分
27
帖子
16
主题
8
阅读权限
10
注册时间
2018-4-10
最后登录
2020-11-2
跳转到指定楼层
1#
发表于 2018-10-30 14:22:43 |只看该作者 |倒序浏览
尾盘平仓在15分钟图上想用1分钟图上14:58的K线收盘价作为平仓价格
一分钟图上公式:
Params
Vars
NumericSeries s;
Begin
If(time==0.1458) s=c;
SetTBProfileString("mysection","s",text(s));
End
15分钟图上尾盘平仓公式:
getTBProfileString("mysection",s);
   If((trueDate(-1) != InvalidInteger && trueDate(0) != trueDate(-1)) || (trueDate(-1)==InvalidInteger && trueDate(0)<CurrentDate))  
   {
     Sell(1,Value("s"));
         BuyToCover(1,Value("s"));
   }         
为何实现不了,平仓价格还是最后的日收盘价。
您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-4-20 04:36

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部