OPEN-SOURCE SCRIPT
Swing HL

**摆动点标注(Swing HL)**
本指标用于在价格图表上标示摆动高点与摆动低点,以辅助用户观察价格结构、波段节奏及潜在支撑/阻力区域。标注以圆点形式叠加在主图上,可通过参数灵活控制显示周期、敏感度及视觉样式,适合作为价格结构分析的辅助工具。
### 参数及用法说明
1. **最小显示时间框架(minSwingTf)**
* 用途:设定摆动点开始显示的最小周期。
* 当前图表周期小于该设置时,不显示任何摆动标注。
* 建议:
* 做中短线结构分析时,可设置为 240 分钟或更高;
* 若需要在更小周期观察结构,可适当降低该参数。
2. **left / right(leftBars / rightBars)**
* 用途:共同控制摆动高点、低点识别的“严格程度”和频率。
* 调整建议:
* 数值较小:标注更频繁,适合关注细节波动、短线结构;
* 数值较大:只保留更明显的摆动点,适合观察中期或波段结构;
* 当图表上摆动点过多、显得拥挤时,可适当增大这两个参数。
3. **标注颜色(dotColor)**
* 用途:设置摆动点圆标的颜色。
* 建议根据图表背景及主图颜色进行调整,以保证摆动点清晰可见但不过于抢眼。
4. **线宽(dotWidth)**
* 用途:控制圆点标注的线宽,从而影响圆点的视觉大小。
* 当需要在高密度数据或缩放较小时保持清晰,可适当增大该数值。
### 使用建议
* 可将本指标作为结构辅助层叠加在任何交易系统之上,用于直观划分价格的波段高低点。
* 进行多周期分析时,可在较大周期(如 4H、日线)上利用本指标确认整体结构,再配合小周期执行入场与风控。
* 当摆动点过多时,可通过提高 `minSwingTf` 或增加 `left` / `right` 参数,使结构标注更加简洁清晰。
* 本指标仅提供价格摆动结构的可视化标注,不直接构成完整的交易信号或策略规则,建议与个人既有分析方法结合使用。
---
**Swing HL – Swing High/Low Marker**
This indicator marks swing highs and swing lows on the price chart to assist in reading price structure, swing rhythm, and potential support/resistance zones. Markers are plotted as dots on the main chart, and display behavior can be fully controlled via user inputs such as minimum timeframe, sensitivity, and visual style. It is designed to serve as a structural overlay for discretionary or systematic analysis.
### Inputs and Usage
1. **Minimum Display Timeframe (minSwingTf)**
* Purpose: Defines the minimum timeframe on which swing markers will be shown.
* When the current chart timeframe is below this setting, all swing markers are hidden.
* Guidance:
* For swing or position-style structure analysis, consider using 4H or higher;
* For intraday structural work, you may lower this value as needed.
2. **left / right (leftBars / rightBars)**
* Purpose: Jointly control how strict and how frequent swing highs and lows are marked.
* Tuning:
* Smaller values: More frequent swings, suitable for detailed, lower-timeframe structure;
* Larger values: Only more pronounced swings are kept, suitable for higher-level trend and swing mapping;
* If the chart becomes crowded with markers, increasing these values will simplify the structure.
3. **Marker Color (dotColor)**
* Purpose: Sets the color of the swing markers.
* It is recommended to choose a color that contrasts with the background and main price plot while remaining visually unobtrusive.
4. **Line Width (dotWidth)**
* Purpose: Controls the line width of the dot markers, effectively adjusting their perceived size.
* On dense charts or when zoomed out, a larger value can help maintain readability.
### Practical Notes
* Use this indicator as a structural overlay to highlight swing highs and lows alongside your existing trading tools and methods.
* In multi-timeframe workflows, it can help outline the main structure on higher timeframes (e.g., 4H, Daily), which you then refine on lower timeframes for execution.
* If too many swing points appear, either increase `minSwingTf` or raise the `left` / `right` values to obtain a cleaner structural view.
* The script is intended as a visualization aid for price swings; it does not, by itself, define entry, exit, or risk management rules and should be integrated into a broader analytical framework.
本指标用于在价格图表上标示摆动高点与摆动低点,以辅助用户观察价格结构、波段节奏及潜在支撑/阻力区域。标注以圆点形式叠加在主图上,可通过参数灵活控制显示周期、敏感度及视觉样式,适合作为价格结构分析的辅助工具。
### 参数及用法说明
1. **最小显示时间框架(minSwingTf)**
* 用途:设定摆动点开始显示的最小周期。
* 当前图表周期小于该设置时,不显示任何摆动标注。
* 建议:
* 做中短线结构分析时,可设置为 240 分钟或更高;
* 若需要在更小周期观察结构,可适当降低该参数。
2. **left / right(leftBars / rightBars)**
* 用途:共同控制摆动高点、低点识别的“严格程度”和频率。
* 调整建议:
* 数值较小:标注更频繁,适合关注细节波动、短线结构;
* 数值较大:只保留更明显的摆动点,适合观察中期或波段结构;
* 当图表上摆动点过多、显得拥挤时,可适当增大这两个参数。
3. **标注颜色(dotColor)**
* 用途:设置摆动点圆标的颜色。
* 建议根据图表背景及主图颜色进行调整,以保证摆动点清晰可见但不过于抢眼。
4. **线宽(dotWidth)**
* 用途:控制圆点标注的线宽,从而影响圆点的视觉大小。
* 当需要在高密度数据或缩放较小时保持清晰,可适当增大该数值。
### 使用建议
* 可将本指标作为结构辅助层叠加在任何交易系统之上,用于直观划分价格的波段高低点。
* 进行多周期分析时,可在较大周期(如 4H、日线)上利用本指标确认整体结构,再配合小周期执行入场与风控。
* 当摆动点过多时,可通过提高 `minSwingTf` 或增加 `left` / `right` 参数,使结构标注更加简洁清晰。
* 本指标仅提供价格摆动结构的可视化标注,不直接构成完整的交易信号或策略规则,建议与个人既有分析方法结合使用。
---
**Swing HL – Swing High/Low Marker**
This indicator marks swing highs and swing lows on the price chart to assist in reading price structure, swing rhythm, and potential support/resistance zones. Markers are plotted as dots on the main chart, and display behavior can be fully controlled via user inputs such as minimum timeframe, sensitivity, and visual style. It is designed to serve as a structural overlay for discretionary or systematic analysis.
### Inputs and Usage
1. **Minimum Display Timeframe (minSwingTf)**
* Purpose: Defines the minimum timeframe on which swing markers will be shown.
* When the current chart timeframe is below this setting, all swing markers are hidden.
* Guidance:
* For swing or position-style structure analysis, consider using 4H or higher;
* For intraday structural work, you may lower this value as needed.
2. **left / right (leftBars / rightBars)**
* Purpose: Jointly control how strict and how frequent swing highs and lows are marked.
* Tuning:
* Smaller values: More frequent swings, suitable for detailed, lower-timeframe structure;
* Larger values: Only more pronounced swings are kept, suitable for higher-level trend and swing mapping;
* If the chart becomes crowded with markers, increasing these values will simplify the structure.
3. **Marker Color (dotColor)**
* Purpose: Sets the color of the swing markers.
* It is recommended to choose a color that contrasts with the background and main price plot while remaining visually unobtrusive.
4. **Line Width (dotWidth)**
* Purpose: Controls the line width of the dot markers, effectively adjusting their perceived size.
* On dense charts or when zoomed out, a larger value can help maintain readability.
### Practical Notes
* Use this indicator as a structural overlay to highlight swing highs and lows alongside your existing trading tools and methods.
* In multi-timeframe workflows, it can help outline the main structure on higher timeframes (e.g., 4H, Daily), which you then refine on lower timeframes for execution.
* If too many swing points appear, either increase `minSwingTf` or raise the `left` / `right` values to obtain a cleaner structural view.
* The script is intended as a visualization aid for price swings; it does not, by itself, define entry, exit, or risk management rules and should be integrated into a broader analytical framework.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.