OPEN-SOURCE SCRIPT

Inside Bar + Bullish and Bearish candlestick [Tarun]

ที่อัปเดต:
  1. Inside Bar Detection:


  • The function isInsideBar() checks if a bar is an inside bar, meaning its high is lower than the previous bar's high and its low is higher than the previous bar's low.
  • Inside bars are highlighted with an orange color.


  1. Bearish Candlestick Patterns:


  • Bearish Engulfing: When the current candlestick's body completely engulfs the previous candlestick's body.
  • Dark Cloud Cover: When a bullish candle is followed by a bearish candle that opens above the previous bullish candle's close but closes below its midpoint.
  • Bearish Harami: When a small bullish candlestick is engulfed by a larger bearish candlestick.
  • Evening Star: A three-candle pattern consisting of a large bullish candle, a small-bodied candle with a gap up or down, and a large bearish candle that closes below the midpoint of the first candle.
  • Shooting Star: A single candlestick pattern with a small real body near the bottom of the price range and a long upper shadow.
  • Bearish Marubozu: A candlestick with a long bearish body and little to no upper or lower shadows.
  • Bearish candlestick patterns are highlighted with a red color and labeled with abbreviated names.


  1. Bullish Candlestick Patterns:

  • Bullish Engulfing: Opposite of bearish engulfing, where the current candlestick's body completely engulfs the previous candlestick's body.
  • Piercing Pattern: When a bearish candle is followed by a bullish candle that opens below the previous bearish candle's low but closes above its midpoint.
  • Bullish Harami: Similar to bearish harami but bullish, where a small bearish candlestick is engulfed by a larger bullish candlestick.
  • Morning Star: A three-candle pattern opposite to the evening star, signaling a potential reversal from downtrend to uptrend.
  • Bullish Hammer: A single candlestick pattern with a small real body near the top of the price range and a long lower shadow.
  • Bullish Marubozu: A candlestick with a long bullish body and little to no upper or lower shadows.
  • Bullish candlestick patterns are highlighted with a purple color and labeled with abbreviated names.

เอกสารเผยแพร่
Update Candlestick Text Style
เอกสารเผยแพร่
tweak small part
เอกสารเผยแพร่
Refactored candlestick pattern detection logic to consolidate conditions and improve accuracy, reducing bugs and enhancing code readability.
เอกสารเผยแพร่
Streamlined candlestick pattern detection, rectifying bugs and enhancing code clarity
เอกสารเผยแพร่
  1. 1. Indicator Settings:

    *The indicator is configured to overlay on the main price chart.
    *Parameters like max_labels_count, max_lines_count, and max_bars_back control the maximum number of labels, lines, and bars displayed, respectively.

  1. 2. Inside Bar Detection:

    *The script checks if the current bar is an inside bar, where the high is lower and the low is higher than the previous bar.
    *Inside bars are highlighted with an orange color.

  1. 3. Candlestick Labeling:

    *Labels (myLabel and myLabelb) are used to display candlestick pattern names below and above the bars, respectively.

  1. 4.Bearish Candlestick Patterns:

    *Bearish patterns like Bearish Engulfing, Dark Cloud Cover, Bearish Harami, Evening Star, Shooting Star, and Bearish Marubozu are detected using specific conditions. These patterns are colored red.

  1. 5.Bullish Candlestick Patterns:

    *Bullish patterns like Bullish Engulfing, Piercing Pattern, Bullish Harami, Morning Star, Bullish Hammer, and Bullish Marubozu are detected similarly. These patterns are colored purple.

  1. 6.Labeling Candlestick Patterns:

    *Detected patterns are labeled with their respective abbreviations (e.g., "BE" for Bullish Engulfing) on the appropriate labels.

  1. 7.Code Optimization:

    *The code is optimized for efficiency and readability, ensuring concise conditions for pattern detection.
Candlestick analysisChart patternseducational

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