PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pf_report_sink_summary_v1 Struct Reference

Report-only T-row summary (CX-SINK-B5a), independent of the 144-byte trailer receipt above. More...

#include <report_sink.h>

Data Fields

uint32_t struct_size
 
uint32_t version
 
int64_t count_t
 
int64_t wins
 
int64_t losses
 
double best_trade
 
double worst_trade
 
double max_drawdown
 
int32_t nonfinite_t_field
 
uint32_t complete
 

Detailed Description

Report-only T-row summary (CX-SINK-B5a), independent of the 144-byte trailer receipt above.

Size 64, alignment 8, with no implicit padding: struct_size 0, version 4, count_t 8, wins 16, losses 24, best_trade 32, worst_trade 40, max_drawdown 48, nonfinite_t_field 56, complete 60.

Rows enter in global T order, using the original report doubles. Wins and losses count strictly positive/negative P&L; either zero counts as neither. Best/worst start with the first P&L and retain the previous operand on ties (including signed zero). Empty extrema are +0.0. Drawdown is the nonpositive minimum of cumulative trade P&L minus its running peak, both starting at +0.0; it is not equity-curve drawdown.

nonfinite_t_field is 0 if all eight canonical doubles are finite. Otherwise it names the first field of the first offending T row: 5 entry_price, 6 exit_price, 7 qty, 8 pnl, 9 pnl_pct, 10 max_runup, 11 max_drawdown, 12 commission. These are T wire field indices. complete mirrors the trailer receipt. Values are published only with a successful trailer; until then they are zero and complete is 0.

Definition at line 111 of file report_sink.h.

Field Documentation

◆ struct_size

uint32_t pf_report_sink_summary_v1::struct_size

Definition at line 121 of file report_sink.h.

◆ version

uint32_t pf_report_sink_summary_v1::version

Definition at line 122 of file report_sink.h.

◆ count_t

int64_t pf_report_sink_summary_v1::count_t

Definition at line 123 of file report_sink.h.

◆ wins

int64_t pf_report_sink_summary_v1::wins

Definition at line 124 of file report_sink.h.

◆ losses

int64_t pf_report_sink_summary_v1::losses

Definition at line 125 of file report_sink.h.

◆ best_trade

double pf_report_sink_summary_v1::best_trade

Definition at line 126 of file report_sink.h.

◆ worst_trade

double pf_report_sink_summary_v1::worst_trade

Definition at line 127 of file report_sink.h.

◆ max_drawdown

double pf_report_sink_summary_v1::max_drawdown

Definition at line 128 of file report_sink.h.

◆ nonfinite_t_field

int32_t pf_report_sink_summary_v1::nonfinite_t_field

Definition at line 129 of file report_sink.h.

◆ complete

uint32_t pf_report_sink_summary_v1::complete

Definition at line 130 of file report_sink.h.


The documentation for this struct was generated from the following file: