Ayushpanditmoto / Trading-Bot

Binary Trading AI Bot is a project idea aimed at developing an AI-powered bot for binary trading. The bot utilizes machine learning algorithms to predict the direction of the next candle (whether it will move up or down) with high accuracy.
51 stars 50 forks source link

Request to update the readme file #84

Open vedi9969 opened 3 months ago

vedi9969 commented 3 months ago

I would like to update the readme file by adding setup and installation process like how they can clone the project, how to make PR in project and so on many such things so the contributors can know how to do it. It will help many other who visits the project. I've noticed that there it is written but the given information is not much, so i would like to update it please give the acess for it. Below I've attached the image please refer it. 2

Nikoo4 commented 1 month ago

I would like to update the readme file by adding setup and installation process like how they can clone the project, how to make PR in project and so on many such things so the contributors can know how to do it. It will help many other who visits the project. I've noticed that there it is written but the given information is not much, so i would like to update it please give the acess for it. Below I've attached the image please refer it. 2

Hello,

I'm reaching out because I've been struggling to install a bot for the past 10 days, and unfortunately, I haven't been successful yet. I've tried multiple times, but every time I reach the step where I need to enter the login and password, the bot stops working and doesn't proceed further.

If anyone here has experience with this or knows how to solve this issue, I would greatly appreciate your help. I really need this bot to be installed correctly. You can find me on Telegram at @Nikoo665.

I would be very grateful for any assistance or advice you can offer. Thank you in advance for your time and help!

Best regards, Nikoo

Nikoo4 commented 1 month ago

Hello,

I'm reaching out because I've been struggling to install a bot for the past 10 days, and unfortunately, I haven't been successful yet. I've tried multiple times, but every time I reach the step where I need to enter the login and password, the bot stops working and doesn't proceed further.

If anyone here has experience with this or knows how to solve this issue, I would greatly appreciate your help. I really need this bot to be installed correctly. You can find me on Telegram at @Nikoo665.

I would be very grateful for any assistance or advice you can offer. Thank you in advance for your time and help!

Best regards, Nikoo

Nikoo4 commented 1 month ago

Hello,

I'm reaching out because I've been struggling to install a bot for the past 10 days, and unfortunately, I haven't been successful yet. I've tried multiple times, but every time I reach the step where I need to enter the login and password, the bot stops working and doesn't proceed further.

If anyone here has experience with this or knows how to solve this issue, I would greatly appreciate your help. I really need this bot to be installed correctly. You can find me on Telegram at @Nikoo665.

I would be very grateful for any assistance or advice you can offer. Thank you in advance for your time and help!

Best regards, Nikoo @vedi9969

vedi9969 commented 1 month ago

Hi @Nikoo4

Thank you for sharing the details. So ensure that your API_KEY and API_SECRET are correct and active. You can double-check this in your Alpaca account. If there's an issue with the credentials, the bot might fail when attempting to log in. Make sure that your Alpaca account is set to Paper Trading mode if you're using the paper API. This needs to match the PAPER=True configuration in your bot setup. Then you can test your connection to the Alpaca API separately to ensure it's working.

code

from alpaca_trade_api import REST api = REST(API_KEY, API_SECRET, BASE_URL) account = api.get_account() print(account)

end

If this request fails, the issue might be with the API setup or your internet connection, rather than the bot itself. If the bot stops working after entering the login and password, there might be an issue with how the login credentials are being handled or passed. RUn this line self.api = REST(base_url=BASE_URL, key_id=API_KEY, secret_key=API_SECRET) Implement exception handling around the API calls to catch any potential errors and print them out for easier debugging. For example:

try: news = self.api.get_news(symbol=self.symbol, start=three_days_prior, end=today) except Exception as e: print(f"Error retrieving news: {e}")

In the main.py file (with customtkinter), make sure that the login credentials entered into the GUI are properly validated before passing them to the bot logic. You can ensure this by checking for empty inputs or incorrect formats in the login() function. And if the login works, but the bot crashes afterward, there might be an issue with the estimate_sentiment function. Ensure that this function is implemented correctly and handles edge cases (like empty news data or connection issues). I think this might help you lemme know if there's still a problem. Also try setting a virtual environment or docker

Nikoo4 commented 1 month ago

Hello!

Thank you for replying to my previous message. I've been trying to install and run this bot for a week now, but I keep facing several serious issues:

Incomplete Instructions:

I followed the instructions from the repository, but they are incomplete and do not cover all the steps required for installing and running the bot. Missing and Incompatible Libraries:

The requirements.txt and other files list versions of libraries that don't exist online. I tried finding the correct versions, but it's not always clear which ones are suitable for this bot. I encounter compatibility errors, and the installation stops. For example, there's a library listed that I can't find in any repository, and some libraries seem outdated and are not supported by current Python versions. Python and pip Versions:

I am using Python and pip, but still encountering errors. It would be helpful to understand which versions are best suited for this bot. Trading API Keys:

The broker offers two different APIs: one for trading and one for brokers, and it’s unclear which one to use. There is no clear explanation of which key is suitable for the bot’s correct operation. Issues with Bot Execution:

Even after installing all available libraries, the bot does not start properly. The GUI opens, but after entering the login and password, the bot does nothing. I would also like to know how to correctly check logs and where exactly to find them for troubleshooting. If you have a complete guide or the correct file with all the installation and startup steps for the bot, it would be incredibly helpful. I really want to get this up and running, but the current guidance is incomplete and leads to constant errors. Thank you in advance for your help and recommendations! @vedi9969

vedi9969 commented 1 month ago

I would suggest try using python 3.7 or 3.8 version and update the pip using the command python -m pip install --upgrade pip

You should use the Trading API for the bot’s correct operation. The Broker API will not be useful unless you need account-related functionality like balance inquiries, which most trading bots do not typically require. For Paper Trading API: BASE_URL = "https://paper-api.alpaca.markets"

For Live Trading API: BASE_URL = "https://api.alpaca.markets"

If the GUI opens but the bot doesn’t respond after you enter the login and password, it’s likely an issue with the login logic or API connection. Here’s what you can do: Verify API Credentials: Ensure that the API keys you entered in the code (for Alpaca or other brokers) are valid and that you are using the correct environment (paper or live). Check Network Connectivity: Ensure the bot is able to connect to the broker’s API by checking for firewall or network-related issues. Login Logic: If the credentials are correct, the problem could be the logic in the login() function. Add print statements to check if the function is being executed correctly after the login button is clicked.

You can add a logging system to capture errors or actions when running the bot: import logging

logging.basicConfig(filename='bot.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

def login(): username = username_entry.get() password = password_entry.get() logging.debug(f"Login attempted with username: {username}")

Honestly, I don't have that much experience in this area, so I feel a bit out of my depth with this. I think it would be more effective if the project admin or someone more familiar with the setup could step in and provide some guidance. Their insight could be really helpful in identifying what's going wrong and how to resolve it.

@Nikoo4 @Ayushpanditmoto