I’m using this code to calculate pivot points. This returns an array with 0’s where there’s no pivots and the value of the pivot if there is one. When Comparing the results to TradingView (downloaded csv with pivot points), the only time it matches exactly is when lookback left and right are both 5. Otherwise it deviates in the number
Tag: trading
How to store High or Low values (trading)
I would like to develop a code which add a Series to my DataFrame; the Series should store the lowest value of the Close until a new low is reached. When a new low is reached a new value should appear in the Series. The starting code is: So, for example, if the most recent low of EURUSD is 1.1000,
fetch_balance method in ccxt won’t return all assets
As I call the fetch_balance method from kucoinfutures in ccxt, it only returns BTC, not any other assets. Shouldn’t there be other assets like USDT or ETH too? Here’s the python code: Here’s what I get from print(balance): Am I missing something? Answer It seems like fetchBalance only returns one currency at a time. To get USDT as the asset
What does “size” parameter in Kucoin futures API refer to?
Kucoin Futures API documentation for placing a limit order ( https://docs.kucoin.com/futures/#place-an-order ) has a param called “size” with type Integer. The description is given as “Order size. Must be a positive number”. A limit order to buy “CELRUSDTM” with param size = 1 results in an order placed to buy 10 CELR. A limit order to buy “ETHUSDTM” with param
Get order parameters from Python-Binance
I’m trying to get some parameters of my orders from Python-Binance API. In this case, I would like to get only the ‘status’ of an order and save it into a variable. I used this to get my last order : And I get this result: Tried to print just the status: But it returns an error: Answer Try this:
How to monitor multiple assets at the same time with a trading robot?
I am developing a trading robot in Python 3.8 and I need to know if you can give me any ideas to monitor multiple open orders simultaneously. The situation is as follows: When you want to sell an asset, the robot can monitor conditions permanently and easily evaluate the indicators to place the sell order (limit or market). But when
How to get ALL (or multiple) pair’s historical klines from Binance API in ONE request?
I have a trading bot that trades multiple pairs (30-40). It uses the previous 5m candle for the price input. Therefore, I get 5m history for ALL pairs one by one. Currently, the full cycle takes about 10 minutes, so the 5m candles get updated once in 10m, which is no good. Any ideas on how to speed things up?