This repository is a MACD boilerplate project in Rust for Pace, a technical analysis library.
-
Download Rust and Cargo
-
Install cargo binstall
-
Install cargo nextest
cargo binstall cargo-nextest
-
Install cargo watch
cargo binstall cargo-watch
Run with hot reload
cargo watch -x run
Visit docs to view Pace documentation.
See already implemented indicators and strategies here.
cargo nextest run
This repository contains a simple test for macd indicator, tested against TradingView MACD indicator.
-
You need to add this script at the end of PineScript:
plot(PS_RESULT, title='_target_') plot(volume, title='volume')
-
Export to csv
- Open the downloaded csv file and remove entire last row with
NaN
values (if exists)
- Open the downloaded csv file and remove entire last row with
-
Place the csv file in
fixtures
folder -
Modify
src/tests/custom_indicator_test.rs
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