Back to Blog

Ever felt like trading through the weekend is like navigating a ship through stormy seas without a compass? The weekend period can be risky for traders, especially when dealing with prop firms that impose specific holding rules during this time.

According to recent surveys, over 70% of prop traders report encountering significant challenges due to weekend holding restrictions. Understanding prop firm weekend holding rules is crucial for managing risk and planning trades that comply with firm policies.

Many trading guides only skim the surface, ignoring how these rules fundamentally shape your strategies and risk exposure. That leaves traders unprepared for the real impact these rules have.

This article dives deep into the topic, exploring what weekend holding rules mean, why firms enforce them, how they affect your trading, and practical tips to manage trades effectively. By the end, you will have a clear path to mastering these rules and maximizing your trading success.

What are prop firm weekend holding rules?

Prop firm weekend holding rules set limits on whether traders can keep their positions open over the weekend. These rules vary a lot between firms and are key to managing risk during times when markets are closed.

Definition of weekend holding rules

Weekend holding rules define if traders can keep trades open from Friday through to Monday. This is important because market prices can jump sharply when the market reopens after a weekend.

For example, prices often “gap” on Monday, creating big risks if trades are held open. Some firms don’t allow any trades to stay open over weekends to avoid this.

How these rules apply to different prop firms

Rules differ widely across prop firms. Some force traders to close all trades on Friday. Others let traders hold positions but may charge extra or require special permissions.

If traders hold weekend positions, they must accept the higher risk from price gaps on Monday. Firms use these rules to keep risk low, and traders must check rules carefully before joining.

Why do prop firms implement weekend holding restrictions?

Prop firms set weekend holding restrictions to protect themselves and traders from big risks when markets close.

Risk management considerations

Weekend price gaps create high risks. When markets close Friday and reopen Monday, prices can jump a lot because of news or events during the weekend. This can cause big losses that normal stop-loss orders may not cover.

Low liquidity over the weekend also means prices can move quickly and spreads widen, making trades riskier. Firms want to stop traders from facing these unpredictable moves.

Ensuring firm liquidity and stability

Restrictions help protect the firm’s money. If too many trades lose big over the weekend, it can drain the firm’s resources. These rules keep trading steady and safe.

Some firms allow weekend holding only with limits or extra fees to balance risk and flexibility. The goal is to keep both traders and firms stable.

Common weekend holding policies across prop firms

Common weekend holding policies across prop firms

Weekend holding policies vary but mostly aim to control risk linked to market gaps and low liquidity during weekends.

Typical duration limits

Most prop firms do not allow trades to stay open over the weekend in funded accounts. Traders must close positions before Friday’s market close. Some firms allow weekend holding only in challenges or with short rollover limits. For traders seeking more flexibility, consider a prop firm instant account with no weekend restrictions.

A few firms, like Blueberry Funded, let traders hold positions over weekends freely, across accounts.

Asset types affected

Forex, commodities, and indices face strict weekend holding rules because they can gap sharply. Crypto often escapes these limits since its market runs 24/7, allowing continuous trading.

Riskier assets might need hedging or approval, especially for large trades.

Variations by region or market

Policies mainly depend on the firm, not region. Some firms ban weekend holds strictly, while others allow it with size caps or hedging rules.

Always check each firm’s rules. For example, FundedNext allows weekend holding in challenges but not in funded accounts.

How weekend holding rules affect your trading strategies

Weekend holding rules shape how you trade across weekends. They raise risks of price gaps and slippage that affect your strategy and risk control.

Impact on swing trading

Swing trades face higher gap risks over weekends. Prices can jump sharply from Friday to Monday, causing stop-losses to trigger at worse prices.

Many traders close winning positions early Friday to avoid sharp reversals from low weekend liquidity. Skilled traders may use gap trading or hedges to manage these moves.

Adjustments for longer holding periods

Traders often reduce position size and widen stops. Holding trades longer than a weekend means facing unpredictable low volume and volatile price jumps.

Adjusting indicators for low liquidity and using range-bound strategies help smooth trades. Planning Fridays around key levels can signal when to hold or close positions.

Tips for managing trades effectively under weekend holding restrictions

Managing trades under weekend holding restrictions requires smart planning and careful risk control to avoid losses from weekend market gaps.

Using stop loss and take profit wisely

