OPEN-SOURCE SCRIPT

MMDN-Pin Bar

mmdn814の投稿
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の精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項