PROTECTED SOURCE SCRIPT

Hide Candles by Time & Weekend

28
Smart Hide Candles & Weekend (v6)

Description

This indicator is designed for traders who want to maintain focus by analyzing only specific hours or trading sessions. It automatically "hides" candles during user-defined time intervals (e.g., overnight or low-liquidity periods) and on weekends.

Unlike standard methods, this script colors the bars to match your chart's background color, creating a "clean space" effect. This allows you to eliminate visual noise without removing the underlying data from your chart.

Key Features

Weekend Hiding: Automatically detects Saturday and Sunday.

Flexible Scheduling: Define any time range (e.g., 2350-0900) to hide bars.

Timezone Support: Works correctly across all regions (UTC offsets).

Full Customization: Adjust colors for bullish/bearish candles and specify your chart's exact background color for a perfect "invisibility" effect.

Setup Instructions for Best Results:

To make the candles truly "disappear," follow these steps:

Open your Chart Settings (Symbol tab).

Set the transparency of standard candles (Body, Borders, and Wick) to 0%.

In the indicator settings, find the "Chart Background Color" field and select the color used in your theme (e.g., #131722 for the default dark theme).

Now, you will only see the candles drawn by the indicator during the allowed time periods.

Recommended Categories and Tags:

Category:

Utility — since this tool is a visual enhancement rather than a trading strategy.

Tags:

Visual

Session

Cleanup

Utility

Candles

Weekend

Technical Details

Version: Pine Script v6

Type: Overlay

Mechanism: Uses the plotcandle function to render custom bars.

Disclaimer: This tool is a visual aid and does not affect the calculations of other indicators.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.