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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → 金字塔的共享行情数据介绍

   

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


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

主题:金字塔的共享行情数据介绍

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


加好友 发短信
等级:管理员 帖子:7302 积分:32559 威望:1000 精华:45 注册:2003/12/30 16:34:32
金字塔的共享行情数据介绍  发帖心情 Post By:2010/1/28 0:35:02 [只看该作者]

服务器端的设置

金字塔的金钻版支持服务器端的UPD数据广播,具体方法如下:

首先创建一个名为 QuoteBC.ini 的文本文件,存放于金字塔安装目录下的Setting目录.

QuoteBC.ini文件的具体内容如下:

 

[Server]
Broadcast=1
BroadcastIP=
BroadcastPort=7855

 

其中解释含义如下:

[Server]  表示属于服务器端组功能

Broadcast 为数据开关,为1表示开启服务器的UDP数据广播,为0表示关闭

BroadcastIP 为服务器端定向发送的客户端IP地址,若不填则表示为所有局域网的客户发送

BroadcastPort 为服务器为指定端口发送的数据包,默认为7855端口

 

将含有上述文字的文本文件创建完毕后,重新启动金字塔软件,然后金钻版的服务器端在收到行情数据后即可往局域网发送广播数据包,客户端即可完成接收.

 

客户端的接收设置

单击"工具"菜单中的"接收系统",弹出接收系统设置对话框,然后选择"显示内网接口"复选框,然后从接口列表上双击内网行情数据启动接收.

局域网的客户端默认的接收端口是7855,若需要改动接口,创建一个名为 QuoteBC.ini 的文本文件,存放于金字塔安装目录下的Setting目录.

 

[Client]
BroadcastPort=7850

 

将上述设置保存该文本文件即可完成客户端的接收设置.

 

接收内网的行情数据包

金字塔的UDP内网广播数据包,采用C语言结构,这就为第三方软件的局域网数据接收提供了可能,结构如下:

 

#define  STKLABEL_LEN   10   // 股号数据长度,国内市场股号编码兼容钱龙
#define  STKNAME_LEN    32   // 股名长度

#pragma pack( push, 1 )

typedef struct
{
 time_t m_time;          // 成交时间
 WORD m_wMarket;         // 股票市场类型
 char m_szLabel[STKLABEL_LEN];     // 股票代码,以'\0'结尾
 char m_szName[STKNAME_LEN];      // 股票名称,以'\0'结尾
 
 float m_fLastJS;         // 昨结算
 float m_fLastClose;        // 昨收
 float m_fOpen;         // 今开
 float m_fHigh;         // 最高
 float m_fLow;          // 最低
 float m_fNewPrice;        // 最新
 float m_fVolume;         // 成交量
 float m_fAmount;         // 成交额
 float m_fNewJS;         // 当前结算
 float m_fOI;          // 持仓量
 float m_upperLimitPrice;       // 涨停板
 float m_lowerLimitPrice;       // 跌停板
 BYTE m_bMainReport;        // 是否主力和约
 BYTE m_nFlag1;         // 标志1
 BYTE m_nFlag2;         // 标志2
 BYTE m_nReserve[1];
 float m_fPrvOI;         // 昨持仓
 
 float m_fBuyPrice[3];        // 申买价1,2,3
 float m_fBuyVolume[3];       // 申买量1,2,3
 float m_fSellPrice[3];       // 申卖价1,2,3
 float m_fSellVolume[3];       // 申卖量1,2,3
 
 float m_fBuyPrice4;        // 申买价4
 float m_fBuyVolume4;        // 申买量4
 float m_fSellPrice4;        // 申卖价4
 float m_fSellVolume4;        // 申卖量4
 
 float m_fBuyPrice5;        // 申买价5
 float m_fBuyVolume5;        // 申买量5
 float m_fSellPrice5;        // 申卖价5
 float m_fSellVolume5;        // 申卖量5

 float m_fBuyPrice6;        // 申买价6
 float m_fBuyVolume6;        // 申买量6
 float m_fSellPrice6;        // 申卖价6
 float m_fSellVolume6;        // 申卖量6
 
 float m_fBuyPrice7;        // 申买价7
 float m_fBuyVolume7;        // 申买量7
 float m_fSellPrice7;        // 申卖价7
 float m_fSellVolume7;        // 申卖量7
 
 float m_fBuyPrice8;        // 申买价8
 float m_fBuyVolume8;        // 申买量8
 float m_fSellPrice8;        // 申卖价8
 float m_fSellVolume8;        // 申卖量8
 
 float m_fBuyPrice9;        // 申买价9
 float m_fBuyVolume9;        // 申买量9
 float m_fSellPrice9;        // 申卖价9
 float m_fSellVolume9;        // 申卖量9
 
 float m_fBuyPrice10;        // 申买价10
 float m_fBuyVolume10;        // 申买量10
 float m_fSellPrice10;        // 申卖价10
 float m_fSellVolume10;       // 申卖量10
} RCV_REPORT_STRUCTExQH;

