smzerehpoush/binance-spot-trading-bot

time_to_sell & time_to_by

Closed this issue · 1 comments

Hello, congratulations.
Have you an example for write time_to_sell & time_to_by ?
Thanks

DISCLAIMER

I have no responsibility for any loss or hardship incurred directly or indirectly by using this code.

USE IT AT YOUR OWN RISK!

def is_it_time_to_sell(symbol: str):
    logging.info('checking to is it time to sell symbol ' + symbol)
    suitable: bool = (rsi_fourteen_days_close(symbol) < 70 < rsi_fifteen_days_close(symbol))
    if suitable:
        logging.info('it is time to sell symbol ' + symbol)
    else:
        logging.info('it is not time to sell symbol ' + symbol)
    return suitable
	
	
def is_it_time_to_to_buy(symbol: str):
    logging.info('checking to is it time to buy symbol ' + symbol)
    suitable: bool = heikin_tow_days_before_yesterday(symbol) > 0 and heikin_yesterday(
        symbol) > 0 
    if suitable:
        logging.info('it is time to buy symbol ' + symbol)
    else:
        logging.info('it is not time to buy symbol ' + symbol)
    return suitable