Skip to content

Commit

Permalink
ver 12345
Browse files Browse the repository at this point in the history
由于内置测试数据接口停了,增加本地测试数据用例
  • Loading branch information
jones2000 committed Aug 29, 2023
1 parent 994fc91 commit 98d93cb
Show file tree
Hide file tree
Showing 19 changed files with 148,140 additions and 68 deletions.
38 changes: 14 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ HQChart是第1个基于国内传统PC股票客户端软件(C++)移植到js/py平
**麦语法指标计算引擎**(分析家语法)指标执行器支持js, nodejs, py, c#,c++. <br>

# 交流
QQ交流群1:950092318(已满)
QQ交流群2:719525615
有问题可以直接发issue.
有问题可以直接发issue.

**教程列表和demo效果图在下面,下拉页面就可以看到!!!!!!!!!!!!**

Expand All @@ -36,8 +34,8 @@ uniapp 版本:

如果你觉得我们的行情模块对你有帮助, 请给我们点下star. (●ˇ∀ˇ●) <br>

py版本的麦语法指标计算引擎,已单独迁移到[https://github.com/jones2000/hqchartPy2](https://github.com/jones2000/hqchartPy2),
支持windows,和linux. 这个版本是用c++开发的,通过cpython来对接py,能高效的完成指标执行. 可以应用于回测, 选股等批量指标计算中。社区版c++开源.<br>
麦语法指标计算引擎,[https://github.com/jones2000/hqchartPy2/tree/master/HQChartPy2.Free](https://github.com/jones2000/hqchartPy2/tree/master/HQChartPy2.Free),
支持windows,和linux. 这个版本是用c++开发的,通过cpython来对接py,能高效的完成指标执行. 可以应用于回测, 选股等批量指标计算中.


# 目录结构
Expand Down Expand Up @@ -75,9 +73,9 @@ React 例子:[demo-react.md](/教程/demo-react.md) <br>
~~内置测试数据不支持跨域,如果要在本地chrome调试代码,参看教程[解决Chrome本地调试跨域](https://jones2000.blog.csdn.net/article/details/120008624). VUE项目本地调试请使用127.0.0.1:8080站点调试~~

# 声明
本项目只提供行情图形库及麦语法脚本执行器.<br>
页面中所有的行情数据都来自互联网或测试假数据, 不能确保数据的正确性, 仅供开发调试使用. 任何行情数据问题都与本项目无关. 请自行去交易所购买正版行情。

本项目只提供行情图形库及麦语法脚本执行器.
页面中所有的行情数据都来自互联网或测试假数据, 不能确保数据的正确性, 仅供开发调试使用. 任何行情数据问题都与本项目无关. 请自行去交易所购买正版行情。

# HQChart 3.0
* 分网页版本 及 微信小程序版本 <br>
Expand Down Expand Up @@ -203,7 +201,7 @@ React 例子:[demo-react.md](/教程/demo-react.md) <br>



# 3. 网页demo <br>
# 3. 网页demo
* [K线图](https://opensource2.zealink.com/hqweb/demo/phone7.html) <br>
* [走势图](https://opensource2.zealink.com/hqweb/demo/phone8.html) <br>
* [走势图手机页面](https://opensource2.zealink.com/hqweb/demo/phone2.html) <br>
Expand Down Expand Up @@ -512,41 +510,33 @@ React 例子:[demo-react.md](/教程/demo-react.md) <br>

# 5.VUE 行情项目
[代码地址(vuehqchart)](/vuehqchart) <br>
![走势图2](/小程序行情模块用例/image/pch5hq.PNG)
[行情页面地址(v1.0)](https://opensource2.zealink.com/vuehqweb/hq.demo.page.html) <br><br>
![历史高频数据查询图2](/小程序行情模块用例/image/pch5history.PNG)
[查询页面地址](https://opensource2.zealink.com/vuehqweb/queryContent.demo.page.html) <br><br>
![多周期图2](/小程序行情模块用例/image/pch5hq2.png)
[多周期页面地址](https://opensource2.zealink.com/vuehqweb/stockmultiperiod.demo.page.html) <br><br>
![综合排名2](/小程序行情模块用例/image/pch5hq3.png)
[综合排名页面地址](https://opensource2.zealink.com/vuehqweb/stockmultiorder.demo.page.html) <br><br>

![大图](/小程序行情模块用例/image/pch5hq.PNG)
页面名称 "hq.demo.page.html"

![多周期图2](/小程序行情模块用例/image/pch5hq2.png)
页面名称"stockmultiperiod.demo.page.html"


## 基于VUE版本给客户开发的样例
![PC行情页面](/小程序行情模块用例/image/hqchart_pc_demo1.png) <br>
[指数行情页面黑色风格](https://opensource2.zealink.com/cninfoHq/oneStockHq.html?symbol=000001.sh&colorType=black) <br>
[个股行情页面白色风格](https://opensource2.zealink.com/cninfoHq/oneStockHq.html?symbol=000001.sz) <br>
[代码地址(vue.demo/infoHqdemo)](/vue.demo/infoHqdemo) <br>

## VUE版本手机端样例1
![手机端行情页面](/小程序行情模块用例/image/hchart_phone_1.png) <br>
[手机端行情页面](https://opensource2.zealink.com/product/hqNewdemoH5/stockHq.html#/StockHq)<br>
[代码地址(vue.demo/hq_h5_pages)](/vue.demo/hq_h5_pages) <br>

## VUE版本手机端样例2 黑色风格
![手机端行情页面](/小程序行情模块用例/image/hqchart_phone_3.png) <br>
![手机端行情页面](/小程序行情模块用例/image/hqchart_phone_4.png) <br>
[手机端行情页面](https://opensource2.zealink.com/hqweb/hq_h5_demo_black/stockHq.html#/StockHq)<br>
[代码地址(vue.demo/hq_h5_pages)](/vue.demo/hq_h5_demo_black) <br>


## js页面样例
![手机端行情页面](/小程序行情模块用例/image/hqchart_phone_2.png) <br>
[个股详情手机端h5](https://opensource2.zealink.com/hqweb/hqpages/stockpage.html?) <br>
[代码地址(webhqchart.demo/h5demo)](/webhqchart.demo/h5demo) <br>
[VUE代码地址(vue.demo/stockpage_h5)](/vue.demo/stockpage_h5) <br>



# 奖项
![GVP](/小程序行情模块用例/image/gvp.jpg)

Expand Down
2 changes: 1 addition & 1 deletion document/huobi_demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1><a id="_9"></a>教程目录</h1>
<li>HQChart实战教程10-全ws数据对接HQChart(数字货币对接实战)</li>
<li>HQChart实战教程11-火币网ws数据对接</li>
<li>HQChart实战教程12-火币网ws数据对接分时图</li>
<li>HQChart实战教程13-火币网ws数据对接K线uniapp)</li>
<li>HQChart实战教程13-火币网ws数据对接K线[uniapp]</li>
<li>HQChart实战教程15-火币网ws数据对接拖拽下载历史K线图</li>
<li>HQChart实战教程16-K线图风格配色篇-仿火币网H5配色</li>
<li>HQChart实战教程47-火币网ws数据对接深度图</li>
Expand Down
12 changes: 5 additions & 7 deletions document/uniapp_binance.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ <h2><a id="_7"></a>接口文档</h2>
<img src="./image/uniapp_binance/2.png" alt="在这里插入图片描述"></p>
<h2><a id="_13"></a>接口地址</h2>
<p><a href="https://binance-docs.github.io/apidocs/futures/cn/#b122f813d5">币安官网接口地址介绍</a><br>
K线和实时更新这2个接口目前文档上来看是不需要鉴权的。<br>
K线和实时更新这2个接口,目前文档上来看是不需要鉴权的。<br>
demo里面使用的地址<br>
更新数据ws地址为<strong>wss://stream.binance.com/stream</strong><br>
历史Kixan数据地址为 <strong>https://www.binance.com/api/v1/klines</strong><br>
这个2个接口需要梯子才能访问在测试demo的时候需要确保测试的机器能访问这2个地址或者通后台中转。</p>
这个2个接口需要梯子才能访问,在测试demo的时候需要确保测试的机器能访问这2个地址,或者通后台中转。</p>
<h1><a id="_21"></a>对接方式</h1>
<ol>
<li>https+https轮询更新</li>
Expand All @@ -38,13 +38,11 @@ <h1><a id="_21"></a>对接方式</h1>
<h1><a id="uniappdemo_26"></a>uniapp-demo源码</h1>
<p>功能:</p>
<ol>
<li>https+https轮询更新</li>
<li>https+https轮询更新</li>
<li>https+ws更新</li>
<li>图形:深度图, K线图分时图</li>
<li>平台支持: h5app都支持</li>
<li>图形:深度图, K线图,分时图</li>
<li>平台支持: h5,app都支持</li>
</ol>
<h2><a id="demoapk_32"></a>demo安卓apk下载</h2>
<p><a href="https://opensource2.zealink.com/uniapp_demoapk/hqchart_binance_uniapp.2021.3.30.apk">https://opensource2.zealink.com/uniapp_demoapk/hqchart_binance_uniapp.2021.3.30.apk</a></p>
<h2><a id="_700_34"></a>售价 700元</h2>
<p>购买可以联系QQ 48274798 备注购买demo源码<br>
demo效果图<br>
Expand Down
104 changes: 98 additions & 6 deletions umychart_uniapp_h5/umychart.uniapp.h5.js
Original file line number Diff line number Diff line change
Expand Up @@ -4359,9 +4359,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
if (option.KLine.MaxReqeustDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxReqeustDataCount; //兼容老版本
if (option.KLine.MaxRequestDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;
if (option.KLine.Info && option.KLine.Info.length>0) chart.SetKLineInfo(option.KLine.Info,false);
if (option.KLine.IndexTreeApiUrl) chart.ChangeIndexDialog.IndexTreeApiUrl=option.KLine.IndexTreeApiUrl;
if (option.KLine.KLineDoubleClick==false) chart.MinuteDialog=this.MinuteDialog=null;
if (option.KLine.IndexTreeApiUrl!=null) chart.ChangeIndexDialog.IndexTreeApiUrl=option.KLine.IndexTreeApiUrl;
if (option.KLine.IsShowTooltip==false) chart.IsShowTooltip=false;
if (option.KLine.MaxRequestMinuteDayCount>0) chart.MaxRequestMinuteDayCount=option.KLine.MaxRequestMinuteDayCount;
if (option.KLine.DrawType) chart.KLineDrawType=option.KLine.DrawType;
Expand Down Expand Up @@ -4736,9 +4734,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
if (option.KLine.Period>=0) chart.Period=option.KLine.Period;
if (option.KLine.MaxRequestDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;
if (option.KLine.Info && option.KLine.Info.length>0) chart.SetKLineInfo(option.KLine.Info,false);
if (option.KLine.IndexTreeApiUrl) chart.ChangeIndexDialog.IndexTreeApiUrl=option.KLine.IndexTreeApiUrl;
if (option.KLine.KLineDoubleClick==false) chart.MinuteDialog=this.MinuteDialog=null;
if (option.KLine.IndexTreeApiUrl!=null) chart.ChangeIndexDialog.IndexTreeApiUrl=option.KLine.IndexTreeApiUrl;
if (option.KLine.PageSize>0) chart.PageSize=option.KLine.PageSize;
if (option.KLine.IsShowTooltip==false) chart.IsShowTooltip=false;
}
Expand Down Expand Up @@ -84560,8 +84556,8 @@ function ChangeIndexDialog(divElement)
delete this.newMethod;

this.DivElement=divElement; //父节点
this.IndexTreeApiUrl="http://127.0.0.1:8080/cache/hqh5/index/commonindextree.json"; //数据下载地址
this.OverlayIndexTreeApiUrl="http://127.0.0.1:8080/cache/hqh5/index/commonindextree.json"; //叠加指标列表数据下载地址
//this.IndexTreeApiUrl="../commonindextree.json"; //数据下载地址
//this.OverlayIndexTreeApiUrl="../commonindextree.json"; //叠加指标列表数据下载地址
this.IsOverlayIndex=false;

this.Create=function()
Expand Down Expand Up @@ -84589,12 +84585,107 @@ function ChangeIndexDialog(divElement)
this.DivElement.appendChild(div);
}

//指标菜单内容
this.GetMenuData=function()
{
var data={
"name":"页面通用版指标树",
"list":
[
{
"node":"超买超卖型",
"list":
[
{"name":"ADTM 动态买卖气指标", "id":"ADTM"},
{"name":"BIAS 乖离率", "id":"BIAS"},
{"name":"BIAS36 三六乖离", "id":"BIAS36"},
{"name":"BIAS_QL 乖离率-传统版", "id":"BIAS_QL"},
{"name":"CCI 商品路径指标", "id":"CCI"},
{"name":"FSL 分水岭", "id":"FSL"},
{"name":"KDJ 随机指标", "id":"KDJ"},
{"name":"MTM 动量线", "id":"MTM"},
{"name":"OSC 变动速率线", "id":"OSC"},
{"name":"RSI 相对强弱指标", "id":"RSI"},
{"name":"ROC 变动率指标", "id":"ROC"},
{"name":"WR 威廉指标", "id":"WR"}
]
},
{
"node":"趋势型",
"list":
[
{"name":"CHO 济坚指数", "id":"CHO"},
{"name":"DMA 平均差", "id":"DMA"},
{"name":"DMI 趋向指标", "id":"DMI"},
{"name":"EMV 简易波动指标", "id":"EMV"},
{"name":"MACD 平滑异同平均", "id":"MACD"},
{"name":"TRIX 三重指数平均线", "id":"TRIX"},
{"name":"UOS 终极指标", "id":"UOS"},
{"name":"TRIX 三重指数平均线", "id":"TRIX"}
]
},
{
"node":"成交量型",
"list":
[
{"name":"HSL 换手率", "id":"HSL"},
{"name":"OBV 累积能量线", "id":"OBV"},
{"name":"NVI 负成交量", "id":"NVI"},
{"name":"PVI 正成交量", "id":"PVI"},
{"name":"VOL 成交量", "id":"VOL"}
]
},
{
"node":"均线型",
"list":
[
{"name":"MA 均线", "id":"均线"},
{"name":"BBI 多空线", "id":"BBI"}
]
},
{
"node":"路径型",
"list":
[
{"name":"BOLL 布林线", "id":"BOLL"},
{"name":"BOLL副图 布林线", "id":"BOLL副图"},
{"name":"MIKE 麦克支撑压力", "id":"MIKE"},
{"name":"ENE 轨道线", "id":"ENE"}
]
},
{
"node":"能量型",
"list":
[
{"name":"BRAR 情绪指标", "id":"BRAR"},
{"name":"CYR 市场强弱", "id":"CYR"},
{"name":"MASS 梅斯线", "id":"MASS"},
{"name":"PSY 心理线", "id":"PSY"},
{"name":"CR 带状能量线", "id":"CR"},
{"name":"VR 成交量变异率", "id":"VR"},
{"name":"WAD 威廉多空力度线", "id":"WAD"}
]
}

]
};

return data;
}

//下载数据 如果上次下载过可以 可以不用下载
this.ReqeustData=function()
{
if($("#" + this.ID + " .target-left ul li").length>0){
return false;
}

var res=this.GetMenuData();
var item = res.list;
changeIndexLeftList(item); //处理左侧list列表
changeIndexRightList(item); //处理右侧内容列表

/*
var url = this.IndexTreeApiUrl;
if (this.IsOverlayIndex==true) url=this.OverlayIndexTreeApiUrl;
JSNetwork.HttpRequest({
Expand All @@ -84606,6 +84697,7 @@ function ChangeIndexDialog(divElement)
changeIndexRightList(item); //处理右侧内容列表
}
});
*/

//处理左侧list列表
function changeIndexLeftList(item) {
Expand Down
Loading

0 comments on commit 98d93cb

Please sign in to comment.