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.
In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.