TradingViewAlerts is a Python script that allows you to automate the process of reading and processing alerts from TradingView and taking actions based on those alerts.
TradingViewAlerts is a tool designed to simplify the process of interacting with TradingView alerts within your Python projects. Whether you're using TradingView for trading signals, technical analysis, or other purposes, this script can help you automate the handling of alerts.
- Alert Parsing: Automatically parse alerts received from TradingView.
- Action Execution: Define custom actions to take based on specific alerts.
- Integration: Easily integrate TradingView alerts into your trading or analysis workflow.
- Customization: Configure the script to fit your specific requirements.
To use TradingViewAlerts, follow these installation steps:
-
Clone this repository to your local machine.
git clone https://github.com/ppkantorski/TradingViewAlerts.git
-
Navigate to the project directory.
cd TradingViewAlerts
-
Install the required Python dependencies.
-
Configure the script by editing the config.json file. Add your TradingView credentials and define the actions to be taken for specific alerts.
-
Run the script.
python tradingview_alerts.py
-
The script will continuously monitor your TradingView alerts and execute actions based on the configured rules.
The config.json
file is used to configure the behavior of TradingViewAlerts. You can define the following parameters:
STRATEGY_COLUMNS
: List of columns to include in the strategy data.CREDENTIALS_FILE
: The file containing your GMAIL API credentials.TOKEN_FILE
: The file used to store authentication tokens.
Example config.json
:
{
"STRATEGY_COLUMNS": [
"Source",
"Presets",
"Message",
"Timestamp",
"Timeframe",
"Open",
"High",
"Low",
"Close",
"Volume"
],
"CREDENTIALS_FILE": "client_secret.apps.googleusercontent.com.json",
"TOKEN_FILE": "token.json"
}
In addition to config.json
, you can also configure Telegram integration using the telegram_config.json
file. This file allows you to set up and manage your Telegram bot's API credentials.
Example telegram_config.json
:
{
"chat_id": "-100000000",
"token": "123456789:abcdefghijklmnop"
}
In this example, you should provide your specific Telegram bot's chat_id
and token
. These values are essential for configuring the Telegram integration correctly.
Please make sure to customize the telegram_config.json
file with your Telegram bot's specific chat_id
and token
according to your requirements.
Contributions are welcome! If you have any ideas, improvements, or bug fixes, please open an issue or submit a pull request. Make sure to follow the project's coding style and guidelines.
This project is licensed under the CC-BY-NC-4.0 License.