A lightweight Node.js script that reads a JSON file of trading records, evaluates each one against 45 buy & sell conditions and reversals, then writes a complete statistical report to disk. Here is how to set it up, run it, and read the results.
The parser turns a raw export of strategy records into clear statistics and condition matches — no servers, no API keys.
For each BUY and SELL dataset it computes the average, high and low of every numeric field — trend scores, angle values, moving-average signals and more.
String fields such as mode, EMA alignment, EMA momentum and direction are broken down into counts and percentages so you can see how the market behaves over time.
23 BUY conditions and 22 SELL conditions are evaluated against the original records, reporting how many records match each rule and by what percentage.
Six reversal tests (three per side) compare each record against the previous chronological one to catch bullish↔bearish transitions and score changes.
Every value is validated before use, every test runs inside a try/catch, and the same input always produces the same output. Nothing is written back to your source data.
Results are saved as a single, pretty-printed JSON file in the output folder — with records, statistics and condition analysis grouped under buy and sell.
Once Node.js is installed and your data file is in place, running the parser takes one command.
Node v18 or newer is all you need. Verify with node –version. No npm packages are required.
Put <exchange>-<pair>-state.json in the json/ folder next to the script. See “Input Format” below.
Start the script, then type the exchange name and trading pair when asked. It reads the file, runs every test, and writes the report.
The script looks for json/<exchange>-<pair>-state.json, relative to the folder where you run it. The exchange and pair come straight from your two prompts (the pair is upper-cased automatically).
It creates the test/ folder if needed and saves test/<exchange>-<pair>-<timestamp>-parsed.json. It never modifies your original file.
Run the script from the folder that contains both json/ and trend-parser.js:
The folder layout the program expects:
Tip: if your data file uses a different name, the parser will not find it — keep the exact <exchange>-<pair>-state.json naming. The exchange you type must match the first part of that filename.
The program reads one path in your file: $ .customStratStore.trendData, which must be a non-empty array of records.
Records are split by the type field: “buy” records feed the BUY analysis and “sell” records feed the SELL analysis. Records are sorted chronologically by time before any reversal test runs.
A summary prints to the terminal, and a full report is saved as JSON. Here is exactly how to read it.
Each failure prints a clear reason and stops with exit code 1. Nothing is written to disk when an error occurs, so your source file stays untouched.
Learn about each broxynet tool and how to use them to support your broxynet-V1 license or develop your own tools. Dont own broxynet-V1 for your Gunbot Defi? See what it can do for you.
Verify the integrity of your download using the SHA-256 checksum below.