Trade Warehouse (SPOT trades)Hello there!
Let's imagine You are trading SPOT, buy more and more every new dump, but bear market is not going to stop... and your first trade was 3 YEARS AGO!!!
Can't believe it is true.
The problem is - exchanges allow You to see only new trades last 6 months(Binance). But I want to see all of them! How do I know AVG Price?
This script is my solution. Just use it to track and store your trade, so You can see AVG without uploading old trades everytime and using calculator.
Script description:
Here You can see the "Trade" type of variable. Python script using Pandas converts trades from .csv file into string type that You can input as trade(price, pair, amount, date..). After it uppends to the trades_array and pushed into the loop.
If trade date is more than current cundle - it pushes new trade to other arrays such a "pair", "avg_tot" etc. to comput it later.
If trade was buy - it increase invested capital and owned amount, opposite for sell and recomputs AVG price.
Since script has at least 1 trade it starts to plot AVG price.
There are 2 AVG price:
1. For total invested counting(You can get negative value if traded successful)
2. Current AVG price since last 0 currency amount(there is dust value to set how many usd we take as dust)
Table represents all assets statistics
Just upload your trades only 1 time, use script to convert it into pine code, and use as indicator. This script allow You to see ALL trades from oldest to the newest.
github.com/Arivadis/...w_Tradings_warehouse
If this script helped You - press Star (on GitHub) Like (on TradingView)
Warning -
Does not include free/earn/withdraw/deposit counting. Only Buy and Sell =>
This script has no idea about your side currency deposits, so if You got Your BTC or EUR or .. from another wallet and sold later - it can break your statistical data. Add this transfer manually(see examples inside script).
Use my github manual to get this script workin.
Installing takes around 3 minutes and contains 3-5 steps