trading

Is that possible to retrieve historical fees for crypto transactions?

Is that possible to retrieve historical fees for crypto transactions? Question: I know that it should be possible to find such data for bitcoin, but what I want is somewhat unified solution. E.g. I give a network name and timestamp – and receive something like average transaction fees for this network at that time. I …

Total answers: 1

How to remove duplicated buy signal

How to remove duplicated buy signal Question: I’m testing my stock trading logic and I made a position column to check the buying / selling signal df = pd.DataFrame({‘position’: [1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]}) I want to replace 1.0 …

Total answers: 3

Pivot function results differ from TradingView

Pivot function results differ from TradingView Question: I’m using this code to calculate pivot points. def pivots_low(osc, LBR, LBL): pivots = [] for i in range(len(osc) – LBR): pivots.append(0) pivot = True if i > LBL: for j in range(1, LBR + 1): if osc[i] >= osc[i + j]: pivot = False for j in …

Total answers: 1

CandleChart with Bollinger bands not rendering

CandleChart with Bollinger bands not rendering Question: I have here a MWE (minimum working example), that I fail to run? I can’t found my error sadly. The only thing that the consoler tells me is that there are too many ticks. But I don’t understand why as there is only 3 months of data. import …

Total answers: 1

Getting column with days from first observed – trading data

Getting column with days from first observed – trading data Question: So I have some Trading data, and ultimately I would like to find 1 week return 1 month, 3 month and so on. To do this I think it is easiest if I can get a column with days existed for each asset. Data …

Total answers: 2

Available data in TradingView's exported chart data file

Available data in TradingView's exported chart data file Question: To back-test a trading strategy, I use the replay feature in trading view and mark my trades by adding a "long position" or "short position" from the left panel. Like this: I need to save the data (chart data including the positions, or any other drawing …

Total answers: 1

What does "size" parameter in Kucoin futures API refer to?

What does "size" parameter in Kucoin futures API refer to? Question: 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 …

Total answers: 2

Backtesting multiple stocks using Python

Backtesting multiple stocks using Python Question: I am now using Pyalgotrade, which is a popular python library for testing trading strategy. I want to write a loop which can test couples of stocks one after another. Suppose I want to put the following 6 stocks into this strategy, and tun each stock one time and …

Total answers: 2