Skip to content

Latest commit

Β 

History

History
65 lines (49 loc) Β· 2.16 KB

File metadata and controls

65 lines (49 loc) Β· 2.16 KB

100 Backtesting Trading Strategic Bot

This project automates the process of backtesting trading strategies by simulating 100 test trades per signal using webhook alerts from TradingView. It is designed to help traders validate the effectiveness of strategies like BOS (Break of Structure), FBO (False Breakout), RSI divergence, and more.

πŸ” Run 100 backtests in seconds. Automate, validate, and optimize your strategy before going live.


πŸ“Œ Features

  • πŸ”— Webhook Integration with TradingView
  • βš™οΈ Automated 100 backtest runs per alert
  • πŸ“Š Google Sheets logging or Excel support
  • 🧠 Strategy Logic:
    • M2 (BOS + Liquidity Grab)
    • FBO (False Breakout + RSI divergence)
    • S1 (Momentum & RSI + ATR SL/TP)
  • πŸ’‘ Custom SL/TP calculations based on ATR and volatility
  • πŸ•’ Timestamps auto-generated for realistic simulation
  • 🌐 Easy deployment using Flask + Ngrok or cloud server

πŸ› οΈ Tech Stack

  • Python (Flask)
  • Google Sheets API / Excel
  • Ngrok / LocalTunnel
  • TradingView Webhooks
  • Optional: Backtrader for advanced backtesting engine

πŸš€ How It Works

  1. Set your strategy rules in app.py.
  2. Send alerts from TradingView β†’ Webhook triggers the bot.
  3. The bot runs 100 simulated backtests using randomized or structured mock data.
  4. Logs results (entry, SL, TP, returns, win/loss) to Google Sheets or CSV.
  5. Review win rate and optimize your strategy.

πŸ“‚ Project Structure

πŸ“ 100-backtesting-trading-strategic-bot/ β”‚ β”œβ”€β”€ app.py # Flask server to handle webhooks β”œβ”€β”€ strategy.py # Strategy logic and validation β”œβ”€β”€ mock_generator.py # Generates fake 100-entry dataset per alert β”œβ”€β”€ logger.py # Logs to Google Sheets or Excel β”œβ”€β”€ config.py # API keys, strategy params β”œβ”€β”€ requirements.txt # Python dependencies └── README.md # Project overview

πŸ§ͺ Example Use Case

  • You design an FBO strategy with RSI divergence and BB re-entry.
  • You configure your rules in strategy.py.
  • On every alert from TradingView, the bot:
    • Validates the entry
    • Simulates 100 trades with variations
    • Calculates returns
    • Sends data to your Google Sheet