python - MACD indicator values (MACD line and signal line) calculated on cryptocurrency (EOS) live price data from Binance WebSocket
问题描述
I want to calculate the values of the MACD indicator. The MACD line and the Signal line. (Fast Lenght = 12) (Slow Lenght = 26) (Signal = 9) I'm connected to the Binance WebSocket and I receive live price data about the crypto pair EOS/USDT that I want to trade. The data I receive looks like this.
"e": "kline", // Event type
"E": 123456789, // Event time
"s": "BNBBTC", // Symbol
"k": {
"t": 123400000, // Kline start time
"T": 123460000, // Kline close time
"s": "BNBBTC", // Symbol
"i": "1m", // Interval
"f": 100, // First trade ID
"L": 200, // Last trade ID
"o": "0.0010", // Open price
"c": "0.0020", // Close price
"h": "0.0025", // High price
"l": "0.0015", // Low price
"v": "1000", // Base asset volume
"n": 100, // Number of trades
"x": false, // Is this kline closed?
"q": "1.0000", // Quote asset volume
"V": "500", // Taker buy base asset volume
"Q": "0.500", // Taker buy quote asset volume
"B": "123456" // Ignore
How can I calculate the values of the MACD indicator. The MACD line and the Signal line.?
From the live price data, I receive.
I basically need to calculate these MACD (MACD line and signal line) values from the live price data.
解决方案
推荐阅读
- amazon-web-services - 如何实现与 AWS EC2 的 10K 并发连接?
- javascript - 为每个新输入创建一个变量
- sql - 获取正确数据的 SQL 查询
- bluetooth - Raspberry Pi4 和 ESP32 之间的 BluePy 频繁 BLE 断开连接 - (蓝牙)
- rust - rust 文件的模块是什么?
- caching - 计算机的哪个部分管理缓存替换?
- javascript - 这些库之一不适用于 react-native
- c# - 实例化一个特定的变量会产生影响吗?C# 统一
- javascript - zoom.js 函数超出了 D3js 最大调用堆栈
- c - 从文件中读取行直到换行并将其存储在字符数组中