pnf 0.1.0

Point and Figure charting library with indicators and real-time dashboard support
Documentation
  • Coverage
  • 22.45%
    22 out of 98 items documented0 out of 4 items with examples
  • Size
  • Source code size: 87.63 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 8.18 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 22s Average build duration of successful builds.
  • all releases: 45s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • gregorian-09/pnf-chart-system
    3 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • gregorian-09

pnf (Rust)

pnf is the official Rust binding for the PnF (Point and Figure) chart engine.

It exposes:

  • Chart construction with P&F box/reversal rules.
  • Indicator calculations (SMA, Bollinger, RSI, OBV, signals, patterns, support/resistance, congestion).
  • JSON/ASCII exports.
  • A real-time localhost dashboard server.

Installation

[dependencies]
pnf = "0.1.0"

Quick Start

use pnf::{Chart, Indicators};

fn main() {
    let mut chart = Chart::new();
    chart.add_price(5000.0, 1_700_000_000);
    chart.add_price(5030.0, 1_700_000_001);

    let mut indicators = Indicators::new();
    indicators.calculate(&chart);

    println!("{}", chart.to_ascii());
    println!("{}", indicators.summary());
}

Real-Time Dashboard

use pnf::DashboardServer;

let mut server = DashboardServer::new();
server.start("127.0.0.1", 8763).unwrap();
server.publish(&chart, &indicators).unwrap();
println!("{}", server.url());

API Highlights

  • Core:
    • Chart
    • ChartConfig
  • Indicators:
    • Indicators
    • IndicatorConfig
  • Data types:
    • OHLC, Signal, Pattern, SupportResistanceLevel
    • enums (BoxType, ColumnType, ConstructionMethod, BoxSizeMethod, SignalType, PatternType)
  • Dashboard:
    • DashboardServer
    • build_snapshot_json
  • Version:
    • version(), version_major(), version_minor(), version_patch()

Documentation

Compatibility

  • Rust edition: 2021
  • Runtime: stable Rust toolchain
  • Native backend: bundled C ABI bridge from the same project version

Troubleshooting

  • If docs.rs build fails, verify optional dependencies/features are docs-safe.
  • Keep pnf crate version aligned with the same released core version.
  • If linking errors occur in local workspace development, rebuild the core project first.

Links