OPEN-SOURCE SCRIPT

Big Bar Followed by Doji/Pinbar

Used find doji/pinbars after a Big candle showing the potential Morning/Evening star formation after x amount of consecutive up moves.

1. Doji Threshold (dojiThreshold)
What is a Doji?: A doji is a candlestick pattern where the opening and closing prices are very close to each other. It represents indecision in the market.
Threshold Explanation: The dojiThreshold is used to define what qualifies as a doji by comparing the size of the candle's body (the difference between the opening and closing prices) to the total range of the candle (the difference between the high and low prices).
How it works:
The formula in the script checks if the absolute difference between the close and open is less than or equal to a percentage of the entire candle's range.
Example: If the dojiThreshold is set to 0.1 (or 10%), this means that for a candle to be considered a doji, the size of the body (the difference between the open and close) must be 10% or less of the total candle's range (the difference between the high and low prices).
In other words, if the body is small enough (based on the threshold), the candle is considered a doji.
2. Pinbar Body Size (pinbarBodySize)
What is a Pinbar?: A pinbar (short for "pinocchio bar") is a candlestick pattern with a small body and a long wick (or shadow) on one side, indicating a potential reversal. The longer wick represents a rejection of a certain price level.
Body Size Explanation: The pinbarBodySize defines the maximum proportion of the candle's total range that the body can occupy for the candle to be considered a pinbar.
How it works:
The script compares the size of the body to the total range of the candle.
Example: If pinbarBodySize is set to 0.3 (or 30%), the body of the candle must be 30% or less of the total range for it to be considered a pinbar. This ensures that the candle has a small body and, therefore, a relatively long wick on one side.
The script then checks whether the longer wick is on the upper or lower side of the candle to determine if it's a valid pinbar pattern.
Summary:
Doji: The dojiThreshold parameter sets how close the open and close prices need to be relative to the candle's range for the candle to be considered a doji.
Pinbar: The pinbarBodySize parameter sets the maximum size of the body relative to the candle's total range to qualify it as a pinbar.
Both of these thresholds are adjustable in the script, allowing you to fine-tune what qualifies as a doji or pinbar based on your trading style and the market conditions you're analyzing.
Candlestick analysisChart patternseducational

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


또한 다음에서도:

면책사항