天津市建设工程定额网站,郑州网站设计 品牌 视觉,一键装修效果图软件,清控人居建设集团网站在前面两个笔记#xff1a; PythonTDengine从零开始搭建量化分析平台-数据存储 PythonTDengine从零开始搭建量化分析平台-MA均线的多种实现方式
中有提到使用 Grafana 画图#xff0c;不过画的都是均线。除了均线#xff0c;Grafana 非常人性的提供了 K线图模块 搭配 TDeng…在前面两个笔记 PythonTDengine从零开始搭建量化分析平台-数据存储 PythonTDengine从零开始搭建量化分析平台-MA均线的多种实现方式
中有提到使用 Grafana 画图不过画的都是均线。除了均线Grafana 非常人性的提供了 K线图模块 搭配 TDengine 配置简单一键生成。
1.新建一个Panel选择 Candlestick 2.数据源选择 TDengine填入数据
最高价
select _wstart,max(high) as high from trade_data_a.tdata where fcode000001 and tdate$from and tdate$to interval(1d)最低价
select _wstart,min(low) as low from trade_data_a.tdata where fcode000001 and tdate$from and tdate$to interval(1d)收盘价
select _wstart,last(close) as close from trade_data_a.tdata where fcode000001 and tdate$from and tdate$to interval(1d)Grafana 会使用上一日收盘价作为当日开盘价。
3.点击 Apply
K线图就画好了。