OPEN-SOURCE SCRIPT

langshen K-Line Counter

English Description:**

This indicator, named “langshen K-Line Counter,” is designed to count the number of K-line bars (candlesticks) during the current trading day. The key functionalities include:

- **Daily Reset**: At the start of a new trading day (detected by the change in daily time), the counter automatically resets to 1.
- **Incremental Counting**: For each new bar within the same trading day, the counter increments by 1, thus recording the sequence number of each K-line.
- **Chart Display**: The current count is displayed as a numerical label above the high of each K-line on the chart. Users can customize the text size and color of these numbers.

This feature enables traders to visually track the number of K-lines and their sequence within the day, which can assist in analyzing market trends and the pace of price movements.

中文介绍:**

此指标名为“langshen K线计数器”,主要用于统计当前交易日内的K线(蜡烛图)数量。指标的核心功能包括:

- **每日计数重置**:在交易所日切换时(即新的一天开始时),计数器自动重置为1。
- **逐根累加**:在同一交易日内,每根新出现的K线都会使计数器加1,从而记录当天的K线序号。
- **图表展示**:计数器的当前值会以数字标签的形式显示在每根K线的最高价上方,用户可自定义数字的显示大小和颜色。

这种功能可以帮助交易者直观地了解当天市场中的K线数量以及K线的序号变化,辅助分析市场的走势和节奏。


Feragatname