nersent / pace-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PACE starter

This repository is a MACD boilerplate project in Rust for Pace, a technical analysis library.

Getting started

  1. Download Rust and Cargo

  2. Install cargo binstall

  3. Install cargo nextest

    cargo binstall cargo-nextest
  4. Install cargo watch

    cargo binstall cargo-watch

Development

Run with hot reload

cargo watch -x run

Documentation

Visit docs to view Pace documentation.

Examples

See already implemented indicators and strategies here.

Testing

cargo nextest run

This repository contains a simple test for macd indicator, tested against TradingView MACD indicator.

Test against PineScript

  1. You need to add this script at the end of PineScript:

    plot(PS_RESULT, title='_target_')
    plot(volume, title='volume')
    
  2. Export to csv

    • Open the downloaded csv file and remove entire last row with NaN values (if exists)
  3. Place the csv file in fixtures folder

  4. Modify src/tests/custom_indicator_test.rs

Structure

The files you should look at are:

  • src/custom_strategy.rs
  • src/custom_indicator.rs
  • src/tests/custom_indicator_test.rs

It is recommende to seperate strategy and indicator into separate modules, allowing easier testing and development.


Made by Nersent

About


Languages

Language:Rust 100.0%