e355368748
Trade-setup targets now pre-merge near-duplicate S/R levels into zone representatives (same 2% clusterer as chart + alerts) before generate_targets runs. A clustered wall (e.g. 183 + 185) becomes one target carrying the zone's COMBINED strength (capped 100) instead of two near-identical targets that each undervalue the wall — which also feeds a more honest reach-probability via the S/R-strength magnet. Representative price is the zone's near edge; the strongest constituent's id is retained. Singleton levels pass through unchanged, so the downstream band-spreading / probability / primary-selection pipeline and its tests are untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>