Buy Sell Alerts PEPE USDT - Captured Toast Notifications
2024-09-27

Strategy Explanation:
Indicators:

RSI (Relative Strength Index): The RSI is set to a period of 8 with thresholds for overbought and oversold levels. Buy signals occur when the RSI crosses above the lower threshold (33), indicating a potential oversold condition. Sell signals occur when RSI crosses below the upper threshold (63), signaling potential overbought conditions.

Lower RSI Threshold (33): Represents the oversold level, triggering buy signals.
Upper RSI Threshold (63): Represents the overbought level, triggering sell signals.
EMA (Exponential Moving Average): The EMA is calculated over 9 periods, and it's used in conjunction with the VWMA to identify trend direction. Buy signals occur when the price is above the VWMA, signaling an uptrend.

VWMA (Volume Weighted Moving Average): The VWMA is calculated over 20 periods and takes into account the volume. If the 9-period EMA is above the VWMA, this confirms a bullish trend, helping to filter buy signals.

Signal Strategy:

Buy Signal (Long Only): A buy signal is triggered when the RSI crosses above the lower threshold (33) and the 9-period EMA is greater than the VWMA. This suggests that the market is gaining bullish momentum, and a long position is opened.

Exit Signals:

Take Profit: A profit target is set at 0.5% above the entry price.
Stop Loss: A stop loss is placed at 0.3% below the entry price to protect against large losses.
Manual Sell: If the RSI crosses below the upper threshold (63) and the EMA falls below the VWMA, it triggers a manual sell to exit the position.
Automated Execution with Power Automate & Python:

Alert Capture with Power Automate:

I have configured Power Automate to capture the toast notifications from TradingView’s desktop app. These notifications correspond to buy, sell, take-profit, and stop-loss alerts triggered by the TradingView strategy.
Power Automate then converts these alerts into text and logs them into a file.

Python Script to Execute Orders:

The Python script continuously monitors the log file for updates. When a new entry (alert) is detected, the script parses the text to check whether it’s a buy or sell signal.
Depending on the signal, the Python script connects to Binance’s API and places the corresponding buy or sell order.
This automated process ensures timely trade execution without manual intervention, keeping the trades aligned with the TradingView strategy.
