OPEN-SOURCE SCRIPT
已更新

ICT Session by Lasins

81
Name: ICT Session by Lasins

Purpose: To visually identify and differentiate between the Asian, London, and New York trading sessions on the chart.

Features:

Highlights the background of the chart during each session.

Includes a mini dashboard in the top-right corner to show the active session.

Allows customization of time zones (exchange timezone or UTC).

Displays copyright and author information.

Key Components
Inputs:

useExchangeTimezone: A boolean input to toggle between using the exchange timezone or UTC for session times.

showDashboard: A boolean input to toggle the visibility of the mini dashboard.

Session Times:

The script defines three trading sessions:

Asian Session: 2000-0000 UTC (or adjusted for exchange timezone).

London Session: 0200-0500 UTC (or adjusted for exchange timezone).

New York Session: 0700-1000 UTC (or adjusted for exchange timezone).

Session Detection:

The is_session function checks if the current time falls within a specified session using the time function.

Background Coloring:

The bgcolor function is used to highlight the chart background during each session:

Asian Session: Red background.

London Session: Green background.

New York Session: Blue background.

Mini Dashboard:

A table is created in the top-right corner of the chart to display the active session and its corresponding color.

The dashboard includes:

A header row with "Session" and "Color".

Rows for each session (Asian, London, New York) with their respective colors.

Copyright and Author Information:

A label is added to the chart to display the copyright and author information ("© ICT Session by Lasins Raj").

How It Works
The script checks the current time and compares it to the predefined session times.

If the current time falls within a session, the chart background is highlighted with the corresponding color.

The mini dashboard updates to reflect the active session.

The copyright and author information is displayed at the bottom of the chart.

Customization
You can adjust the session times in the script to match your preferred timezone or trading hours.

The useExchangeTimezone input allows you to switch between UTC and the exchange timezone.

The showDashboard input lets you toggle the visibility of the mini dashboard.

Example Use Case
Traders who follow the ICT (Inner Circle Trader) methodology can use this indicator to identify key trading sessions and plan their trades accordingly.

The visual representation of sessions helps traders quickly recognize when major markets are open and active.
發行說明
Purpose: To visually identify and differentiate between the Asian, London, and New York trading sessions on the chart, and to provide alerts when a session starts or ends.

Features:

Highlights the background of the chart during each session.

Includes a mini dashboard in the top-right corner to show the active session.

Provides alerts to notify when a session starts or ends.

Allows customization of time zones (exchange timezone or UTC).

Displays copyright and author information.

Key Components
Inputs:

useExchangeTimezone: A boolean input to toggle between using the exchange timezone or UTC for session times.

showDashboard: A boolean input to toggle the visibility of the mini dashboard.

Session Times:

The script defines three trading sessions:

Asian Session: 2000-0000 UTC (or adjusted for exchange timezone).

London Session: 0200-0500 UTC (or adjusted for exchange timezone).

New York Session: 0700-1000 UTC (or adjusted for exchange timezone).

Session Detection:

The is_session function checks if the current time falls within a specified session using the time function.

Background Coloring:

The bgcolor function is used to highlight the chart background during each session:

Asian Session: Red background.

London Session: Green background.

New York Session: Blue background.

Mini Dashboard:

A table is created in the top-right corner of the chart to display the active session and its corresponding color.

The dashboard includes:

A header row with "Session" and "Color".

Rows for each session (Asian, London, New York) with their respective colors.

Copyright and Author Information:

A label is added to the chart to display the copyright and author information ("© ICT Session by Lasins Raj").

Alerts:

Alerts are added to notify when a session starts or ends.

Alert conditions are defined for:

Asian Session Start and End.

London Session Start and End.

New York Session Start and End.

Alerts are triggered when the current bar transitions into or out of a session.

How It Works
Session Highlighting:

The script checks the current time and compares it to the predefined session times.

If the current time falls within a session, the chart background is highlighted with the corresponding color.

Mini Dashboard:

The dashboard updates to reflect the active session and its color.

Alerts:

Alerts are triggered when a session starts or ends.

For example:

If the current bar is within the Asian session and the previous bar was not, the "Asian Session Start" alert is triggered.

If the current bar is outside the Asian session and the previous bar was within it, the "Asian Session End" alert is triggered.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。