OPEN-SOURCE SCRIPT

Bull Bear Pivot by Rawstocks

343
The "Bull Bear Pivot" indicator is a custom Pine Script (v5) tool designed for TradingView to assist traders in identifying key price levels and pivot points on intraday charts (up to 1-hour timeframes). It combines time-based open price markers, pivot high/low detection, and candlestick visualization to provide a comprehensive view of potential support, resistance, and trend reversal levels. Below is a detailed description of the indicator’s functionality, features, and intended use.

Indicator Overview:

The "Bull Bear Pivot" indicator is tailored for intraday trading, focusing on specific times of the day to mark significant price levels (open prices) and detect pivot points. It plots horizontal lines at the open prices of user-defined sessions, identifies pivot highs and lows on the current chart timeframe, and overlays custom candlesticks to highlight price action. The indicator is designed to work on timeframes of 1 hour or less (e.g., 1-minute, 3-minute, 5-minute, 15-minute, 30-minute, 60-minute) and includes a warning mechanism for invalid timeframes.

Key Features:

Time-Based Open Price Markers:
The indicator allows users to define up to five time-based sessions (e.g., 4:00 AM, 8:30 AM, 9:30 AM, 10:00 AM, and a custom time) to capture the open price at the start of each session.

For each session, it plots a horizontal line at the 1-minute open price, extending from the session start to the market close at 4:00 PM EST.

Each line is accompanied by a label positioned 5 bars to the right of the market close (4:00 PM EST), with the text right-aligned and vertically centered on the line.

Users can enable/disable each marker, customize the session time, label text, line color, and text color via the indicator’s settings.

Pivot Highs and Lows:
The indicator calculates pivot highs and lows on the current chart timeframe using the ta.pivothigh and ta.pivotlow functions.

Pivot highs are marked with green triangles above the bars, and pivot lows are marked with red triangles below the bars.

The pivot period (lookback/lookforward) is user-configurable, allowing flexibility in detecting short-term or longer-term reversals.

Custom Candlesticks:
The indicator overlays custom candlesticks on the chart, colored green for bullish candles (close > open) and red for bearish candles (close < open).

This feature helps visualize price action alongside the open price markers and pivot points.

Timeframe Restriction:
The indicator is designed to work on timeframes of 1 hour or less. If the chart timeframe exceeds 1 hour (e.g., 4-hour, daily), a warning label ("Timeframe > 1H\nIndicator Disabled") is displayed, and no elements are plotted.

Customizable Appearance:
Users can customize the appearance of the open price marker lines, including the line style (solid, dashed, dotted) and line width.

Labels for the open price markers have no background (transparent) and use customizable text colors.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.