Customize TradingView Indicator

Job ID: 39511719

Budget: $30 – $250 USD

TradingView Indicator Customization Specification

Example Scripthttps://www.tradingview.com/v/8mzvMPWL/

1. Simplify Visual Elements

Goal: Clean up the chart by removing unnecessary clutter.

Remove all trend continuation lines after BOS (e.g., diagonal lines above/below candles).
Retain only BOS (Break of Structure) and CHoCH (Change of Character) markers.
BOS lines must only appear after a valid pullback.
CHoCH markers should render only when defined conditions are met.

2. Handle Price Gaps (Gaps = Candle Close)

Problem: Gaps are not interpreted as candle closes, breaking BOS/CHoCH logic.
Treat any price gap as a valid candle close.
Generate BOS or CHoCH signals when gap conditions are met.
Example: https://www.tradingview.com/x/Ykwlp08p/

3. BOS and CHoCH Logic Enhancements

BOS can be triggered by wick or body close but only after a V-shaped pullback.
CHoCH must be confirmed by candle body close only.
Wick-only breaks are considered early/unconfirmed signals and must not generate confirmed CHoCH.

4. Alerts System

Supported Timeframes:
M1 (1-minute)
M15 (15-minute)
H4 (4-hour)
Each timeframe should include:
Independent alert toggles (on/off)
Independent configuration for BOS Up, BOS Down, CHoCH Up, CHoCH Down

Alert Logic:

Alerts should trigger upon price crossing the designated level (not on candle close).
Add optional CHoCH counter: limit to max 2 consecutive CHoCH alerts. Reset counter on BOS. Checkbox toggle in settings.

5. Alert Price Range Filter

Add user-defined inputs: Start, Stop

Filtering logic:
If both Start and Stop are defined: alerts trigger only when price is within the range.
If Stop = 0: range is Start to +∞
If Start = 0: range is -∞ to Stop
If both are 0: filtering disabled (all alerts allowed)

Note: Filtering applies only to M1 alerts (primarily CHoCH).

6. Signal Logic Summary

BOS (Break of Structure)
Must follow a V-pullback: candle closes lower than previous, then next candle breaks high (by wick or body)
Confirmed by:
BS (BOS Wick)
BB (BOS Body Close)
CHoCH (Change of Character)
Confirmed only by body close (CB)
Wick-only = unconfirmed (CW) → CHoCH line moves to new high/low

7. Code Architecture & Quality

Modular Design:
Use clean, reusable function blocks:
calcBOS()
calcCHoCH()
sendAlert()
drawSignals()

Avoid duplicated request.security() calls; store and reuse results.

8. Performance and Robustness

Ensure high performance even when script is attached to multiple charts.
Eliminate redundant logic.
Use var where possible to reduce recalculations.

9. Final Testing Requirements

Must work accurately on all 3 timeframes.
Must handle multiple chart instances.
Alerts must be compatible with both web and mobile TradingView notifications.

Validation:
Confirm BOS/CHoCH only trigger on valid V-pullbacks.
Confirm alerts don’t repeat on the same candle.
Apply only if you are confident in advanced Pine Script development and can deliver a clean, robust, and well-structured implementation. Prior experience with multi-timeframe logic and alert optimization is required.
Related categories: Metatrader Pine Script Trading