code wiki / (root) / nx_fin_strategy.nx

nx_fin_strategy.nx

buildroot/runtime/nx_fin_strategy.nx

3540 B88 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic fin
docsdependenciesstructsconstsfunctions

about

nx_fin_strategy.nx -- R3: the SIGNAL generator (produces the long/flat signals the R2 backtester consumes). v1 = SMA crossover (fast-SMA > slow-SMA -> long, else flat), computed with data THROUGH bar i-1 so there is NO look-ahead by construction. Pure, deterministic, i64 (cents). Single-responsibility: it GENERATES signals; R2 simulates them; R4 sizes them. Composes R1 (MD_FIELDS / close). Built to also compose the fundamental organs (nx_fin_mgmt_grade, nx_fin_zscore) as quality GATES on entries in later versions -- microcap edge = (technical trigger) AND (real business). license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_fin_marketdata.nx nx_fin_strategy.nx nx_fin_marketdata_fetch.nx nx_fin_strategy_gate.nx

imports: nx_syscalls.nxnx_fin_marketdata.nx

imported by: nx_fin_marketdata_fetch.nxnx_fin_strategy_gate.nx

structs

none

consts

none

functions

12func st_sma(bars: *i64, end: i64, period: i64) -> i64
22func st_sma_cross(bars: *i64, nbars: i64, fast: i64, slow: i64, signals: *i64) -> i64
called by 1: main calls 1: st_sma
39func st_above_sma(bars: *i64, nbars: i64, period: i64, signals: *i64) -> i64
called by 1: main calls 1: st_sma
54func st_below_sma(bars: *i64, nbars: i64, period: i64, signals: *i64) -> i64
called by 1: main calls 1: st_sma
69func st_donchian_high(bars: *i64, end: i64, period: i64) -> i64
77func st_donchian_signal(bars: *i64, nbars: i64, period: i64, signals: *i64) -> i64
called by 1: main calls 1: st_donchian_high