设为首页收藏本站

 找回密码
 注册
楼主: xuluo861026

价差能否用K线图表示 [复制链接]

Rank: 1

精华
0
UID
218628
积分
8
帖子
6
主题
2
阅读权限
10
注册时间
2015-9-1
最后登录
2020-12-16
发表于 2015-10-16 22:54:06 |显示全部楼层
Params
        Numeric Set1(1);        // 商品1的倍数设置
        Numeric Set2(1);        // 商品2的倍数设置
Vars
        Numeric SpreadOpen;
        Numeric SpreadClose;
        Numeric SpreadHigh;
        Numeric SpreadLow;       
Begin
        SpreadOpen = Data0.Open*Set1-Data1.Open*Set2;
        SpreadClose = Data0.Close*Set1-Data1.Close*Set2;
        SpreadHigh = Max(SpreadOpen,SpreadClose);
        SpreadLow = Min(SpreadOpen,SpreadClose);
        PlotNumeric("Open",SpreadOpen);
        PlotNumeric("Close",SpreadClose);
        PlotNumeric("High",SpreadHigh);
        PlotNumeric("Low",SpreadLow);
End

使用道具 举报

Rank: 1

精华
0
UID
218628
积分
8
帖子
6
主题
2
阅读权限
10
注册时间
2015-9-1
最后登录
2020-12-16
发表于 2015-10-16 22:56:35 |显示全部楼层
这样的图只能看,用来分析可以。交易没有用处的 因为会产生3个价格:价差最新价 和价差买卖价

使用道具 举报

Rank: 2

精华
0
UID
234039
积分
71
帖子
59
主题
9
阅读权限
30
注册时间
2016-5-9
最后登录
2018-5-21
发表于 2017-12-16 11:04:07 |显示全部楼层
那如果是输出比值呢?也就是输出4手铝的价格与1手铜的价格的比值?这个要怎么弄

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

bottom

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

GMT+8, 2024-3-29 08:57

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部