欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 编写程序问题求教

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有5427人关注过本帖树形打印复制链接

主题:编写程序问题求教

帅哥哟,离线,有人找我吗?
FireScript
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:14496 积分:0 威望:0 精华:0 注册:2017/7/4 13:40:18
  发帖心情 Post By:2018/7/2 13:50:54    Post IP:180.169.30.6[显示全部帖子]

 
VARIABLE:n:=0,m:=0,3h:=0,3l:=0;

t1:=hhv(h,3);
t2:=llv(l,3);
if count(c>o,3)=3 and n=0 and m=0 and 3h=0 and 3l=0 then
begin
n:=h;
m:=l;
3h:=t1;
3l:=t2;
end

if c>=n  and n<>0 then buy(holding=0,1,market);

sell(holding>0 and c>2*n-3l and n<>0,holding,market);

if c<=m and m<>0 then
begin
sell(holding>0,holding,market);
buyshort(holding=0,1,market);
end

止盈2:=holding<0 and c<2*m-2*n+3l and n<>0;

if  止盈2 then
begin
sellshort(holding<0,holding,market);
n:=0;
m:=0;
3h:=0;
3l:=0;
end

止损3:=holding<0 and c>n and n<>0;

if 止损3  then
begin
sellshort(holding<0,holding,market);
n:=0;
m:=0;
3h:=0;
3l:=0;
end

供参考下,以上代码会记住第一次三阳时候的各个值。而不会按照最近的三阳去刷新值。
[此贴子已经被作者于2018/7/2 14:29:08编辑过]


命数如织,当如磐石。
 回到顶部