#pragma pack(pop)

 

[此贴子已经被作者于2010-1-28 12:57:29编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
hshcompass
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:14 积分:230 威望:0 精华:1 注册:2009/8/21 13:17:14
  发帖心情 Post By:2010/1/31 10:09:00 [只看该作者]

越来越人性化了 祝金字塔更上一层楼

[本帖被加为精华]
 回到顶部
帅哥哟,离线,有人找我吗?
Likai
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 李凯学堂
等级:论坛游侠 帖子:137 积分:854 威望:0 精华:0 注册:2009/8/24 14:44:18
  发帖心情 Post By:2010/2/1 10:23:17 [只看该作者]

这个功能有几个典型应用:
(1)可以实现TS2000i、Get -rt版 动态接收期货行情。
如果你有这一方面的需求,可以发邮件到:Kit998@189.cn 或者QQ=475049
(2)可以用VC、 VB等语言实现一个仅仅完成策略执行的最好效率算法。
(3)可以把动态数据直接装入SQL数据库,做复杂的数据分析并保存结果,在金字塔中直接调用结果。

 回到顶部
帅哥哟,离线,有人找我吗?
pel46585
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游侠 帖子:167 积分:661 威望:0 精华:1 注册:2009/12/25 23:43:24
  发帖心情 Post By:2010/2/1 22:12:26 [只看该作者]

申请

 回到顶部
帅哥哟,离线,有人找我吗?
bhwhui
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:208 积分:1565 威望:0 精华:2 注册:2009/8/23 19:18:53
  发帖心情 Post By:2010/2/2 12:01:28 [只看该作者]

确实是好东西!

 

留意了很久这方面的数据推送,或许是自己接触的人少,感觉有能力做2次开发的人才太少了。

 

以上的接口仅仅是实时数据部分的接口,个人认为不是很完善,缺少历史数据的回补,下单指令的接口。如果做成实际使用的,还需要好多东西,特别是DLL封装内函数的调用,衔接,路程还有好远。。。

 


 回到顶部
帅哥哟,离线,有人找我吗?
bhwhui
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:208 积分:1565 威望:0 精华:2 注册:2009/8/23 19:18:53
  发帖心情 Post By:2010/2/2 12:05:08 [只看该作者]

不知道版主所说“需求”是什么意思,“定制”?接口技术支持(仅仅是JZT的接口部分)?

 回到顶部
帅哥哟,离线,有人找我吗?
bhwhui
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:208 积分:1565 威望:0 精华:2 注册:2009/8/23 19:18:53
  发帖心情 Post By:2010/2/2 19:15:16 [只看该作者]

呵呵呵,我确实不是很懂。

我仅仅是咨询过一些数据提供商例如数畅,网际风等等软件设计人员的意见,请教过云徽期货软件的设计者一些数据接收问题。

看过一些外软接口的说明书。

例如下面的描述:

How to Create a Real-Time Data Adapter

This example shows how to create a Real-Time Data Adapter in Borland Delphi.  The steps involved are similar for other development tools.

The goal is to create a COM DLL library that implements the IWealthLabRT3 interface.  This interface will be available on the target system if you've installed and executed Wealth-Lab Developer 3.0.

This example will duplicate the creation of the Medved QuoteTracker Real-Time Data Adapter that is included in the WLD installation.  In Delphi, we start by creating a new project of type ActiveX Library.  We save the project under the name QuoteTracker.dpr.  We next create a new Automation Object for the project, and name this QTAuto.  The resulting COM class name for our Adapter is QuoteTracker.QTAuto.

Delphi provides a COM type library editor that makes creating COM objects fairly painless.  The screen shot below shows that we've selected to use the Wealth-Lab interfaces in our COM library project.

 

也接触了一些外软接口开发者的思路。

 

上面仅仅是我个人的一些看法,并没有什么轻视的意思吧?管理员何来说这些话?


 回到顶部
帅哥哟,离线,有人找我吗?
bhwhui
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:208 积分:1565 威望:0 精华:2 注册:2009/8/23 19:18:53
  发帖心情 Post By:2010/2/2 20:22:09 [只看该作者]

顺便请管理员谈谈“Static Data Adapter”的实现思路。

 

以下仅仅是“Real-Time Adapter”的描述,接口函数很多,也请管理员谈谈思路。

 

Real-Time Adapter Structural Overview

Here's a brief overview of how your Real-Time Adapter should be structured.

  1. Implement the SupportsRequest method to let WLD know which type(s) of Real-Time Charts data your Adapter supports (if any).
  2. Implement the SupportsQuotes method to return true if your Adapter supports the Quotes interface.
  3. Implement the AssignConnectionStatus method.  Store the IWealthLabConnection3 instance in a local variable.  You can use this interface to communicate changes in communication status to WLD.
  4. Implement the GetSecurityName method to return the security name based on a symbol, or just a blank string if you don't have access to security names.
  5. If you are supporting the Real-Time Charts system ...
    1. Implement the OpenRequest method.  Within this method ...
      1. Save local copies of the parameters for later access, especially the instances of the IWealthLabBars3 and IWealthLabRTUpdate3 interfaces.
      2. Pre-fill the historical bars using the Add method of the IWealthLabBars3 instance.  Don't exceed NumBars.
      3. Create a thread, timer, socket, or whatever mechanism required to interface to the real-time feed.
    2. Whenever new data comes in from the real-time feed ...
      1. Build an Intraday bar, if required.  Some feeds provide data in the form of Intraday bars already, while some supply tick data streams only.
      2. Optionally call the UpdateGhostBar method of the IWealthLabRTUpdate3 instance to update the last bar of the chart if only a partial bar is available.
      3. Optionally call the UpdateBidAsk method of the IWealthLabRTUpdate3 instance to update new bid/ask data.
      4. When a new bar is ready ...
        1. Add the new bar(s) using the Add method of the IWealthLabRTUpdate3 instance.
        2. Notify the chart that a new bar(s) are available by calling the Update method of the IWealthLabRTUpdate3 instance.
    3. Implement the CloseRequest method to perform any required cleanup.
  6. If you are supporting the Quotes system ...
    1. Implement the AddSymbol method.  You'll receive multiple AddSymbol calls, so store the symbol in a list.
    2. Implement the RemoveSymbol method to remove a symbol that had been previously added.
    3. Implement the ClearSymbols method to clear all symbols from the list.
    4. Implement the ActivateQuotes method to create a thread, timer, socket, or whatever mechanism is required to obtain quote updated for the requested symbols.   Store the instance of the IWealthLabQuoteUpdate3 interface that is passed.
    5. Whenever a quote update for a symbol arrives, call the UpdateQuote method of the IWealthLabQuoteUpdate3 instance that you saved in step 4 above.
    6. Close the connection in the implementation of the DeactivateQuotes method.

上面本人说过:欣喜的看到金字塔的进步,并没有否定的意思吧?而仅仅凭1楼的一张数据表就实现了外软接口?

也请看看WJF和AB的接口代码,Chu的WLD接口代码,说还有很多路要走,对软件造成极不利的影响?否定了?

 


 回到顶部
帅哥哟,离线,有人找我吗?
bhwhui
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:208 积分:1565 威望:0 精华:2 注册:2009/8/23 19:18:53
  发帖心情 Post By:2010/2/2 20:30:41 [只看该作者]

论坛上高手很多,每个人学有所长,以上只是说说个人的一些看法,并没有什么人身攻击,违反版规之类的,互相学习交流,共同提高,不懂就虚心求教。别弄什么删贴,封IP之类的事。

 回到顶部
帅哥哟,离线,有人找我吗?
admin
  10楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:7302 积分:32559 威望:1000 精华:45 注册:2003/12/30 16:34:32
  发帖心情 Post By:2010/2/4 1:53:16 [只看该作者]

目前金字塔并不是没有实力提供回补数据等功能,只是做为一个商业化软件,提供一个完整的服务器功能,是不可能的。

提供的共享行情,目的是为局域网或者用户本地计算机的金字塔软件或者第3方软件提供了一种数据的共享能力,局域网是不会断线的,所以数据回补根本也不重要。至于下单部分,你怎么知道没有


 回到顶部