OPEN-SOURCE SCRIPT

principles of fu

已更新
### Detailed Description of the Script

#### **Title:**
"**Bullish and Bearish Engulfing with Conditional Rays and Wick Markers**"

#### **Purpose:**
This Pine Script indicator identifies and marks **bullish and bearish engulfing candle patterns** on a price chart. Additionally, it plots **two rays** (lines) for each detected pattern: one at the wick's extremity and another at the midpoint of the wick and the candle body. The indicator manages the display of these rays based on specific conditions, ensuring they remain on the chart until price action invalidates them.

#### **Components and Functionality:**

1. **Inputs and Customization:**
- **Lookback Period:** The script looks back 100 candles to manage and maintain rays on the chart.
- **Ray Colors:**
- `Bullish Ray Color`: Grey (default) for the ray at the low wick of the bullish engulfing candle.
- `Bearish Ray Color`: Grey (default) for the ray at the high wick of the bearish engulfing candle.
- `Bullish Midpoint Ray Color`: Blue (default) for the ray plotted at the midpoint between the body low and the low wick of the bullish engulfing candle.
- `Bearish Midpoint Ray Color`: Orange (default) for the ray plotted at the midpoint between the body high and the high wick of the bearish engulfing candle.

2. **Engulfing Candle Detection:**
- **Bullish Engulfing:**
- Occurs when a previous bearish candle (closing lower than its open) is followed by a candle that closes above the high of the previous candle and has a low equal to or lower than the previous candle's low.
- **Bearish Engulfing:**
- Occurs when a previous bullish candle (closing higher than its open) is followed by a candle that closes below the low of the previous candle and has a high equal to or higher than the previous candle's high.

3. **Ray Plotting:**
- **Wick Rays:**
- For a **bullish engulfing candle**, a ray is plotted at the **low wick** of the bullish candle.
- For a **bearish engulfing candle**, a ray is plotted at the **high wick** of the bearish candle.
- **Midpoint Rays:**
- For a **bullish engulfing candle**, a midpoint ray is plotted at the midpoint between the **body low** (the lower of the open or close) and the **low wick**.
- For a **bearish engulfing candle**, a midpoint ray is plotted at the midpoint between the **body high** (the higher of the open or close) and the **high wick**.

4. **Ray Management and Deletion:**
- **Bullish Rays:**
- The rays (both wick and midpoint) are removed if a subsequent candle's close falls below the **bullish ray** level (low wick of the bullish engulfing candle).
- **Bearish Rays:**
- The rays (both wick and midpoint) are removed if a subsequent candle's close rises above the **bearish ray** level (high wick of the bearish engulfing candle).

5. **Visualization on the Chart:**
- **Bullish Engulfing Signal:**
- A **plus sign** in **dark grey** is plotted below the candle to signify a detected bullish engulfing pattern.
- **Bearish Engulfing Signal:**
- An **X** in **dark grey** is plotted above the candle to signify a detected bearish engulfing pattern.

### **Overall Workflow:**
1. The script detects bullish and bearish engulfing patterns based on specific candle relationships.
2. It then plots rays corresponding to the wicks and midpoints of these engulfing candles.
3. These rays remain on the chart until the price invalidates them, ensuring that only relevant and active levels are displayed to the trader.

This indicator provides traders with a visual tool to identify key reversal patterns (engulfing patterns) and the critical price levels associated with them, which can be useful for making trading decisions.
發布通知
updated lines to only show 100% of the FU candle.. improved requirements so that it catches FU candles off of dojis, and doesnt mark fu candles without wicks...
發布通知
updated chart to better reflect the indicator
發布通知
the long awaited signals have arrived, think of the triangles as an opportunity to begin looking for reversal, no as signals to go long or short.
the new signals are 0-1hr and the old signals are 1hr+
發布通知
updated colors and chart to make more sense
Candlestick analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明