Use stop loss and take profit to lock in gains and limit losses. Set these orders based on realistic price points before the weekend. This prevents large losses if prices gap wide when markets reopen.

Avoid placing stops too tight to reduce risk of being stopped out by normal price moves. Traders often widen stops slightly before weekend close.

Planning trades before weekends

Plan your trades to close risky positions before the weekend. Avoid holding volatile or large positions that could cause big gaps.

Check the economic calendar and news that could impact markets over the weekend. Some traders close or hedge trades ahead of these events to protect capital.

How ITAfx supports traders with weekend holding rules

How <a href="https://itafx.com/?utm_source=blog" target="_blank">ITAfx</a> supports traders with weekend holding rules’ title=’How <a href="https://itafx.com/?utm_source=blog" target="_blank">ITAfx</a> supports traders with weekend holding rules’ /></p>
<p><strong>ITAfx offers strong support</strong> to traders dealing with weekend holding rules, helping them manage risks better and trade confidently.</p>
<h3>Customer support benefits</h3>
<p><strong>ITAfx provides dedicated customer support</strong> that guides traders through weekend restrictions. Their team answers questions quickly and explains how to comply with rules.</p>
<p>This support reduces confusion and helps traders avoid common mistakes, making the experience smoother and safer.</p>
<h3>Tools offered for weekend risk management</h3>
<p><strong>ITAfx offers risk management tools</strong> tailored for weekend trading. These include advanced stop loss settings and weekend close alerts.</p>
<p>These tools help traders plan better and protect their capital from market gaps over the weekend.</p>
<h2 id="section-7" class="article-section">Common mistakes traders make with weekend holding rules</h2>
<p><strong>Many traders struggle with weekend holding rules</strong>, making mistakes that cost them money and opportunities.</p>
<h3>Ignoring the rules</h3>
<p><strong>Some traders simply ignore the weekend holding policies</strong> and keep positions open, risking violations and penalties. This can lead to account suspension or forced trade closures by the firm.</p>
<p>Not reading the fine print before trading is a common cause. Always learn your prop firm’s specific rules to avoid these problems.</p>
<h3>Overleveraging positions</h3>
<p><strong>Another big mistake is overleveraging trades before the weekend.</strong> Holding large, risky positions over the weekend exposes traders to sharp price gaps that can wipe out capital quickly.</p>
<p>Traders often forget leverage multiplies weekend gap risks. Managing leverage properly is key to surviving and thriving under these restrictions.</p>
<h2 id="section-8" class="article-section">Conclusion: mastering prop firm weekend holding rules for trading success</h2>
<p><strong>Mastering prop firm weekend holding rules</strong> is key to long-term trading success. Understanding these rules helps you manage risks and plan better trades.</p>
<p>Ignoring weekend restrictions can lead to big losses from price gaps and forced trade closures. On the other hand, adapting your strategy to these limits protects your capital and improves consistency.</p>
<p>Many successful traders <strong>close or hedge weekend trades</strong> and use risk tools like stop losses effectively. They also stay informed about firm-specific policies, which vary widely.</p>
<p>Ultimately, trading with weekend holding rules requires discipline and knowledge. Those who do so gain a clear edge and a smoother path to profitability.</p>
<h2 id="section-9" class="article-section">Key Takeaways</h2>
<p>Understand the essential prop firm weekend holding rules to manage risks effectively and improve your trading outcomes.</p>
<ul>
<li><strong>Weekend holding rules define trade limits:</strong> These rules set whether traders can keep positions open over the weekend, affecting risk exposure and strategy.</li>
<li><strong>Risk management is the core reason:</strong> Firms restrict weekend holding to avoid losses from price gaps and low liquidity during market closure.</li>
<li><strong>Policies vary widely by firm:</strong> Some require closing trades Friday, others allow weekend holding with conditions or fees.</li>
<li><strong>Swing trading faces higher challenges:</strong> Weekend gaps increase the risk of slippage, calling for position size adjustments and stop loss management.</li>
<li><strong>Effective trade management tips:</strong> Use stop loss and take profit wisely, and plan trades to close or hedge before weekends.</li>
<li><strong>ITAfx supports traders:</strong> With dedicated customer service and risk management tools tailored for weekend rules.</li>
<li><strong>Common mistakes harm traders:</strong> Ignoring rules and overleveraging can lead to forced closures or losses.</li>
<li><strong>Discipline and knowledge lead to success:</strong> Mastering these rules shields capital and provides an edge in prop firm trading.</li>
</ul>
<p>Trading success depends on understanding and adapting to weekend holding rules with clarity, caution, and strategy.</p>
<h2 id="section-10" class="article-section">FAQ – Prop Firm Weekend Holding Rules</h2>
<h3>Are weekend holds allowed in prop firms?</h3>
<p>Weekend holding policies vary significantly by prop firm and account type. Some firms allow weekend holds while others prohibit them entirely, so reviewing your specific firm’s rulebook is essential before trading.</p>
<h3>Which prop firms allow weekend holding?</h3>
<p>Blueberry Funded permits weekend holding across all account types. Think Capital allows it on Lightning, Nexus, and Dual Step Swing accounts. FundedNext allows weekend holding on Challenge accounts but not on funded accounts after passing the Challenge.</p>
<h3>Which firms prohibit weekend holding?</h3>
<p>FundedNext Funded Accounts, Think Capital Dual Step Intraday accounts, and TheTradingPit prohibit weekend holding and require all trades to close before Friday market close.</p>
<h3>Why do prop firms restrict weekend holding?</h3>
<p>Firms restrict weekend holds to manage risks like market gaps, reduced liquidity, unpredictable events, and increased volatility that can cause significant losses or slippage over the weekend.</p>
<h3>Are there costs for holding positions overnight?</h3>
<p>Yes. Swap charges apply to overnight holds at some firms, calculated based on the instrument type. These charges count toward daily loss limits and can be tripled on certain days.</p>
<h3>What happens if I ignore weekend holding rules?</h3>
<p>Ignoring the rules can lead to penalties such as forced trade closures, account suspension, or disqualification from the prop firm’s program.</p>


