Skip to content

onlyvictus-bit/pine-vs-python

Repository files navigation

Trading Strategy Comparator

Trusted-local desktop app for comparing Pine Script and Python strategies on the same candle data, charting both outputs side by side, and checking whether their indicators, signals, and trade behavior align.

Current Status

This repository is v1 complete for trusted single-user local desktop use.

What is real today:

  • Windows desktop installer with Electron + bundled FastAPI backend
  • First-run demo dataset and demo replay run
  • Imports, Workspace, Runs, Settings, Alignment, and Library pages
  • Pine and Python charting on the same dataset
  • Built-in indicator library with Pine + Python code
  • Parity automation for built-in indicators
  • Playwright smoke coverage for the main app routes
  • Release checklist and installer smoke-test docs

What it is not:

  • not a networked or multi-user service
  • not a hardened untrusted-code execution platform
  • not a broker-connected or exchange-connected live trading system

The authoritative summary docs are:

Documentation Index

Repo Layout

  • frontend/: Vite + React app, PineTS integration, Playwright/Vitest tests
  • backend/: FastAPI app, services, engines, packaging helpers, tests
  • shared/: shared Python and TypeScript contracts
  • data/: local datasets, run artifacts, bridge artifacts, library entries
  • docs/: human-readable project truth and handoff docs
  • .planning/: historical planning notes and archived roadmap documents

Run Locally

Backend

cd "D:\python , pine script\backend"
.\run-backend.ps1

Health:

http://127.0.0.1:8000/health

Frontend

cd "D:\python , pine script\frontend"
npm install
npm run dev -- --host 127.0.0.1 --port 5173

Main routes:

http://127.0.0.1:5173/workspace
http://127.0.0.1:5173/imports
http://127.0.0.1:5173/runs
http://127.0.0.1:5173/settings
http://127.0.0.1:5173/alignment
http://127.0.0.1:5173/library

Verification Commands

Backend tests

cd "D:\python , pine script\backend"
.\run-tests.ps1

Frontend build

cd "D:\python , pine script\frontend"
npm run build

Pine built-in certification

cd "D:\python , pine script\frontend"
npm run test:parity

Python built-in certification

cd "D:\python , pine script"
C:\Users\sakth\Desktop\vayu\.venv\Scripts\python.exe scripts\certify_builtins.py --strict

Browser smoke tests

See the full prerequisites and command sequence in Testing And Verification.

Desktop Installer

The packaged Windows installer lives under:

dist-installer/Trading Strategy Comparator Setup 1.0.0.exe

For installer validation, use the desktop smoke-test and release checklist in:

Important Limits

  • Deployment target is localhost-only, trusted single-user desktop
  • Python strategy execution is acceptable only under that trusted-local model
  • Exact Pine truth for some scripts still depends on manual bridge artifacts
  • Provider-backed live market data is still future work
  • V2 work is tracked in V2 Backlog

Releases

No releases published

Packages

 
 
 

Contributors