# Neural Networks on Order Book Microstructure in OrrnnScript

- Canonical: https://rxm.orrnn.com/articles/neural-networks-rtx5-microstructure
- Author: Aegis Prop Research | Updated: 2026-12-02T02:48:16.324751-08:00

> Quantized int32/Dec128 neural layers inside OrrnnScript (//@orrnn=1) evaluate top-of-book imbalance and spread regimes in under 120 microseconds per bar while staying strictly sandboxed.

## Deterministic Inference in Trading VMs

Deploying machine learning models in live trading often breaks when Python training features diverge from C++/MQL production feeds. Inside RTX5, feature normalization and inference execute identically in the Strategy Tester and live server runner.

## Feature Engineering with Fixed-Point Math

- **Normalized Spread Ratio**: `spread / ta.atr(14)`
- **Micro-Momentum Delta**: Dec128 tick-velocity across 5-bar windows
- **Gas-Metered Inference**: Strictly bounded under `50,000` gas per bar