</article>
  </div>
</div>

<!-- ==================== FOOTER ==================== -->
<footer class="foot"><div class="container"><div class="foot-grid">
  <div class="foot-col"><div class="foot-mark">ITA<span class="fx">fx</span></div><p class="foot-tag">The first instant funding propfirm operated by a broker. Learn while you earn.</p><div class="foot-socials"><a href="https://www.youtube.com/@InstitutionalTradingAcademy" target="_blank" rel="noopener" aria-label="YouTube"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M23.5 6.19a3.02 3.02 0 00-2.12-2.14C19.5 3.5 12 3.5 12 3.5s-7.5 0-9.38.55A3.02 3.02 0 00.5 6.19 31.7 31.7 0 000 12a31.7 31.7 0 00.5 5.81 3.02 3.02 0 002.12 2.14c1.88.55 9.38.55 9.38.55s7.5 0 9.38-.55a3.02 3.02 0 002.12-2.14A31.7 31.7 0 0024 12a31.7 31.7 0 00-.5-5.81zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"/></svg></a><a href="https://t.me/itafxprop" target="_blank" rel="noopener" aria-label="Telegram"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z"/></svg></a><a href="https://www.instagram.com/itafx.instant/" target="_blank" rel="noopener" aria-label="Instagram"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.16c3.2 0 3.58.01 4.85.07 3.25.15 4.77 1.69 4.92 4.92.06 1.27.07 1.65.07 4.85 0 3.2-.01 3.58-.07 4.85-.15 3.23-1.66 4.77-4.92 4.92-1.27.06-1.64.07-4.85.07-3.2 0-3.58-.01-4.85-.07-3.26-.15-4.77-1.7-4.92-4.92-.06-1.27-.07-1.64-.07-4.85 0-3.2.01-3.58.07-4.85C2.38 3.92 3.9 2.38 7.15 2.23 8.42 2.18 8.8 2.16 12 2.16zM12 0C8.74 0 8.33.01 7.05.07 2.7.27.27 2.7.07 7.05.01 8.33 0 8.74 0 12s.01 3.67.07 4.95c.2 4.36 2.62 6.78 6.98 6.98C8.33 23.99 8.74 24 12 24s3.67-.01 4.95-.07c4.35-.2 6.78-2.62 6.98-6.98.06-1.28.07-1.69.07-4.95s-.01-3.67-.07-4.95c-.2-4.35-2.62-6.78-6.98-6.98C15.67.01 15.26 0 12 0zm0 5.84A6.16 6.16 0 1018.16 12 6.16 6.16 0 0012 5.84zM12 16a4 4 0 110-8 4 4 0 010 8zm6.41-11.85a1.44 1.44 0 100 2.88 1.44 1.44 0 000-2.88z"/></svg></a><a href="https://www.tiktok.com/@itafxprop" target="_blank" rel="noopener" aria-label="TikTok"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1v-3.5a6.37 6.37 0 00-.79-.05A6.34 6.34 0 003.15 15.2a6.34 6.34 0 0010.86 4.47V13a8.16 8.16 0 005.58 2.18v-3.45a4.85 4.85 0 01-2-.97 4.83 4.83 0 01-1.55-2.07V6.69h3.55z"/></svg></a><a href="https://x.com/itafxprop" target="_blank" rel="noopener" aria-label="X (Twitter)"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg></a></div><div class="foot-payments"><span>Visa</span><span>Mastercard</span><span>Amex</span><span>PayPal</span><span>Crypto</span><span>PIX</span></div></div>
  <div class="foot-col"><h4>Product</h4><ul><li><a href="/#features">Why ITAfx</a></li><li><a href="/#pricing">Accounts</a></li><li><a href="/#steps">How it works</a></li><li><a href="/#testimonials">Reviews</a></li></ul></div>
  <div class="foot-col"><h4>Institutional</h4><ul><li><a href="/about/">About</a></li><li><a href="/faq/">FAQ</a></li><li><a href="/affiliate/">Affiliate Program</a></li><li><a href="https://academy.itafx.com/" target="_blank" rel="noopener">Academy</a></li><li><a href="mailto:support@itafx.com">Contact</a></li></ul></div>
  <div class="foot-col"><h4>Legal & Risk</h4><ul><li><a href="/terms-of-service/">Terms of Service</a></li><li><a href="/privacy-policy/">Privacy Policy</a></li><li><a href="/return-policy/">Return Policy</a></li></ul></div>
  <div class="foot-col"><h4>Community</h4><ul><li><a href="https://www.youtube.com/@InstitutionalTradingAcademy" target="_blank" rel="noopener">YouTube</a></li><li><a href="https://t.me/itafxprop" target="_blank" rel="noopener">Telegram</a></li><li><a href="https://www.instagram.com/itafx.instant/" target="_blank" rel="noopener">Instagram</a></li><li><a href="https://www.tiktok.com/@itafxprop" target="_blank" rel="noopener">TikTok</a></li><li><a href="https://x.com/itafxprop" target="_blank" rel="noopener">X (Twitter)</a></li></ul></div>
