Your ACE in the market

Run PineScript
from Python and JavaScript

A compiler that translates PineScript to Python and JavaScript.
  • ⚡ Blazingly-fast execution times - Rust codegen
  • 📊 Process millions of bars per second
  • Typed Python bindings
  • Typed Node.js
  • 🌐 Typed WASM/Browser bindings
  • 🤖 Bot automation and HFT
  • 🛠️ Battle-tested standard library
  • 🔒 Own your data and infrastructure
  • 🔗 Integration with QPACE OSS Library
From research to profitable production.

indicator.pine
//@version=5
library("MyLibrary")

export gaussian_kernel(series float src, int lookback) =>
var float sum = 0.0
var float weight_sum = 0.0
for i = 0 to lookback - 1
weight = exp(-i * i / (2 * lookback * lookback))
sum += src[i] * weight
weight_sum += weight
sum / weight_sum
$ qpace build python
indicator.py
import qpace as qp
import my_library as pine

ohlcv = qp.Ohlcv.read_csv("btc.csv")
ctx = qp.Ctx(ohlcv, "BTC_USD")

gaussian = pine.indicator.gaussian_kernel(ctx, ohlcv.close, 14)
Used by
Own Your Algo

Common problems

Build, test and run on your terms. Your data, your code, your infrastructure, your execution. Own trading stack from the ground up.
No vendor lock-in, data leaks, or hidden fees. No more stupid errors and obstacles.

Runtime error

Error on bar 5000: Function takes too long to execute (> 500ms)

at #main:14
Compilation error

Script is too long. It exceeds 1000 lines of code.

at #main:1001
Subscription warning

Your subscription is ending. All running strategies will stop working.

at #random:42069
Strategy error

Cannot backtest on more than 20 000 bars.

at #strategy
Mine edge from the market

Use Cases

Extract features, backtest, and execute trading ideas in one toolkit. Code once, deploy anywhere - Python, JS, or the browser - all powered by the same high-performance Rust engine.

Feature Engineering
Mine your edge from the data.
  • Write indicators once - in PineScript
  • Compile PineScript to Python and JS
  • High performance, low latency - HFT ready
  • Use indicators as features in strategies / ML models
  • Research and prototyping
indicator.pine
//@version=5
library("PineLibrary")

export gaussian_kernel(series float src, int lookback) =>
var float sum = 0.0
var float weight_sum = 0.0
for i = 0 to lookback - 1
weight = exp(-i * i / (2 * lookback * lookback))
sum += src[i] * weight
weight_sum += weight
sum / weight_sum
Execution
From research to profitable production.
  • Seamless signal execution
  • Live OHLCV data
  • Real-time signal execution
  • Discord and Telegram integration
execution.py
import my_library as pine

exchange = qp.Exchange("binance")
ohlcv = qp.ohlcv("BTC_USD", "15m", live=True)

def on_bar(bar):
signal = pine.my_strategy(ctx)
exchange.signal(signal)
discord.signal(signal)
telegram.signal(signal)

ohlcv.on_bar(on_bar)
Parameter Optimization
Optimize your trading strategies in seconds.
  • Optimize parameters of PineScript strategies
  • Run efficiently in parallel
  • Measure strategy performance and metrics
strategy.py
import my_library as pine

optimizer = qp.Optimizer.strategy(pine.my_strategy)
best_params, metrics = optimizer.fit()

pprint(metrics)
{
"sharpe_ratio": 1.5,
"max_drawdown": 0.1,
"win_rate": 0.6,
"profit_factor": 2.5,
}
It's working

Case Studies

We battle-test the compiler on real-world PineScript indicators, libraries and strategies.

TA Indicators
  • Relative Strength Index (RSI)
  • Moving Average Convergence Divergence (MACD)
  • Simple Moving Average (SMA)
  • Exponential Moving Average (EMA)
  • Bollinger Bands (BB)
  • Average True Range (ATR)
  • True Range (TR)
  • Stochastic RSI (STOCHRSI)
  • Commodity Channel Index (CCI)
  • Money Flow Index (MFI)
  • Volume-Weighted Moving Average (VWMA)
  • Weighted Moving Average (WMA)
And more
AlgoAlpha
  • Adaptive Schaff Trend Cycle (STC)
  • Donchian Trend Ranges
  • Exponential Trend
  • Half Trend Regression
  • Kalman Step Signals
  • Linear Regression Intensity
  • Squeeze Momentum Oscillator
  • SuperTrend Fisher
  • Supertrended RSI
  • Trend Flow Profile
  • Trend Magic Enhanced
  • Triple Smoothed Signals
And more
Read more
Simple and Easy

It only takes a few seconds

... to compile PineScript to Python or JavaScript. Then you have the market edge.

1. Install CLI
$ npm install qpace -g
2. Authenticate
$ qpace login
3. Setup a new project
$ qpace init
4. Build
$ qpace build python$ qpace build node$ qpace build web
Get Started
Choose your edge. Choose your ACE.