介绍:
Technical Ratings是一种技术分析工具,它结合了几种技术指标的评级,使交易者和投资者更容易找到有利可图的交易。
URL:https://www.tradingview.com/symbols/BTCUSDT/technicals/
通过几个技术指标,来分析出买卖信号,具体的计算方法可见网页。
大致有以下指标:
-
MACD
-
RSI
-
移动平均线
-
布林带
-
等等
相关github仓库:
python版本:
仓库地址:python-tradingview-ta
演示界面:TradingView-TA Demo
示例代码:
1 | from tradingview_ta import TA_Handler, Interval, Exchange |
输出的结果:
1 | {'RECOMMENDATION': 'BUY', 'BUY': 10, 'SELL': 6, 'NEUTRAL': 10} |
go版本:
仓库地址:go-tvscanner
参考该仓库,知道怎么构造出post的数据包:
1 | {"symbols":{"tickers":["BINANCE:BTCUSDT"],"query":{"types":[]}},"columns":["Recommend.Other|120","Recommend.All|120","Recommend.MA|120","RSI|120","RSI[1]|120","Stoch.K|120","Stoch.D|120","Stoch.K[1]|120","Stoch.D[1]|120","CCI20|120","CCI20[1]|120","ADX|120","ADX+DI|120","ADX-DI|120","ADX+DI[1]|120","ADX-DI[1]|120","AO|120","AO[1]|120","AO[2]|120","Mom|120","Mom[1]|120","MACD.macd|120","MACD.signal|120","Rec.Stoch.RSI|120","Stoch.RSI.K|120","Rec.WR|120","W.R|120","Rec.BBPower|120","BBPower|120","Rec.UO|120","UO|120","EMA10|120","close|120","SMA10|120","EMA20|120","SMA20|120","EMA30|120","SMA30|120","EMA50|120","SMA50|120","EMA100|120","SMA100|120","EMA200|120","SMA200|120","Rec.Ichimoku|120","Ichimoku.BLine|120","Rec.VWMA|120","VWMA|120","Rec.HullMA9|120","HullMA9|120","Pivot.M.Classic.S3|120","Pivot.M.Classic.S2|120","Pivot.M.Classic.S1|120","Pivot.M.Classic.Middle|120","Pivot.M.Classic.R1|120","Pivot.M.Classic.R2|120","Pivot.M.Classic.R3|120","Pivot.M.Fibonacci.S3|120","Pivot.M.Fibonacci.S2|120","Pivot.M.Fibonacci.S1|120","Pivot.M.Fibonacci.Middle|120","Pivot.M.Fibonacci.R1|120","Pivot.M.Fibonacci.R2|120","Pivot.M.Fibonacci.R3|120","Pivot.M.Camarilla.S3|120","Pivot.M.Camarilla.S2|120","Pivot.M.Camarilla.S1|120","Pivot.M.Camarilla.Middle|120","Pivot.M.Camarilla.R1|120","Pivot.M.Camarilla.R2|120","Pivot.M.Camarilla.R3|120","Pivot.M.Woodie.S3|120","Pivot.M.Woodie.S2|120","Pivot.M.Woodie.S1|120","Pivot.M.Woodie.Middle|120","Pivot.M.Woodie.R1|120","Pivot.M.Woodie.R2|120","Pivot.M.Woodie.R3|120","Pivot.M.Demark.S1|120","Pivot.M.Demark.Middle|120","Pivot.M.Demark.R1|120"]} |
API返回的结果
1 | {TotalCount:1 Data:[{S:BINANCE:BTCUSDT D:[0 0.46666667 0.93333333 63.51210379 59.16581691 69.6146242 68.77283822 66.12746449 69.58510338 74.54963546 57.42929389 26.81879053 26.58069963 17.69170375 24.38588284 19.30006705 120.68555882 118.20594118 -16.13 2.18 36.17025233 31.34725473 0 35.82221959 0 -24.16629056 0 77.60112301 0 55.57177607 17193.7 17172.53237578 17171.406 17159.0189826 17163.489 17127.90662836 17120.4805 17110.9071456 17065.16733333 17100.63520803 17082.0938 17090.49811186 17123.4215 17048.52958648 17064.7978 0 17072.69 1 17123.32935619 1 17171.53274074 17160.14 17235.4847 16981.06765146 17259.89334854 116.08352941 4857.7718 0.19545272 17155.5 17219.79]}]} |
结合python版本的代码,帮助我们格式化返回的结果。最终可以获取到我想要的数据,布林带的上下界
1 | package main |
输出结果:
1 | Starting |