PROJECTS

BINANCE API DATA ANALYSIS

REASON FOR THIS PROJECT

As my previous project is not usable for collecting data as expected, because I made the script make way too many requests I decided to try to do the same using the Binance API. With this API the limit of my requests can be much higher, so seems like it is worth a shot. 

First I scraped RSI and BOLINGER BANDS data, as there was a strategy I wanted to try for trading. I made the code scrape all the data for RSI and BOLINGER BANDS for all the 141 symbols in my list. Here it is not scraping the indicators directly, but the script has to make its own calculations. I tried trading on the strategy that if price is above the upper BB and RSI was above 70 I would go short, and in the opposite case to go long. This strategy made it difficult to find a good entry so I searched the web for more strategies that I can use my code for.

I found an interesting one on YouTube that seems to be easier to use. It uses the MACD indicator and the EMA (exponential moving average). The MACD indicator is made of multiple parts, the ones I will use is the MACD line, Signal line and the Zero line along with the 200 EMA. So if the MACD line croses above the Signal line while bellow the Zero line and the price of the symbol is above the 200 EMA, this is a BUY signal. And puting this in reverse is a SELL signal.

 

This is some pretty specific logic to find an entry position and it also happens quite rarely, which makes this bot perfect for the task as it scrapes this data from 1128 graphs in half a minute. I extracted all this data along with 1 candle ago, as I need that data to see if there was a cross, to excel and made an excel formula that looks for this specific logic.

The script kept overwriting my data every time it ran. So instead of complicating things in the script i added macros to my excel file and made the script run them so that the excel formulas looking for the indicator signals run and the columns appended to the end of the data table. I also added an extra sheet where I stored the formulas and used VLOOKUP to create another table just with the formulas results as the previous tables have a lot of columns and is a bit more inconvenient to search for data there.

I added another macro to run at the end of the script that will always append the new data collected to the MACD_EMA_HISTORY table so I can later do analysis on past data.

I have updated my script to send me the dataframe on e-mail sorted with the rows that meet the criteria at the top. This way I keep getting updated with new trading opportunities on my e-mail every time the code runs.

THIS IS AN ONGOING PROJECT. MORE WILL BE ADDED SOON.

Scroll to Top