{const v=localStorage.getItem(k);if(v!=null)items[k]=v;});return compactSyncItems(items);}
function applySyncItems(items){
if(!items||typeof items!=="object")return false;
@@ -2031,11 +2049,13 @@ async function runDailyCycle(){
SNAP_TS=nowIso();
setStatus("fetching markets…",true);
const markets=await fetchMarkets(Infinity,100,count=>setStatus(`fetching all active markets (${count})…`,true));
+ const analysisMarkets=selectMarketsForAnalysis(markets);
+ setStatus(`selected top ${analysisMarkets.length.toLocaleString()} markets for analysis…`,true);
setStatus("checking real-world context…",true);
- const realWorldSignals=await fetchRealWorldSignals(markets);
+ const realWorldSignals=await fetchRealWorldSignals(analysisMarkets);
setStatus("analyzing expected value…",true);
- const sugs=generateSuggestions(markets,SUGGESTION_TOTAL,SUGGESTION_PER_CATEGORY,realWorldSignals);
- saveSuggestions(sugs,markets.length);
+ const sugs=generateSuggestions(analysisMarkets,SUGGESTION_TOTAL,SUGGESTION_PER_CATEGORY,realWorldSignals);
+ saveSuggestions(sugs,markets.length,analysisMarkets.length);
st=loadState();
const emailOffsets=agentHistoryOffsets(st);
const focus=getFocus();
@@ -2428,9 +2448,11 @@ function renderSuggestions(){
const filtered=pool.slice(0,VISIBLE_SUGGESTIONS);
const buyCount=all.filter(s=>s.trade_ready).length,watchCount=all.length-buyCount;
const evAvg=all.length?Math.round(all.reduce((s,x)=>s+Number(x.evidence_score||0),0)/all.length*100):0;
+ const scanned=Number(data.market_count||0).toLocaleString();
+ const analyzed=Number(data.analyzed_count||data.market_count||0).toLocaleString();
$("focusNote").textContent=focus==="All"
- ? `Scanned ${Number(data.market_count||0).toLocaleString()} active markets and kept ${all.length} ideas (${buyCount} BUY, ${watchCount} WATCH). Showing ${filtered.length}; agents trade only EV+ ideas after liquidity, chase, and real-world evidence checks. Avg evidence ${evAvg}.`
- : `Scanned ${Number(data.market_count||0).toLocaleString()} active markets. Showing ${filtered.length} of ${pool.length} ${focus} ideas; agents only open EV+ BUY ${focus} positions while this is selected.`;
+ ? `Scanned ${scanned} active markets, analyzed the top ${analyzed} by activity/liquidity/gap, and kept ${all.length} ideas (${buyCount} BUY, ${watchCount} WATCH). Showing ${filtered.length}; agents trade only EV+ ideas after liquidity, chase, and real-world evidence checks. Avg evidence ${evAvg}.`
+ : `Scanned ${scanned} active markets and analyzed the top ${analyzed}. Showing ${filtered.length} of ${pool.length} ${focus} ideas; agents only open EV+ BUY ${focus} positions while this is selected.`;
if(!filtered.length){root.innerHTML=`No ${esc(focus)} suggestions in this live batch.
`;return;}
root.innerHTML=filtered.map(s=>{
const col=catColor(s.category);