</div><div class="foot-bottom"><p class="foot-legal">All trading accounts provided by ITAfx are simulated/virtual accounts. Traders do not trade with real capital. Profits are calculated based on virtual account performance. Trading foreign exchange carries a high level of risk. Past performance is not indicative of future results. ITA is operated by Institutional Trading Academy Ltd., ACE Corporate Services (St. Lucia) Ltd., Rodney Bay, Gros Islet, Saint Lucia, registered under company number 2025-00535. Payment processing provided by Gateway Solutions Limited. ITAfx services are not available to residents of the United States, Canada, Israel, Japan, North Korea, Belgium, Mauritius, or countries under UN/EU sanctions.</p><span>© 2026 Institutional Trading Academy Ltd. All rights reserved.</span></div></div></footer>

<!-- ==================== STICKY BOTTOM BAR ==================== -->
<div class="cbar" id="cbar" aria-hidden="true"><div class="timer"><span class="pulse"></span>40% OFF · <b id="countdown">47:59:14</b></div><a href="https://checkout.itafx.com/?coupon=ONEYEAR40" class="btn btn--primary" data-evt="cta_sticky">Get Funded <span class="arrow">→</span></a></div>

<!-- ==================== LANGUAGE MODAL ==================== -->
<div class="lang-modal" id="langModal"><div class="lang-modal-content"><div class="lang-modal-header"><h3>Choose Language</h3><button class="lang-modal-close" id="langClose">×</button></div><input type="text" class="lang-search" id="langSearch" placeholder="Search language..."><div class="lang-grid" id="langGrid"><div class="lang-option" data-lang="en">English</div><div class="lang-option" data-lang="es">Español</div><div class="lang-option" data-lang="pt">Português</div><div class="lang-option" data-lang="fr">Français</div><div class="lang-option" data-lang="de">Deutsch</div><div class="lang-option" data-lang="it">Italiano</div><div class="lang-option" data-lang="nl">Nederlands</div><div class="lang-option" data-lang="pl">Polski</div><div class="lang-option" data-lang="tr">Türkçe</div><div class="lang-option" data-lang="ar">العربية</div><div class="lang-option" data-lang="ja">日本語</div><div class="lang-option" data-lang="ko">한국어</div><div class="lang-option" data-lang="zh">中文</div><div class="lang-option" data-lang="hi">हिन्दी</div><div class="lang-option" data-lang="ru">Русский</div><div class="lang-option" data-lang="uk">Українська</div><div class="lang-option" data-lang="sv">Svenska</div><div class="lang-option" data-lang="da">Dansk</div><div class="lang-option" data-lang="no">Norsk</div><div class="lang-option" data-lang="fi">Suomi</div><div class="lang-option" data-lang="cs">Čeština</div><div class="lang-option" data-lang="ro">Română</div><div class="lang-option" data-lang="hu">Magyar</div><div class="lang-option" data-lang="el">Ελληνικά</div><div class="lang-option" data-lang="bg">Български</div><div class="lang-option" data-lang="hr">Hrvatski</div><div class="lang-option" data-lang="th">ภาษาไทย</div><div class="lang-option" data-lang="vi">Tiếng Việt</div><div class="lang-option" data-lang="id">Bahasa Indonesia</div><div class="lang-option" data-lang="ms">Bahasa Melayu</div><div class="lang-option" data-lang="sw">Kiswahili</div><div class="lang-option" data-lang="af">Afrikaans</div><div class="lang-option" data-lang="he">עברית</div><div class="lang-option" data-lang="fa">فارسی</div><div class="lang-option" data-lang="bn">বাংলা</div><div class="lang-option" data-lang="ta">தமிழ்</div></div></div></div>

