PageSourceSearch

https://bullionmarketcap.com/assets/stacking-strategies-BSFyFySh.js

js bullionmarketcap.com collected 2026-10-07 19:11:02 UTC 14,750 bytes, 1 lines download raw bytes

1import{an as G,k as D,j as e,L as J,ab as X,a8 as N}from"./main-CMUma0Uu.js";import{C as g,a as b}from"./card-BiI9hwP7.js";import{J as Z}from"./json-ld-BmoSkBFZ.js";const L={gold:{name:"Gold",icon:"Au",color:"#eab308"},silver:{name:"Silver",icon:"Ag",color:"#cbd5e1"},platinum:{name:"Platinum",icon:"Pt",color:"#60a5fa"}},f={accumulate:{label:"Accumulate",color:"#22c55e",verb:"Deep value — at or under the lower band. Historically the best stacking entries."},fair:{label:"Fair value",color:"#eab308",verb:"Mid-channel — fair value. Steady DCA; nothing extreme either way."},trim:{label:"Extended",color:"#f97316",verb:"Upper band — extended. The bull is intact, but rich here: hold or trim, and accumulate on pullbacks toward the midline."},extended:{label:"Very extended",color:"#ef4444",verb:"Far upper band — a strong trim-for-profit zone. Don’t chase; let it come back to the channel."}},_=365.25*864e5,Y=(r,c)=>(new Date(`${r}T00:00:00Z`).getTime()-new Date(`${c}T00:00:00Z`).getTime())/_,R=[{q:"How are the trend lines drawn?",a:"They are not hand-drawn. We fit a log-linear regression to each metal’s weekly price from its 2022 cycle low — the start of this bull leg. The midline is the trend; the upper and lower bands are parallel lines one and two standard deviations of price away. It updates automatically with new data — a repeatable, programmatic channel, not an opinion."},{q:"How do I use the accumulate and trim zones?",a:'When price sags to the lower band (a "dip" in the channel) it has historically been a strong accumulation point — those are marked with green dots. When it stretches to the upper band, it is extended and a place to slow buying or trim for profit (red dots). The midline is fair value. The idea: buy more low in the channel, ease off high.'},{q:"Does this say the bull market is over?",a:"No. As long as price keeps holding the channel, the bull structure is intact — being at the upper band means strong, not finished. The warning sign would be a sustained weekly close below the lower band, which would say the trend itself has broken. The channel is technical structure; it does not replace the fundamental case."},{q:"Is this financial advice?",a:"No. It is an educational, rules-based view of where price sits in its trend. It says nothing about your situation, premiums, or whether the fundamentals still hold. Trends break. Do your own research."}];function ne(){const r=G.useLoaderData(),c=r.channels??[],[i,t]=D.useState("gold"),a=c.find(s=>s.metal===i)??c[0]??null;return e.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8 space-y-6",children:[e.jsx(K,{data:r}),e.jsxs("header",{className:"text-center",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:"Stacking Map"}),e.jsx("p",{className:"text-muted-foreground mt-1 max-w-xl mx-auto text-sm",children:"Where to accumulate in the bull market. The trend channel, the dips where you stack, the band where you trim — drawn programmatically, so you can see the bull isn’t broken and where to add."})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-muted/20 px-3 py-2 text-xs text-muted-foreground flex items-start gap-2",children:[e.jsx("span",{className:"text-amber-400 mt-0.5",children:"ℹ"}),e.jsxs("span",{children:["Use this channel for ",e.jsx("strong",{className:"text-foreground/80",children:"long-term accumulation"})," — stack the green band over the bull market. For ",e.jsx("strong",{className:"text-foreground/80",children:"swing trading"})," (shorter-term entries & exits), use the"," ",e.jsx(J,{to:"/indicators/cycles/gold-overbought-oversold",className:"underline hover:text-foreground",children:"Overbought / Oversold oscillator"}),"."]})]}),e.jsx("div",{className:"flex justify-center gap-2",children:c.map(s=>{const u=s.metal===i,h=L[s.metal];return e.jsxs("button",{onClick:()=>t(s.metal),className:`flex items-center gap-2 rounded-full border px-3 py-1.5 text-sm transition-colors ${u?"font-semibold":"text-muted-foreground"}`,style:{borderColor:u?h.color:"var(--border)",background:u?`${h.color}1a`:"transparent",color:u?h.color:void 0},children:[e.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded text-[10px] font-bold",style:{background:`${h.color}22`,color:h.color},children:h.icon}),h.name]},s.metal)})}),a?e.jsxs(e.Fragment,{children:[e.jsx(g,{children:e.jsxs(b,{className:"p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2 flex-wrap mb-2",children:[e.jsxs("h2",{className:"text-lg font-semibold",children:[L[a.metal].name," bull-market channel"]}),e.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["trend +",a.growthPct,"%/yr · since ",a.startDate.slice(0,4)," · log scale"]})]}),e.jsx(V,{ch:a}),e.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-[11px] text-muted-foreground justify-center",children:[e.jsx(C,{color:"#22c55e",label:"Accumulate band (buy more)"}),e.jsx(C,{color:"#64748b",label:"Trend / fair value"}),e.jsx(C,{color:"#ef4444",label:"Trim band (take profit)"}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-green-400"}),"past dip · ",e.jsx("span",{className:"h-2 w-2 rounded-full bg-red-400"}),"past trim"]})]})]})}),e.jsx(g,{style:{borderColor:`${f[a.zone].color}40`},className:"bg-gradient-to-b from-white/[0.02] to-transparent",children:e.jsxs(b,{className:"p-4 sm:p-5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 flex-wrap mb-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"You are here"}),e.jsxs("span",{className:"text-xs font-semibold px-2 py-0.5 rounded-full",style:{color:f[a.zone].color,background:`${f[a.zone].color}1a`},children:[f[a.zone].label," · z ",a.zNow>0?"+":"",a.zNow,"σ"]})]}
1),e.jsx("p",{className:"text-sm text-foreground/90 mb-3",children:f[a.zone].verb}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsx(I,{label:"Accumulate ≤",value:a.bands.lo1,color:"#22c55e"}),e.jsx(I,{label:"Fair (trend)",value:a.bands.mid,color:"#94a3b8"}),e.jsx(I,{label:"Trim ≥",value:a.bands.up1,color:"#ef4444"})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground mt-3",children:["Now $",a.priceNow.toLocaleString(),". Bull structure is intact while price holds the channel — a sustained weekly close below the lower band ($",a.bands.lo2.toLocaleString(),") would be the trend-break warning, not a dip."]})]})}),e.jsx(g,{children:e.jsxs(b,{className:"p-4",children:[e.jsx("h2",{className:"text-lg font-semibold mb-1",children:"Where you could have stacked"}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:["Every time ",L[a.metal].name," sagged to the lower band (z ≤ −1) — the channel’s accumulation dips."]}),a.greenStack&&e.jsxs("div",{className:"rounded-lg border border-green-500/30 bg-green-500/[0.06] p-3 mb-3",children:[e.jsxs("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wide",children:["If you stacked every green week since ",a.greenStack.firstDate.slice(0,4)]}),e.jsxs("div",{className:"flex items-baseline gap-2 flex-wrap mt-0.5",children:[e.jsxs("span",{className:"text-2xl font-bold tabular-nums text-green-400",children:["$",a.greenStack.avgCost.toLocaleString()]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["avg cost · ",a.greenStack.weeks," weeks"]}),e.jsxs("span",{className:"text-sm font-semibold tabular-nums ml-auto",style:{color:a.greenStack.gainPct>=0?"#22c55e":"#ef4444"},children:["now $",a.priceNow.toLocaleString()," · ",a.greenStack.gainPct>=0?"+":"",a.greenStack.gainPct,"%"]})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground/70 mt-1",children:"Equal-$ buys each week price was in the green band (illustrative cost basis, ignores premiums)."})]}),a.dips.length?e.jsx("div",{className:"flex flex-wrap gap-2",children:a.dips.map(s=>e.jsxs("span",{className:"text-xs rounded-md border border-green-500/30 bg-green-500/[0.06] px-2.5 py-1 tabular-nums",children:[s.date.slice(0,7)," · $",s.price.toLocaleString()]},s.date))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No lower-band dips in this bull — it has held the trend or better throughout."}),a.trims.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wide mt-3 mb-1.5",children:"…and where you could have trimmed (upper band)"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:a.trims.map(s=>e.jsxs("span",{className:"text-xs rounded-md border border-red-500/30 bg-red-500/[0.06] px-2.5 py-1 tabular-nums",children:[s.date.slice(0,7)," · $",s.price.toLocaleString()]},s.date))})]})]})}),e.jsx(g,{className:"border-amber-500/20 bg-gradient-to-b from-amber-500/5 to-transparent",children:e.jsxs(b,{className:"p-4",children:[e.jsx("h2",{className:"text-base font-semibold mb-1",children:"The channel vs the fundamentals"}),e.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed",children:["This is technical structure, not a fundamental call. The bull’s drivers — central-bank buying, real-rate and debt dynamics — are what justify the trend. As long as those hold, pullbacks toward the lower band are accumulation, not exits; sentiment can read “fear” while price is merely resetting inside an intact channel. The map tells you ",e.jsx("em",{children:"where"})," in the trend you are; the fundamentals tell you whether the trend deserves to continue."]})]})})]}):e.jsx(g,{children:e.jsx(b,{className:"p-6 text-center text-muted-foreground",children:"Channel data unavailable."})}),e.jsx(g,{children:e.jsxs(b,{className:"p-4",children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Questions"}),e.jsx("div",{className:"space-y-3",children:R.map((s,u)=>e.jsxs("details",{className:"group",children:[e.jsxs("summary",{className:"cursor-pointer font-medium text-sm hover:text-foreground
1/80 flex items-center gap-2",children:[e.jsx(X,{size:14,className:"text-muted-foreground transition-transform group-open:rotate-180"}),s.q]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1.5 pl-6 leading-relaxed",children:s.a})]},u))})]})}),e.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-2xl mx-auto leading-relaxed",children:"Log-linear regression channel fit to weekly gold (XAU), silver (XAG) and platinum (XPT) prices from each metal’s 2022 cycle low. Bands are ±1σ / ±2σ of price. Technical structure only — not investment advice. Trends break."})]})}function C({color:r,label:c}){return e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-0.5 rounded-full",style:{background:r}}),c]})}function I({label:r,value:c,color:i}){return e.jsxs("div",{className:"rounded-lg bg-muted/30 p-2 text-center",children:[e.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wide leading-tight",children:r}),e.jsxs("div",{className:"text-lg font-bold tabular-nums",style:{color:i},children:["$",c.toLocaleString()]})]})}function V({ch:r}){const c=D.useRef(null);return D.useEffect(()=>{const i=c.current;if(!i)return;const t=i.getContext("2d");if(!t)return;const a=r.series,s=a.length;if(s<2)return;const{a:u,b:h,sd:q,t0:B}=r.reg,v=window.devicePixelRatio||1,k=i.getBoundingClientRect();i.width=k.width*v,i.height=k.height*v,t.scale(v,v);const T=k.width,A=k.height,m={top:12,right:62,bottom:22,left:8},H=T-m.left-m.right,P=A-m.top-m.bottom;t.clearRect(0,0,T,A);const O=n=>u+h*Y(a[n].date,B),w=(n,l)=>Math.exp(O(n)+l*q);let M=1/0,z=-1/0;for(let n=0;n<s;n++)M=Math.min(M,a[n].price,w(n,-2)),z=Math.max(z,a[n].price,w(n,2));const E=Math.log(M*.97),Q=Math.log(z*1.03),x=n=>m.left+n/(s-1)*H,p=n=>m.top+P-(Math.log(n)-E)/(Q-E)*P,U=n=>{t.beginPath();for(let l=0;l<s;l++){const d=x(l),o=p(w(l,n));l===0?t.moveTo(d,o):t.lineTo(d,o)}},F=(n,l,d)=>{t.beginPath();for(let o=0;o<s;o++){const j=x(o),$=p(w(o,n));o===0?t.moveTo(j,$):t.lineTo(j,$)}for(let o=s-1;o>=0;o--)t.lineTo(x(o),p(w(o,l)));t.closePath(),t.fillStyle=d,t.fill()};F(-2,-1,"rgba(34,197,94,0.12)"),F(1,2,"rgba(239,68,68,0.12)");const y=(n,l,d=[],o=1)=>{U(n),t.strokeStyle=l,t.lineWidth=o,t.setLineDash(d),t.stroke(),t.setLineDash([])};y(-2,"rgba(34,197,94,0.45)"),y(-1,"rgba(34,197,94,0.8)"),y(0,"rgba(148,163,184,0.6)",[5,4]),y(1,"rgba(239,68,68,0.8)"),y(2,"rgba(239,68,68,0.45)"),t.beginPath();for(let n=0;n<s;n++){const l=x(n),d=p(a[n].price);n===0?t.moveTo(l,d):t.lineTo(l,d)}t.strokeStyle=L[r.metal].color,t.lineWidth=1.75,t.stroke();const W=(n,l,d,o=3)=>{const j=a.findIndex($=>$.date===n);j<0||(t.beginPath(),t.arc(x(j),p(l),o,0,Math.PI*2),t.fillStyle=d,t.fill())};for(const n of r.dips)W(n.date,n.price,"#22c55e");for(const n of r.trims)W(n.date,n.price,"#ef4444");t.beginPath(),t.arc(x(s-1),p(a[s-1].price),4.5,0,Math.PI*2),t.fillStyle=f[r.zone].color,t.fill(),t.strokeStyle="rgba(255,255,255,0.6)",t.lineWidth=1.5,t.stroke(),t.font="10px ui-monospace, monospace",t.textAlign="left";const S=(n,l,d)=>{const o=p(n);o<m.top-2||o>m.top+P+2||(t.fillStyle=l,t.fillText(`$${Math.round(n).toLocaleString()}`,T-m.right+4,o-1),t.fillStyle=l.replace("0.95","0.6").replace("0.9","0.55"),t.font="8px ui-monospace, monospace",t.fillText(d,T-m.right+4,o+8),t.font="10px ui-monospace, monospace")};S(r.bands.up1,"rgba(239,68,68,0.9)","trim"),S(r.bands.mid,"rgba(148,163,184,0.9)","trend"),S(r.bands.lo1,"rgba(34,197,94,0.95)","accumulate"),S(r.bands.lo2,"rgba(34,197,94,0.7)","ch. bottom"),t.fillStyle="rgba(255,255,255,0.4)",t.textAlign="center";for(let n=0;n<=4;n++){const l=Math.round(n/4*(s-1));t.fillText(a[l].date.slice(0,4),x(l),A-6)}},[r]),e.jsx("canvas",{ref:c,className:"w-full h-[300px] sm:h-[360px]"})}function K({data:r}){const c=`${N}/indicators/stacking-strategies`,i=r.channels.find(a=>a.metal==="gold"),t={"@context":"https://schema.org","@graph":[{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:N},{"@type":"ListItem",position:2,name:"Indicators",item:`${N}/indicators`},{"@type":"ListItem",position:3,name:"Stacking Map",item:c}]},{"@type":"FAQPage",mainEntity:R.map(a=>
1({"@type":"Question",name:a.q,acceptedAnswer:{"@type":"Answer",text:a.a}}))},...i?[{"@type":"Dataset",name:"Gold bull-market accumulation channel",description:`Log-linear regression channel for gold from its 2022 cycle low: trend +${i.growthPct}%/yr. Now $${i.priceNow} at z ${i.zNow}σ (${i.zone}). Accumulate band ≤ $${i.bands.lo1}, trend $${i.bands.mid}, trim band ≥ $${i.bands.up1}.`,url:c,...r.asOf?{dateModified:r.asOf}:{},creator:{"@type":"Organization",name:"BullionMarketCap",url:N},license:`${N}/terms`,isAccessibleForFree:!0}]:[]]};return e.jsx(Z,{data:t,id:"stacking-jsonld"})}export{ne as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.