OPEN-SOURCE SCRIPT

HH||LL||KC

업데이트됨
This script is written in Pine Script version 5, designed for TradingView. It defines a custom trading indicator named **HH||LL||KC**. Here's a breakdown of its components and functionality:

---

### **Indicator Overview**
- **Purpose**: Combines multiple technical analysis tools to generate trading signals, including Keltner Channels, RSI-based stochastic oscillator, and conditions for buy and sell alerts.
- **Overlay**: The indicator plots directly on the price chart (overlay = `true`).
- **Precision**: Values are displayed with 2 decimal points.

---

### **Key Components**
1. **Keltner Channels**:
- Defined by `ma`, `upper`, and `lower` bands.
- Uses an exponential moving average (EMA) as the basis (`ma`).
- The upper and lower bands are derived from the range of highs and lows over the specified `length` (default is 100), multiplied by a factor (`mult`, default is 0.5).

2. **RSI Stochastic Oscillator**:
- Combines RSI and Stochastic calculations to create `%K` and `%D` lines:
- RSI is calculated over `lengthRSI` (default 14) using the specified source (`close` by default).
- Stochastic uses `lengthStoch` (default 14) smoothed by `smoothK` and `smoothD`.
- `%K` and `%D` are used for overbought/oversold signals and crossovers.

3. **Highs, Lows, and Alerts**:
- Identifies:
- **Highs (HH)** when `%K > 80`.
- **Lows (LL)** when `%K < 20`.
- Generates `red` and `green` points based on crossovers of `%K` with overbought/oversold levels.
- A 36-period EMA is plotted as an additional trend indicator.

4. **Additional Plots**:
- `ta.linreg(close, 21, 0)`: Short-term linear regression line.
- `ta.linreg(close, 375, 0)`: Long-term linear regression line.
- Plots for `red` and `green` points for potential reversal levels.
- Buy and Sell signal markers:
- **Buy**: Appears below the bar when `condi1` is true.
- **Sell**: Appears above the bar when `condi2` is true.

5. **Alerts**:
- Triggered when:
- `%K` crosses `%D` with specific conditions (e.g., close above `green` or below `red`).
- Defined via `alertcondition`.

---

### **Trading Logic**
1. **Buy Signal (condi1)**:
- EMA is above the upper Keltner Channel.
- Red marker (`red`) is above the EMA, and:
- Current or past candles open and close above the marker.
- `%K` is below 20, and `%K` crosses `%D`.

2. **Sell Signal (condi2)**:
- EMA is below the lower Keltner Channel.
- Green marker (`green`) is below the EMA, and:
- Current or past candles open below the marker.
- `%K` is above 80, and `%K` crosses under `%D`.

---

### **Visualization**
- **Keltner Channel**: Blue bands for upper and lower limits, with a gray center line.
- **Trend Lines**:
- Orange for short-term linear regression.
- White for long-term linear regression and EMA.
- **Markers**:
- Green for buy signals.
- Red for sell signals.
- **Cross Points**:
- Green dots (`green`) for potential buy reversals.
- Red dots (`red`) for potential sell reversals.

---

### **Use Case**
Traders can use this indicator for:
- Identifying overbought/oversold conditions.
- Spotting trend reversals and continuation patterns.
- Generating buy/sell alerts based on multi-condition logic.

It is versatile and integrates several technical analysis concepts into a single script.
릴리즈 노트
This script is written in Pine Script version 5, designed for TradingView. It defines a custom trading indicator named **HH||LL||KC**. Here's a breakdown of its components and functionality:

---

### **Indicator Overview**
- **Purpose**: Combines multiple technical analysis tools to generate trading signals, including Keltner Channels, RSI-based stochastic oscillator, and conditions for buy and sell alerts.
- **Overlay**: The indicator plots directly on the price chart (overlay = `true`).
- **Precision**: Values are displayed with 2 decimal points.

---

### **Key Components**
1. **Keltner Channels**:
- Defined by `ma`, `upper`, and `lower` bands.
- Uses an exponential moving average (EMA) as the basis (`ma`).
- The upper and lower bands are derived from the range of highs and lows over the specified `length` (default is 100), multiplied by a factor (`mult`, default is 0.5).

2. **RSI Stochastic Oscillator**:
- Combines RSI and Stochastic calculations to create `%K` and `%D` lines:
- RSI is calculated over `lengthRSI` (default 14) using the specified source (`close` by default).
- Stochastic uses `lengthStoch` (default 14) smoothed by `smoothK` and `smoothD`.
- `%K` and `%D` are used for overbought/oversold signals and crossovers.

3. **Highs, Lows, and Alerts**:
- Identifies:
- **Highs (HH)** when `%K > 80`.
- **Lows (LL)** when `%K < 20`.
- Generates `red` and `green` points based on crossovers of `%K` with overbought/oversold levels.
- A 36-period EMA is plotted as an additional trend indicator.

4. **Additional Plots**:
- `ta.linreg(close, 21, 0)`: Short-term linear regression line.
- `ta.linreg(close, 375, 0)`: Long-term linear regression line.
- Plots for `red` and `green` points for potential reversal levels.
- Buy and Sell signal markers:
- **Buy**: Appears below the bar when `condi1` is true.
- **Sell**: Appears above the bar when `condi2` is true.

5. **Alerts**:
- Triggered when:
- `%K` crosses `%D` with specific conditions (e.g., close above `green` or below `red`).
- Defined via `alertcondition`.

---

### **Trading Logic**
1. **Buy Signal (condi1)**:
- EMA is above the upper Keltner Channel.
- Red marker (`red`) is above the EMA, and:
- Current or past candles open and close above the marker.
- `%K` is below 20, and `%K` crosses `%D`.

2. **Sell Signal (condi2)**:
- EMA is below the lower Keltner Channel.
- Green marker (`green`) is below the EMA, and:
- Current or past candles open below the marker.
- `%K` is above 80, and `%K` crosses under `%D`.

---

### **Visualization**
- **Keltner Channel**: Blue bands for upper and lower limits, with a gray center line.
- **Trend Lines**:
- Orange for short-term linear regression.
- White for long-term linear regression and EMA.
- **Markers**:
- Green for buy signals.
- Red for sell signals.
- **Cross Points**:
- Green dots (`green`) for potential buy reversals.
- Red dots (`red`) for potential sell reversals.

---

### **Use Case**
Traders can use this indicator for:
- Identifying overbought/oversold conditions.
- Spotting trend reversals and continuation patterns.
- Generating buy/sell alerts based on multi-condition logic.

It is versatile and integrates several technical analysis concepts into a single script.
Bands and ChannelsBreadth IndicatorsChart patterns

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항