rufinomec-afk b35fd2eb5a merge: integra fase5 do Thiago (DOM, VWAP, big trades, trading, historical browser) mantendo fixes de ontem
- Combina on_history_ready_callback (replay reset) com on_big_trade_callback (Thiago)
- DOM subscription + visualização no canvas
- VWAP e delta profile no volume profile
- Big trades com alerta visual no canvas
- Endpoints /trade/buy, /trade/sell para execução via MQL5
- Historical Browser: date picker no header, /history/load e /history/live
- Trading panel no sidebar com botões BUY/SELL
- config/settings.py: mantém USTEC como padrão, adiciona BIG_TRADE_THRESHOLD
- Todos os fixes de ontem preservados: broadcast live, history_ready, replay reset

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 11:22:13 -03:00
2026-06-04 18:12:47 -03:00
2026-06-04 18:12:47 -03:00
2026-06-04 18:12:47 -03:00
2026-06-04 18:12:47 -03:00

YuClusters Local 📊

YuClusters Local is a professional footprint chart and volumetric cluster analyzer integrated directly with your local MetaTrader 5 (MT5) terminal.

Key Features

  • Real-Time Footprint Charting: Ticks polled at ~100ms intervals and visualised dynamically using an optimized HTML5 Canvas element.
  • Diagonal Imbalances Detection: Identifies aggressive buying or selling imbalances (R \ge 3.0).
  • Stacked Imbalances Highlights: Dynamically spots 3+ consecutive imbalances in the same direction.
  • POC Highlight: Identifies and highlights the highest volume nodes within each cluster using a gold border.
  • Interactive Drag & Pan UI: Fully-featured HTML5 Canvas dashboard with drag-to-scroll horizontal/vertical panning and zoom adjustment.

Installation & Setup

1. Prerequisites

  • Windows OS (required by MetaTrader 5 API)
  • MetaTrader 5 Terminal running locally and logged into your broker account
  • Python 3.11+ installed and added to PATH
  • Node.js 18+ installed

2. Backend Installation

  1. From the project root, install Python dependencies:
    pip install -r requirements.txt
    
  2. Set your environment configurations in config/settings.py or export them as environment variables (e.g. MT5_LOGIN, MT5_PASSWORD, MT5_SERVER).

3. Frontend Installation

  1. Navigate to the frontend/ folder:
    cd frontend
    
  2. Install npm packages:
    npm install
    

Execution Guide

1. Run the Backend Server

Start the FastAPI server (this will automatically launch the MetaTrader 5 polling collector):

python backend/server.py

2. Run the React Frontend

Start the Vite development server:

cd frontend
npm run dev

Open http://localhost:3000 in your web browser.


Technical Calculations (from SKILL.md)

  1. Diagonal Buy Imbalance: ask_vol[i] >= R * bid_vol[i-1] (compares with price level below)
  2. Diagonal Sell Imbalance: bid_vol[i] >= R * ask_vol[i+1] (compares with price level above)
  3. POC (Point of Control): Price level with the highest total volume (ask_vol + bid_vol) inside a cluster. If volumes tie, the highest price wins.
  4. Stacked Imbalance Zone: A vertical zone spanning 3 or more consecutive levels with the same imbalance direction.
S
Description
No description provided
Readme 153 KiB
Languages
MQL5 39.8%
JavaScript 30.9%
Python 27.3%
Shell 0.9%
HTML 0.5%
Other 0.6%