Local Time Scale Overlay
- 指标
- Sebastian Popken
- 版本: 1.10
- 更新: 5 四月 2025
Local Time Scale Overlay is a technical indicator for MetaTrader 5 that enhances chart readability by overlaying a local time scale on the trading chart. It calculates the difference between your local system time and the server time and uses this difference to display time labels that reflect your local time at predefined intervals. The time interval is customizable via a drop‐down menu with options such as 5, 10, 15, 20, 30, 60, 120, and 480 minutes (with 15 minutes as the default).
Key Features:
• Local Time Labels:
The indicator computes and displays time labels for each bar that meets the specified interval criteria. It positions these labels at the bottom of the chart by using the average price of each bar (calculated from the high and low) to determine the horizontal placement.
• Vertical Time Markers:
Along with each time label, a vertical marker is drawn using a simple Unicode character (│). This marker is placed at the exact x-coordinate of the corresponding bar, providing a visual cue that aligns with the displayed time.
• Customizable Appearance:
Users can adjust the appearance through input parameters. These include the vertical line’s font size, the additional horizontal offset for the time labels, and a unified color setting that is applied to both the labels and the vertical markers.
• Market Closed Detection:
If no new bars are generated for a specified threshold period (e.g., 3600 seconds), the indicator assumes that the market is closed. In that case, it displays a “Market Closed” message in the lower left corner of the chart instead of the usual time labels.
• Dynamic Updating:
The indicator updates automatically using both timer events and chart events (such as scrolling or zooming). This ensures that the time labels and markers are recalculated and repositioned appropriately—even if the chart is moved or if new data becomes available when the market is open.
• Look-back Period:
You can limit the indicator’s processing to only a certain number of past days, thereby reducing the computational load and focusing on the most relevant data.
This indicator is especially useful for traders operating across different time zones or when there is a significant difference between the server time and the local time. It helps synchronize trading activities by clearly displaying the local time in relation to the chart’s bar times.