pnf
Rust bindings for the Point-and-Figure (PnF) analysis engine.
The crate is designed for production chart analytics, not just drawing columns.
Features
- PnF chart construction with configurable method, box-size mode, and reversal.
- Structural trend checks (bullish support / bearish resistance context).
- Indicator stack: SMA, Bollinger Bands, RSI, OBV, Bullish Percent.
- Signal and pattern extraction (buy/sell and named PnF patterns).
- Support/resistance and congestion detection.
- Real-time localhost dashboard snapshot publishing.
Installation
[]
= "0.1.0"
Quick Start
use ;
Trendline and Bias Checks
let last_price = 5055.0;
println!;
println!;
println!;
println!;
These are the standard structural checks before acting on breakouts/breakdowns.
Indicators and Momentum
let last_col = chart.column_count.saturating_sub as i32;
println!;
println!;
println!;
println!;
println!;
Signals and Pattern Analysis
println!;
println!;
println!;
println!;
println!;
println!;
println!;
for pattern in indicators.patterns
Support, Resistance, and Congestion
println!;
println!;
println!;
println!;
println!;
Real-Time Dashboard
use DashboardServer;
let mut server = new;
let _url = server.start.expect;
// Publish with indicators
server.publish;
// Or publish chart-only snapshots
server.publish;
println!;
API Surface
Core:
Chart,ChartConfig
Indicators and analysis:
Indicators,IndicatorConfig- SMA/Bollinger/RSI/OBV accessors and vectors
- signal/pattern/support-resistance/congestion queries
Data types:
OHLC,Signal,Pattern,SupportResistanceLevelBoxType,ColumnType,ConstructionMethod,BoxSizeMethod,SignalType,PatternType
Dashboard:
DashboardServer,build_snapshot_json
Version API:
version(),version_major(),version_minor(),version_patch()
Versioning
- Crate version follows the core engine release.
- Use matching versions across Python/Java/C# bindings when deploying mixed-language systems.
- All notable changes are listed in
CHANGELOG.md.
Troubleshooting
- Linker/runtime issues: rebuild native artifacts and verify toolchain compatibility.
- Empty indicator vectors: ensure enough columns exist for configured periods.
- Behavior drift between services: align package versions and chart config defaults.
Documentation and Links
- API docs: https://docs.rs/pnf
- Rust binding reference:
docs/bindings/rust.md - Source: https://github.com/gregorian-09/pnf-chart-system
- Issues: https://github.com/gregorian-09/pnf-chart-system/issues
- Changelog: https://github.com/gregorian-09/pnf-chart-system/blob/master/CHANGELOG.md