OPEN-SOURCE SCRIPT
Cập nhật Engulfing Candles

This script serves as the "Engulfing Candles" indicator in TradingView. Here's what it does:
- It identifies bullish candlestick patterns where the current candle's high is lower than the previous candle's high, the current candle's low is higher than the previous candle's low, the current candle's close is higher than the previous candle's close, and the current candle's open is higher than the previous candle's open. It also identifies bearish candlestick patterns where the conditions are reversed.
- The indicator colors bullish candles in a specific color (Yellow Green) to visually highlight the bullish pattern, and colors bearish candles in another color (Purple pink) to visually highlight the bearish pattern.
- Additionally, it triggers an alert when either the bullish or bearish triangle shape appears, notifying traders with the message "A Southern Star Shadows pattern has appeared!"
- It identifies bullish candlestick patterns where the current candle's high is lower than the previous candle's high, the current candle's low is higher than the previous candle's low, the current candle's close is higher than the previous candle's close, and the current candle's open is higher than the previous candle's open. It also identifies bearish candlestick patterns where the conditions are reversed.
- The indicator colors bullish candles in a specific color (Yellow Green) to visually highlight the bullish pattern, and colors bearish candles in another color (Purple pink) to visually highlight the bearish pattern.
- Additionally, it triggers an alert when either the bullish or bearish triangle shape appears, notifying traders with the message "A Southern Star Shadows pattern has appeared!"
Phát hành các Ghi chú
This is the modified version of the Engulfing Candles indicator:This script serves as the 'Engulfing Candles V2' indicator in TradingView. Here's what it does:
- It identifies two types of bullish engulfing candlestick patterns: the first type occurs when the current candle's close is higher than its open and higher than the previous candle's high, and the second type occurs when the current candle's close is higher than its open, higher than the previous candle's open, and the previous candle's close is lower than its open. Similarly, it identifies two types of bearish engulfing candlestick patterns: the first type occurs when the current candle's close is lower than its open and lower than the previous candle's low, and the second type occurs when the current candle's close is lower than its open, lower than the previous candle's open, and the previous candle's close is higher than its open.
- The indicator colors the previous candles based on the identified engulfing patterns. Bullish engulfing candles are colored in Yellow Green, while bearish engulfing candles are colored in Purple Pink.
- Additionally, it triggers an alert when any of the identified engulfing patterns appear on the previous candle, notifying traders with the message 'Engulfing pattern has appeared!'.
Phát hành các Ghi chú
Bullish Patterns:- bullish1: This pattern is a standard bullish engulfing pattern. It occurs when the current candle's close is higher than its open, the previous candle's close is lower than its open, and the current candle's close is higher than the previous candle's high.
- bullish2: This pattern extends the criteria of the bullish engulfing pattern. In addition to the conditions of bullish1, it checks if the close of the previous candle is higher than its open and if the close of the current candle is higher than the previous candle's high.
- bullish3: This pattern further extends the criteria. In addition to the conditions of bullish2, it checks if the close of the candle two periods ago is higher than its open and if the close of the current candle is higher than the previous two candle's high.
- bullish4: This pattern is the most extended version. In addition to the conditions of bullish3, it checks if the close of the candle three periods ago is higher than its open and if the close of the current candle is higher than the previous three candle's high.
Bearish Patterns:
- bearish1: This pattern is a standard bearish engulfing pattern. It occurs when the current candle's close is lower than its open, the previous candle's close is higher than its open, and the current candle's close is lower than the previous candle's low.
- bearish2: This pattern extends the criteria of the bearish engulfing pattern. In addition to the conditions of bearish1, it checks if the close of the previous candle is lower than its open and if the close of the current candle is lower than the previous candle's low.
- bearish3: This pattern further extends the criteria. In addition to the conditions of bearish2, it checks if the close of the candle two periods ago is lower than its open and if the close of the current candle is lower than the previous two candle's low.
- bearish4: This pattern is the most extended version. In addition to the conditions of bearish3, it checks if the close of the candle three periods ago is lower than its open and if the close of the current candle is lower than the previous three candle's low.
These patterns are progressively more stringent, capturing engulfing behaviors across multiple candle periods for both bullish and bearish scenarios.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.