lunedì 31 agosto 2020

PYTHON - MACHINE LEARNING

I couldn't rely on existing databases for my machine learning project. I need a highly plastic database, so I decided to implement mine. 
Using json and python files I can modify the structures of the tables without having to worry about modifying existing queries, they adapt to changes automatically.
The idea is that, when the machine does not find the data in its databases, it searches for them with the means at its disposal, automatically evaluating which is the best way to search for a given data. The decision tree will automatically expand with the accumulated experience. 
It is not impossible, but it will be long. For now I start building my database.



venerdì 28 agosto 2020

PYTHON - INDICATORE

Ore 13:25 del 28 agosto 2020
Grafico tracciato da Indicatore.
Vendere BATUSDT a 0.3484
TP a 0.3427

Non è un suggerimento di investimento.
Sto solo testando il mio nuovo BOT INDICATORE scritto in Python.

mercoledì 26 agosto 2020

PYTHON - MA and BOOKORDER SCALPING


Scalping signal indicator written in python. It is based on Binance data.
The simpleBinanceFut.py module can be downloaded from GitHub.
https://github.com/DanielePorcari/simpleBinanceFutures

import simpleBinanceFut as sBF

def MA(dati,periodo):
    ris=0
    i=len(dati)-1
    for c in range(periodo):
        if i>=periodo:
            prezzo=(float(dati[i][4]))
            ris=ris+prezzo
            i-=1
    ris=ris/periodo
    return ris

def bookBot(up):
    volMax=0
    priceMax=0
    if up:
        for i in range(len(book['bids'])):
            price=float(book['bids'][i][0])
            vol=float(book['bids'][i][1])
            if float(vol)>float(volMax):
                volMax=vol
                priceMax=price
        print("Buy: ",priceMax)
        volMax=0
        priceMax=0
        for i in range(len(book['asks'])):
            price=book['asks'][i][0]
            vol=book['asks'][i][1]
            if float(vol)>float(volMax):
                volMax=vol
                priceMax=price
        print("TP: ",priceMax)
    else:
        for i in range(len(book['asks'])):
            price=float(book['asks'][i][0])
            vol=float(book['asks'][i][1])
            if float(vol)>float(volMax):
                volMax=vol
                priceMax=price
        print("Sell: ",priceMax)
        volMax=0
        priceMax=0
        for i in range(len(book['bids'])):
            price=book['bids'][i][0]
            vol=book['bids'][i][1]
            if float(vol)>float(volMax):
                volMax=vol
                priceMax=price
        print("TP: ",priceMax)

coppia=input("Insert asset: ")
print("Last price: ",sBF.fbin_ultimo_prezzo(coppia))
tf=input("Insert tf:")
book=sBF.fbin_book(coppia)
prezzi=sBF.fbin_candlestick(coppia,tf,"99")
ma9=MA(prezzi,50)
ma25=MA(prezzi,25)
if ma9>ma25:
    up=True
else:
    up=False
bookBot(up)