Giter Site home page Giter Site logo

jptsantossilva / bec Goto Github PK

View Code? Open in Web Editor NEW
40.0 6.0 10.0 7.4 MB

Trading bot for Binance exchange using EMA cross strategy on 1D, 4h, and 1h timeframes. Analyzes 4yrs of coin prices to select profitable EMA cross. Auto-identifies accumulation and bullish phases. Has web dashboard and Telegram alerts.

License: MIT License

Python 17.53% Dockerfile 0.01% HTML 82.46%
binance crypto cryptocurrency ema python trading-bot telegram telegram-api auto-trading auto-trading-bot autotrading cryptocurrency-trading-bot trading bitcoin streamlit

bec's Introduction

Like my work?

Buy Me a Coffee at ko-fi.com

BEC - Bot EMA Cross

Trading bot for Binance exchange using EMA cross strategy with Telegram integration and web dashboard.

Installation

Installation instructions

Updates

Follow the last updates from the change log here

Backtest results

Check here the returns in % using last 4 years of backtest data. Results from 9th january 2023.

Features

  • Runs 1D, 4H and 1H time frames.
  • Trade against stables pairs (USDT) or against BTC.
  • Automatically chooses, on a daily basis, symbols that are in accumulation phase (price close>DSMA200>DSMA50) or bullish phase (price close>DSMA50>DSMA200).
  • For those symbols in accumulation and bullish phases, calculates EMA cross combination (with backtesting python library) with highest returns for 1D, 4H and 1H time frames. 4-years of historicals prices are used in backtesting.
  • Each symbol will be traded with its best EMA cross on each timeframe.
  • If best EMA result is negative the symbols will be ignored and will not be traded.
  • Web dashboard with realized and unrealized PnL, blacklist, Top Performers, Backtesting Results, etc.
  • Telegram message notifications - every time bot is executed; open position; close position; position status summary; symbols in accumulation and bullish market phases
  • Blacklist - symbols to be ignored. Bot will not trade them.

dashboard upnl rpnl signals top_perf blacklist bema settings

Disclaimer

This software is for educational purposes only. Use the software at your own risk. The authors and all affiliates assume no responsibility for your trading results. Do not risk money that you are afraid to lose. There might be bugs in the code. This software does not come with any warranty.

๐Ÿ“ License

This project is MIT licensed.

Copyright ยฉ 2023 Joรฃo Silva

bec's People

Contributors

jptsantossilva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bec's Issues

Adjust trading pair considering market cycle

The bot should adjust for periods where it is to trade the BTC pair and for periods to the stable coin pair.
The idea must be converted to an algorithm.
Use bitcoin dominance and 20WMA to provide insight.

E0aXkdZVEAA-EMG

How can I connect to the dashboard?

Hello,

I finally was able to get this to work after your last update. Thanks a lot for a wonderful project.

Please how can I connect to the dashboard? It's requesting for a username and password.

Hope to hear from you soon.

Regards

Blacklist some coins

Hi mate,

Is it possible to blacklist some coins from being processed by the bot?

Coinpair csv files ema cross with best performance

Add a csv file with best performance ema cross for each coin pair. Every time the bot runs it will apply the selected EMA's.
coinpair,timeframe,fastema,slowema
BTCUSDT,1h,16,42

This file can be updated manually but can also be updated automatically. How? Using backtesting python library. If we could run backtesting for the coin pair for the past x period (example days) and get the best performance ema cross, that could be uploaded to the above csv file and would be applied on the next bot run.

How can I set the Tokens to watch?

How can I set the Tokens or coins to watch for signals? i don't need all the coins as we have as default just some selected few.

Please advise.

Dashboard Error

image

What could be causing this error? When running, this message appears.

Error after update

image

After performing the last update I had the error above. What can it be? How to fix?

Signals Log Empty on Dashboard Despite Receiving Telegram Signals

Description:
I've been receiving signals via Telegram as expected, but when I check the Signals Log on the Dashboard, it's empty. The signals that are being sent to Telegram are not being reflected in the Dashboard's Signals Log.

Steps to Reproduce:

Receive a signal in Telegram.
Open the Dashboard and navigate to the Signals Log.
Expected Behavior:
The signals that are received in Telegram should also appear in the Signals Log on the Dashboard.

Actual Behavior:
The Signals Log on the Dashboard is empty, even though signals are being received in Telegram.

image Screenshot 2023-07-08 alle 07 56 56

Telegram Bot

Hello, I want to congratulate you for the good work.

I am having this frequent error: send_telegram_message - An Http Error occurred:HTTPError('404 Client Error: Not Found for url: https://api.telegram.org/botNone/sendMessage?text=

It's like the bot doesn't get the token entered in the configuration.

Position size weighting strategies

Considering weighting strategies for position size.
Currently, position size is using 5% of available stable coin. Example, 1000 usdt, so position size is 50.
I'm thinking in a way where position size takes market cap into consideration. I want to get bigger positions sizes on high market cap coins and lower positions on lower market cap coins (riskier).

Let me know what you think in the comments!

Some Telegram messages are not being sent

Hi,

I am trying out your bot, so for it looks great! There is one problem tho. It looks like some messages are not being sent to Telegram. This is what i see in the main.log file:

2023-03-27 09:00:27 PM - send_telegram_message - An Http Error occurred:HTTPError('401 Client Error: Unauthorized for url: https://api.telegram.org/bot2137019384:AAEvrirNoTAUDxZVybi[SNIP]%22%20/sendMessage?chat_id=[SNIP]%22+&text=%3Cpre%3E%E2%8F%B9+Binance+Trader+Bot+-+End%3C%2Fpre%3E&parse_mode=HTML')
Traceback (most recent call last):
  File "/home/binance/telegram.py", line 174, in send_telegram_message
    resp.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.telegram.org/bot2137019384:AAEvrirNoTAUDxZVy[SNIP]%22%20/sendMessage?chat_id=[SNIP]%22+&text=%3Cpre%3E%E2%8F%B9+Binance+Trader+Bot+-+End%3C%2Fpre%3E&parse_mode=HTML
2023-03-27 09:00:28 PM - send_telegram_message - An Http Error occurred:HTTPError('401 Client Error: Unauthorized for url: https://api.telegram.org/bot2137019384:AAEvrirNoTAUDxZVy[SNIP]%22%20/sendMessage?chat_id=[SNIP]%22+&text=%3Cpre%3EExecution+Time%3A+24s%3C%2Fpre%3E&parse_mode=HTML')
Traceback (most recent call last):
  File "/home/binance/telegram.py", line 174, in send_telegram_message
    resp.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.telegram.org/bot2137019384:AAEvrirNoTAUDxZVy[SNIP]%22%20/sendMessage?chat_id=[SNIP]+&text=%3Cpre%3EExecution+Time%3A+24s%3C%2Fpre%3E&parse_mode=HTML

I've cut out parts of my telegram ID with [SNIP]

I am sure the telegram ID is correct, because i am receiving the 4h messages. I use the same telegram id for all 3 timeranges (4h, 1h, 1d). Is that ok?

Please let me know if i am doing something wrong on my side.

Thank you, and keep up the great job!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.