Skip to content
v3 redesign is live — welcome to the trading cockpit.
Skip to content
build.logtraders.online=2,166trades.60s=74swings.ranked=308edge.latency_ms=42ms
module · open source·primitives, not the product·MIT · Apache-2.0

The plumbing, in plain text.

Nexural is a closed product, but the math underneath isn’t. We publish the primitives we use on the desk — R-multiple sizing, a tiny regime classifier, the journal schema, reference indicator scripts — so the rest of the work stays inspectable.

repos · status
6
primitives
3
stable
2
beta
1
alpha
$ npm view @nexural
// catalog · primitives we ship publicly

Six primitives. No magic.

Each one does one thing. The math is the math. If you'd plug a different tool into the same protocol, you can — that's the whole point.

stableMIT·TypeScript

@nexural/r-multiple

Stop-first position-sizing math, in 80 lines.

The exact R-multiple math we use on the desk: dollar-risk → contracts/shares from a structural stop, with vol-bucket and scorecard multipliers exposed as plain functions. Pure, dependency-free TypeScript. Use it server-side, in a worker, or in your own journaling app.

deliberately not included

No broker integration. No options Greeks. No assumption about your capital. Bring your own account size and stop.

version
1.4.2
tests
62 / 62
deps
0
published soon · subscribe via /contact
stableApache-2.0·TypeScript

nexural-journal-schema

JSON Schema for the trade journal we actually use.

The full schema for a single trade entry: setup, scorecard, regime, stop, sizing, mistakes, lessons. Validates against AJV. The whole point: you should be able to journal in any tool and migrate without losing structure.

deliberately not included

No UI. No export to brokers. No sentiment scoring. Just the contract.

version
2.0.0
fields
47
validators
AJV
published soon · subscribe via /contact
stableMIT·Pine

nexural-pine-templates

Reference Pine v5 indicators — POC, value-area, ORB.

Reference implementations of the simpler indicators (POC, value-area shading, ORB). These are deliberately not the production Nexural scripts — they're the textbook versions, MIT-licensed, so you can read the math and modify them.

deliberately not included

Not the production indicators. No Trend Finder, no ORB Plus, no proprietary scoring. Reference only.

scripts
5
Pine version
v5
deps
published soon · subscribe via /contact
betaMIT·TypeScript

@nexural/regime

Tiny regime classifier — VIX × value-area × trend.

A small, deterministic classifier that buckets the current session into one of nine regime cells. Same input shape we feed the desk. Mostly useful as a sanity check against your own discretionary read; not a signal generator.

deliberately not included

No prediction. No probabilities. The classifier returns a label and the inputs that produced it — that's it.

version
0.6.1
regimes
9
deps
0
published soon · subscribe via /contact
betaMIT·C#

nexural-ninjascript-utils

C# helpers for NT8 — bar math, alerts, R-multiple bridge.

Small NinjaScript utilities: bar-state helpers, alert serialization, an R-multiple bridge that mirrors @nexural/r-multiple. The point is interop — if you already trade NT8, the math should be portable to anywhere else you analyze trades.

deliberately not included

No strategies. No indicator code. Helpers only — bring your own logic.

NT version
8.1+
modules
6
deps
0
published soon · subscribe via /contact
alphaMIT·TypeScript

@nexural/journal-cli

Append-only CLI journal that writes the schema above.

A tiny terminal-first journal. Reads a config, prompts the right fields, validates against nexural-journal-schema, appends to a versioned file. Think `git commit -m` for trades. Useful if you'd rather not log into a SaaS to write a trade note.

deliberately not included

No analytics. No charts. No cloud sync. Read the file with anything that reads JSON.

version
0.3.0
platforms
macOS · Linux · Win
deps
minimal
published soon · subscribe via /contact

$ note: the proprietary scoring, regime weights, and indicator tuning that ship inside the Nexural product are deliberately not in these repos. What is published is the math, the schema, and the interface — enough to be inspectable, not enough to be cloned. ask us anything.

// contributing · how PRs land here

Four rules. That’s the doc.

No 800-line CONTRIBUTING.md. We trust people who can read code; we tell them what we won't compromise on.

  1. rule 01

    Small surface, sharp scope.

    Every primitive does one thing and exposes one shape. If a PR doubles the surface area, it should probably be a new package.

  2. rule 02

    No silent breaking changes.

    Semver is honest. We bump majors when we break, write a migration note when we do, and keep deprecated paths for one minor.

  3. rule 03

    Tests beat opinions.

    PRs land faster with a failing test than a paragraph of justification. If you can repro the bug in 8 lines, we can fix it in 12.

  4. rule 04

    Credit, in writing.

    Material contributions get credited in CHANGELOG and on the relevant /research note. Real work earns real attribution.

license · trademark · warranty

Permissive on the code. Conservative on the brand.

Code in these repos is licensed under MIT or Apache-2.0 as marked. You can use it commercially, modify it, and redistribute it. Attribution is appreciated but not required by the MIT packages; the Apache-licensed packages keep the standard NOTICE-file convention.

The Nexural name, logo, and the Sage Trading System wordmark are trademarks of Nexural Trading. Don’t publish a fork or product under a name that suggests it’s the official Nexural release. A short rename solves it.

These libraries are reference implementations for traders who already understand the math. They come with no warranty — explicit or implied — of fitness for trading any particular market or instrument. Trading involves substantial risk of loss. Read the source, test the math, size to your own risk tolerance.