<script>
/* === Reveal animation === */
(function(){if(window.matchMedia(window.innerHeight*0.5)bar.classList.add('show');else bar.classList.remove('show')},{passive:true})}})(); /* === Hamburger toggle === */ (function(){var btn=document.getElementById('hamburger');var nav=document.getElementById('mainNav');if(!btn||!nav)return;btn.addEventListener('click',function(){nav.classList.toggle('open')});nav.querySelectorAll('a').forEach(function(a){a.addEventListener('click',function(){nav.classList.remove('open')})})})(); /* === Language modal === */ (function(){var modal=document.getElementById('langModal');var btn=document.getElementById('langBtn');var close=document.getElementById('langClose');var search=document.getElementById('langSearch');var options=document.querySelectorAll('.lang-option');if(!modal||!btn)return;btn.addEventListener('click',function(){modal.classList.add('open')});close.addEventListener('click',function(){modal.classList.remove('open')});modal.addEventListener('click',function(e){if(e.target===modal)modal.classList.remove('open')});search.addEventListener('input',function(){var q=search.value.toLowerCase();options.forEach(function(o){o.classList.toggle('hidden',!o.textContent.toLowerCase().includes(q))})});options.forEach(function(o){o.addEventListener('click',function(){var lang=o.getAttribute('data-lang');modal.classList.remove('open');var L=/^\/(ar|bn|da|de|es|fi|fr|hi|id|it|ja|ko|ms|nl|no|pl|pt|ru|sv|sw|th|tr|vi|zh-CN)\//;var p=location.pathname.replace(L,'/');if(lang==='en'){location.href=p;return}var m={zh:'zh-CN'};var c=m[lang]||lang;if(c.match(/^(ar|bn|da|de|es|fi|fr|hi|id|it|ja|ko|ms|nl|no|pl|pt|ru|sv|sw|th|tr|vi|zh-CN)$/)){location.href='/'+c+p}})})})(); /* === Reading progress bar === */ (function(){var bar=document.getElementById('readingBar');var content=document.querySelector('.post-content');if(!bar||!content)return;window.addEventListener('scroll',function(){var rect=content.getBoundingClientRect();var contentTop=rect.top+window.scrollY;var contentHeight=rect.height;var scrolled=window.scrollY-contentTop;var progress=Math.min(Math.max(scrolled/(contentHeight-window.innerHeight),0),1);bar.style.width=(progress*100)+'%'},{passive:true})})(); /* === Smooth scroll for table of contents === */ document.querySelectorAll('.table-of-contents a, .chapter-nav a').forEach(function(link){link.addEventListener('click',function(e){e.preventDefault();var target=document.querySelector(this.getAttribute('href'));if(target){var offset=100;var top=target.getBoundingClientRect().top+window.scrollY-offset;window.scrollTo({top:top,behavior:'smooth'})}})}); /* === GTM event tracking === */ window.dataLayer=window.dataLayer||[];function gtag(){window.dataLayer.push(arguments)}document.addEventListener('click',function(e){var el=e.target.closest('[data-evt]');if(el)gtag('event',el.dataset.evt,{label:(el.textContent||'').trim()})}); /* === Section tracking === */ (function(){ var items=document.querySelectorAll('.toc-tracker__item'); var sections=document.querySelectorAll('.article-section[id^="section-"]'); var list=document.querySelector('.toc-tracker__list'); var timeEl=document.querySelector('.toc-tracker__time'); var barFill=document.querySelector('.toc-tracker__bar-fill'); var content=document.querySelector('.post-content'); if(!items.length||!sections.length||!content)return; var totalWords=content.textContent.split(/\s+/).length; var totalMin=Math.ceil(totalWords/250); var currentIdx=0; function activate(idx){ if(idx===currentIdx&&items[idx].classList.contains('active'))return; currentIdx=idx; items.forEach(function(item,i){ item.classList.remove('active'); if(i1?(idx/(items.length-1))*100:0; list.style.setProperty('--tracker-progress',Math.min(pct,100)+'%'); }} function updateReading(progress){ var remaining=Math.max(1,Math.ceil(totalMin*(1-progress))); if(timeEl)timeEl.textContent=remaining+' min left'; if(barFill)barFill.style.width=(progress*100)+'%'; } var ticking=false; window.addEventListener('scroll',function(){ if(ticking)return; ticking=true; requestAnimationFrame(function(){ ticking=false; var scrollY=window.scrollY+150; var found=-1; for(var i=sections.length-1;i>=0;i--){ if(sections[i].getBoundingClientRect().top+window.scrollY<=scrollY){found=i;break} } if(found>=0)activate(found); var rect=content.getBoundingClientRect(); var contentTop=rect.top+window.scrollY; var contentH=rect.height; var scrolled=window.scrollY-contentTop; var progress=Math.min(Math.max(scrolled/(contentH-window.innerHeight),0),1); updateReading(progress); }); },{passive:true}); activate(0); if(timeEl)timeEl.textContent=totalMin+' min left'; })(); /* === Smooth scroll for tracker === */ document.querySelectorAll('.toc-tracker a').forEach(function(link){link.addEventListener('click',function(e){e.preventDefault();var target=document.querySelector(this.getAttribute('href'));if(target){var top=target.getBoundingClientRect().top+window.scrollY-100;window.scrollTo({top:top,behavior:'smooth'})}})}); /* === UTM/ref link rewriting === */ (function(){var params=new URLSearchParams(location.search);var allParams={};params.forEach(function(v,k){allParams[k]=v});if(!allParams['ref'])allParams['ref']='ITAFXGOOGLEPARTNER';function getCookie(name){var m=document.cookie.match(new RegExp('(?:^|; )'+name+'=([^;]*)'));return m?decodeURIComponent(m[1]):null}function updateLinks(){var rtkClickid=getCookie('rtkclickid-store');if(rtkClickid&&!allParams['rtk_clickid'])allParams['rtk_clickid']=rtkClickid;document.querySelectorAll('a[href]').forEach(function(link){try{var url=new URL(link.href);if(!url.hostname.match(/itafx\.com$/))return;Object.keys(allParams).forEach(function(k){if(!url.searchParams.has(k))url.searchParams.set(k,allParams[k])});link.href=url.toString()}catch(e){}})}updateLinks();if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',updateLinks);setTimeout(updateLinks,500);setTimeout(updateLinks,1500);setTimeout(updateLinks,3000);new MutationObserver(updateLinks).observe(document.body||document.documentElement,{childList:true,subtree:true})})();