BEGIN { FS="," print "============================================================" print "V11 PROGRESSIVE SWEEP RESULTS - 1,024 CONFIGURATIONS" print "============================================================" } NR==1 {next} # Skip header { flip=$1; adx=$2; trades=$13; pf=$11; wr=$10; pnl=$9 # Track by flip_threshold flip_sum[flip]+=trades flip_cnt[flip]++ if(trades==0) flip_zero[flip]++ if(flip_min[flip]=="" || tradesflip_max[flip]) flip_max[flip]=trades # Track by adx adx_sum[adx]+=trades adx_cnt[adx]++ if(adx_min[adx]=="" || tradesadx_max[adx]) adx_max[adx]=trades # Track best configs if(pf>best_pf) { best_pf=pf; best_pf_line=$0 } if(wr>best_wr && trades>50) { best_wr=wr; best_wr_line=$0 } if(pnl>best_pnl) { best_pnl=pnl; best_pnl_line=$0 } total++ } END { print "\nTOTAL CONFIGS TESTED:", total print "\n" "=" x 60 print "SIGNAL DISTRIBUTION BY FLIP_THRESHOLD" print "=" x 60 for(f in flip_sum | "sort -n") { printf "\nflip=%.2f: %d configs, avg=%.0f, min=%d, max=%d", f, flip_cnt[f], flip_sum[f]/flip_cnt[f], flip_min[f], flip_max[f] if(flip_zero[f]>0) printf ", ZEROS=%d ⚠️", flip_zero[f] print "" } print "\n" "=" x 60 print "SIGNAL DISTRIBUTION BY ADX_MIN" print "=" x 60 for(a in adx_sum | "sort -n") { printf "\nadx=%d: %d configs, avg=%.0f, min=%d, max=%d\n", a, adx_cnt[a], adx_sum[a]/adx_cnt[a], adx_min[a], adx_max[a] } print "\n" "=" x 60 print "TOP CONFIGURATIONS" print "=" x 60 print "\nBEST PROFIT FACTOR:", best_pf print best_pf_line print "\nBEST WIN RATE (trades>50):", best_wr "%" print best_wr_line print "\nBEST P&L:", best_pnl print best_pnl_line }