← All Scripts

session

Malik Subhan
7mo ago
session

<p>// Disclaimer: This script is for educational purposes only and does not constitute financial advice. Use at your own risk.</p>
<p>The <b>Session Indicator</b> visually highlights the main global trading sessions — <b>Asian</b>, <b>London</b>, and <b>New York</b> — directly on the chart background. It helps traders quickly identify which session the current price action belongs to, improving contextual awareness during analysis.</p>
<p><b>Core Logic:</b></p>
<ul>
<li>The script divides the trading day into three distinct time windows corresponding to the major forex market sessions.</li>
<li>Each session’s start and end hours can be customized via <code>input.int()</code> controls.</li>
<li>The indicator calculates the current hour from the system timestamp and compares it against the defined session ranges.</li>
<li>When a bar falls within a session, a semi-transparent background color is applied to visually mark that region.</li>
</ul>
<p><b>Session Colors:</b></p>
<ul>
<li><span style="color:blue;">Blue:</span> Asian Session (Tokyo/Sydney)</li>
<li><span style="color:green;">Green:</span> London Session (European markets)</li>
<li><span style="color:red;">Red:</span> New York Session (U.S. markets)</li>
</ul>
<p><b>Usage:</b></p>
<ul>
<li>Helps identify which trading session is active and when liquidity or volatility is expected to rise.</li>
<li>Useful for day traders and scalpers to align their strategies with session-specific behaviors.</li>
<li>Can be combined with volatility indicators or volume analysis to spot overlaps and high-activity zones.</li>
</ul>
<p><b>Enhancements:</b></p>
<ul>
<li>Add background overlays for overlapping sessions (e.g., London–New York overlap) to identify high-volume periods.</li>
<li>Include optional session labels or text markers for clarity.</li>
<li>Integrate alerts when new sessions begin.</li>
</ul>
<p><b>Summary:</b></p>
<p>The Session Indicator is a simple but powerful visualization tool that helps traders synchronize their strategies with global market timings. By showing active sessions directly on the chart, it enhances situational awareness and decision-making precision.</p>
 

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by GoCharting. Read more in the Terms of Use.

Comments (1)

Loading comments…