With a simple Python script, it is possible to screen all Binance cryptocoins and filter them by applying technical indicators. For example you can easily find all cryptocoins in Binance Exhange with RSI lower than, say 35, and a negative MACD.
This is possible with a Python library called tradingview_ta which acts as a Python API wrapper. Using it, you can screen all Binance Cryptocoins and filter them according to certain technical indicators. Having said that, it is not recommended to use it as a real time buying and selling bot. Yet, it provides valuable insight into cryptocurrencies.
It is possible to use this tool without even installing Python. Tradingview-ta has an online version: https://tradingview.brianthe.dev/. I recommend you to check this page, because it contains the list of all available indicators.
Install the tradingview_ta Library
First, you need to install the library using terminal:
pip install tradingview_ta
or if you are using pip3, try the following:
pip3 install tradingview_ta
Now that we have installed the library, we can proceed to screen coins in Binance.
The Complete Code: Screen all Binance Cryptocoins and Filter Them by Applying Technical Indicators
This is the complete script to get all Binance cryptocoin data and filter out the ones according to certain technical indicators:
from tradingview_ta import * with open("Binance_Coins.txt", "r") as f: # Read the file, split it into a list, delete empty strings. symbols = [x for x in f.read().splitlines() if x != ""] analysis = get_multiple_analysis( screener="crypto", interval=Interval.INTERVAL_1_DAY, symbols=symbols) for key, value in analysis.items(): if value != None: open = value.indicators["open"] close = value.indicators["close"] # change_abs=value.indicators["change_abs"] macd = value.indicators["MACD.macd"] rsi = value.indicators["RSI"] stoch_rsi = value.indicators["Stoch.RSI.K"] ema20 = value.indicators["EMA20"] ema50 = value.indicators["EMA50"] ema200 = value.indicators["EMA200"] conditions = (value.indicators["EMA20"] > value.indicators["EMA50"]) and ( value.indicators["RSI"] < 45) and value.indicators["MACD.macd"] < 0 if ema20 and ema50 and rsi: if (conditions): print('COIN NAME:', key) print('OPEN PRICE:', open) print('CLOSE PRICE:', close) print('PRICE CHANGE: %', round(((close-open)/open*100), 2)) #print('ABS PRICE CHANGE',change_abs) print('MACD:', macd) print('RSI VALUES:', rsi) print('STOCK RSI VALUES:', stoch_rsi) print('EMA20 VALUES is:', ema20) print('EMA50 VALUES IS:', ema50) print('EMA200 VALUES IS:', ema200) print('1HOURS BUY ALERT!!!!') print()
This is an example of what you get when you run this code:
Details of the Code
Here, you need to create a Binance_Coins.txt and place it in the folder where you save your Python code. In other words, this text file and the Python code should reside in the same folder in your computer. Of course, it is also possible to run this code from Google Colab or a Jupyter Notebook.
Here is a copy of Binance_Coins.txt which contains USDT pairs of all coins in Binance:
If you want to change the interval, just change the following line:
analysis = get_multiple_analysis( screener="crypto", interval=Interval.INTERVAL_1_DAY, symbols=symbols)
In order to change the technical indicators, just alter the following lines (and corresponding variables above):
conditions = (value.indicators["EMA20"] > value.indicators["EMA50"]) and ( value.indicators["RSI"] < 45) and value.indicators["MACD.macd"] < 0
You can place this code into a timer and also make it send you an e-mail or SMS message.
That’s all for now. You can now screen all Binance cryptocoins and filter them by applying technical indicators that you want.
This content is for educational purposes only and you should not construe any such information or other material as legal, investment, financial, or other advice.