OPEN-SOURCE SCRIPT

Good Candles with Risk Table

This custom Pine Script indicator highlights bullish and bearish candles based on the highest and lowest close prices over the past specified number of candles (look-back period).

Bullish candles are marked with an orange color when the close is higher than the highest close from the previous candle.
Bearish candles are marked with a purple color when the close is lower than the lowest close from the previous candle.
The indicator also draws two lines for each colored candle:

Midline: A horizontal line drawn at the midpoint between the open and close of the candle, which helps visualize the candle's body.
Open line: A horizontal line drawn at the open price, offering an additional reference point for market action.
Lines are visible for the last 5 colored candles (either bullish or bearish), with old lines being removed to avoid clutter on the chart.

Additionally, the Risk Table at the top right of the chart shows the calculated units to buy for the specified risk amount (default value of $0.1), based on the distance between the candle’s close and its midpoint. This allows users to manage their risk effectively by knowing how many units they should purchase to match their desired risk level.
Candlestick analysis

開源腳本

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

想在圖表上使用此腳本?

免責聲明