OPEN-SOURCE SCRIPT

MMDN-Pin Bar

This Pine Script code is designed to highlight Pin Bars on a TradingView chart by changing their color to yellow. A Pin Bar is a type of candlestick pattern that typically indicates a potential reversal in the market. The script uses specific conditions to identify bullish and bearish Pin Bars based on the size of the candlestick body and the length of the shadows (wicks).
1. Calculate Body and Shadows:
body: The absolute difference between the close and open prices.
upshadow: The upper shadow, calculated differently depending on whether the close is higher or lower than the open.
downshadow: The lower shadow, calculated similarly.
2. Define Pin Bar Conditions:
pinbar_h: Identifies a bullish Pin Bar if the previous candle's close is greater than its open, the previous candle's body is larger than the current candle's body, the upper shadow is more than half the size of the body, and the upper shadow is more than twice the size of the body.
pinbar_l: Identifies a bearish Pin Bar with similar conditions but for the lower shadow.
Set Pin Bar Color:
barcolor: Changes the color of the identified Pin Bars to yellow.
Candlestick analysisChart patterns

開源腳本

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

想在圖表上使用此腳本?

免責聲明