OPEN-SOURCE SCRIPT

Next Candle Prediction (HA) (Open Source)

332
Automate your pinescript strategies to NinjaTrader ninja-view.com/

This Pine Script indicator is designed to perform the following tasks:

Buy/Sell Ratio (BSR) Calculation: It calculates the buying and selling ratio as a percentage based on volume and price levels of the current candle. The buying ratio is the percentage of the candle's volume attributed to buying, and the selling ratio is the percentage of the candle's volume attributed to selling.

Overbought and Oversold Levels: It plots horizontal lines on the chart to indicate overbought (green) and oversold (red) levels. These levels are set at 90% for overbought and 10% for oversold.

Label Display: It displays a label on the chart for the current candle, showing the buying and selling percentages. You can choose to display labels for past candles as well, controlled by the showPastLabels input.

Heikin Ashi Candle Calculation: It calculates Heikin Ashi candles, which are derived from the open, high, low, and close prices. These Heikin Ashi candles are used to predict the open and close prices of the next candle.

Next Candle Prediction: It predicts the open and close prices of the next candle based on Heikin Ashi calculations. It also determines the direction of the predicted candle (Up or Down) and assigns a color accordingly.

Display Predicted Candle Information: If the showCurrentLabel option is enabled, it displays a label for the predicted open price and direction of the next candle. This label is positioned above the current bar or past bars, depending on the settings.

Display Predicted Candle Size: It can also plot the size of the predicted next candle as a vertical line on the chart. You can control the width of this line using the candleWidth input. The color of the line corresponds to the predicted direction of the candle.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.