PROTECTED SOURCE SCRIPT

K-Line Midline Indicator@yuanmu

36
指标概述
K线中线指标是一款用于技术分析的自定义工具,专注于在K线图上绘制每根K线的中心位置线。该指标能够帮助交易者快速识别价格的平均位置、观察价格重心的变化趋势,并通过影线分析功能识别潜在的关键支撑阻力位。

核心功能
双模式中线绘制:

实体中线:(开盘价 + 收盘价) ÷ 2,反映多空力量平衡点

整根K线中线:(最高价 + 最低价) ÷ 2,反映整根K线的价格重心

智能影线分析:

自动识别异常长影线K线

双重过滤条件确保只标记有意义的影线

在最长影线中点位置绘制标记线

完全自定义显示:

可调节显示K线数量(1-200根)

独立设置中线和影线的颜色、线宽、线型

透明度渐变效果:当前K线最清晰,历史K线逐渐淡化

性能优化:

只在最后K线时绘制历史数据,避免重复计算

最大线条数量限制,确保图表运行流畅

自动检测可用历史数据范围

应用场景
短线交易:使用实体中线观察多空博弈,辅助判断入场时机

波段分析:使用整根K线中线识别价格重心,判断趋势强度

关键位识别:通过影线中点标记寻找潜在的支撑阻力区域

价格结构分析:观察中线排列形态,识别价格运行结构

参数设置
中线颜色/线宽/线型:调整主中线的视觉效果

显示K线数量:控制同时显示的K线中线数量

影线标记开关:启用/禁用影线分析功能

影线条件设置:调整影线筛选的灵敏度

影线样式设置:自定义影线标记的视觉样式

技术规格 (Technical Specifications)
开发平台: TradingView Pine Script v6

兼容性: 所有交易品种和时间周期

最大显示K线: 200根

线条数量限制: 最多500条线

更新频率: 实时更新

内存占用: 低至中等,取决于显示数量设置

使用提示 (Usage Tips)
从较小的显示数量开始(如20-30根),逐步增加

中线与影线标记使用对比色,便于区分

根据市场波动性调整影线条件参数

结合其他指标使用,如移动平均线或成交量指标

观察中线排列的形态变化,识别趋势转换信号

开发者信息 (Developer Information)
名称: 原木 (Yuanmu)

版本: 1.0

特点: 简洁高效,专注核心功能,注重用户体验

Indicator Overview
K-Line Midline Indicator is a custom technical analysis tool designed to plot the center line of each candlestick on the price chart. This indicator helps traders quickly identify price average positions, observe shifts in price gravity, and identify potential key support/resistance levels through shadow analysis functionality.

Core Features
Dual-Mode Midline Drawing:

Body Midline: (Open + Close) ÷ 2, reflecting the balance point between bullish and bearish forces

Whole K-Line Midline: (High + Low) ÷ 2, reflecting the price gravity of the entire candlestick

Intelligent Shadow Analysis:

Automatically identifies K-lines with abnormally long shadows

Dual-filtering conditions ensure only meaningful shadows are marked

Draws marker lines at the midpoint of the longest shadow

Fully Customizable Display:

Adjustable number of displayed K-lines (1-200)

Independent color, width, and style settings for midline and shadow markers

Transparency gradient effect: current K-line is most clear, historical K-lines gradually fade

Performance Optimization:

Draws historical data only on the last bar to avoid redundant calculations

Maximum line count limit ensures smooth chart operation

Automatic detection of available historical data range

Application Scenarios
Short-term Trading: Use body midline to observe bull-bear battles and assist entry timing decisions

Swing Analysis: Use whole K-line midline to identify price gravity and determine trend strength

Key Level Identification: Locate potential support/resistance areas through shadow midpoint markers

Price Structure Analysis: Observe midline arrangement patterns to identify price movement structures

Parameter Settings
Midline Color/Width/Style: Adjust visual appearance of main midline

Number of K-lines Displayed: Control how many K-line midlines are shown simultaneously

Shadow Marker Toggle: Enable/disable shadow analysis functionality

Shadow Condition Settings: Adjust sensitivity of shadow filtering

Shadow Style Settings: Customize visual appearance of shadow markers

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.