TreborNamor/TradingView-Machine-Learning-GUI

HyperView is a terminal-first TradingView strategy lab for downloading market data, backtesting Python strategies with Pine-like behavior, and optimizing SL/TP parameters.

What it solves

HyperView is designed to bridge the gap between TradingView's visual strategy development and rigorous quantitative validation. It solves the problem of slow, manual parameter optimization on charts, discrepancies between Pine Script execution and local Python scripts, and the lack of a standardized pipeline for managing market data and strategy reports across multiple symbols and timeframes.

How it works

The toolkit provides a CLI-first workflow that follows a specific sequence: downloading data, generating signals, backtesting, and optimizing.

  1. Data Acquisition: It connects to TradingView's websocket (using browser session cookies) to download historical candle data.
  2. Signal Generation: It uses a pluggable Python strategy framework with TA-Lib for indicator parity with TradingView.
  3. Backtesting: It simulates trades using TradingView-parity fill assumptions, such as next-bar-open entries and intrabar stop-loss/take-profit simulation.
  4. Optimization: It employs Bayesian optimization via Optuna (TPE) to find the best stop-loss and take-profit parameters, which can then be injected back into exported Pine scripts.

Who it’s for

It is intended for traders and quantitative researchers who use TradingView for ideation but require a faster, automated, and reproducible way to validate and optimize their trading systems in Python.

Highlights

  • TradingView Parity: Implements next-bar-open entries and intrabar SL/TP paths to match TradingView's execution behavior.
  • Automated Pipeline: A unified CLI for the entire workflow from download -> signal -> backtest -> optimize -> export.
  • Bayesian Optimization: Uses Optuna for efficient SL/TP parameter searching instead of brute-force grids.
  • Pine Script Integration: Ability to optimize parameters in Python and export the results as optimized Pine scripts.
  • Portfolio Aggregation: Mathematically correct portfolio statistics computed from combined equity curves for multi-pair runs.
  • Extensive Indicator Library: Includes 20 wrapped TA-Lib indicators and direct access to over 150 TA-Lib functions.

Related

  • Project
  • Project
  • Project
  • Project
  • Project