Pivot Breakout Strategy (Break of Structure + Risk Management)

This strategy is a pivot-based breakout system designed for $BINANCE:JUPUSDT. It identifies pivot highs and pivot lows using a configurable lookback period, then enters trades when price breaks through these pivot levels. The strategy includes flexible risk management with two exit methods: automatic SL/TP orders or manual position management with trailing stops and breakeven protection.
Core concept
- Pivot detection: Identifies pivot highs (PH) and pivot lows (PL) using a configurable period (default: 18 bars).
- Breakout entries: Enters long when price breaks above a pivot high; enters short when price breaks below a pivot low.
- Signal flip: Automatically closes opposite positions when a new signal appears, allowing for quick reversals.
- Visual markers: Draws neon-style lines and labels ("BoS PH" / "BoS PL") to mark pivot breakouts on the chart.
Entry signals
- Long entry: Price breaks above a confirmed pivot high (PH).
- Short entry: Price breaks below a confirmed pivot low (PL).
Exit methods (choose one)
- Method 1: Automatic SL/TP (default): Uses strategy.exit() with fixed stop loss and take profit levels. Orders are placed automatically when entry occurs.
- Method 2: Manual management: Uses strategy.close() with optional trailing stop and breakeven protection. Provides more control but requires manual exit logic.
Risk management
- Long positions: Default SL 3.5%, TP 4.5% (configurable).
- Short positions: Default SL 2.0%, TP 3.5% (configurable).
- Trailing stop (optional, Method 2 only): Trails from the best price since entry.
- Breakeven stop (optional, Method 2 only): Moves stop loss to breakeven after a profit trigger.
How to use
- Apply to $BINANCE:JUPUSDT. The strategy works on any timeframe, but pivot period may need adjustment for different timeframes.
- Choose your preferred exit method in the settings:
Use Automatic SL/TP for simpler, hands-off trading.
Use Manual management if you want trailing stops and breakeven protection. - Adjust pivot length based on market volatility: shorter periods catch more signals but may be noisier; longer periods are more selective.
- Enable/disable long or short strategies independently based on market conditions.
Key inputs snapshot
Visual features
- Neon-style lines mark pivot breakouts with glow effects.
- Labels show "BoS PH" (Break of Structure Pivot High) and "BoS PL" (Break of Structure Pivot Low).
- Customizable colors for bull and bear signals.
Educational use only. This is not financial advice. Pivot-based strategies can generate frequent signals; always validate with forward testing and consider transaction costs. The strategy automatically flips positions on opposite signals, which may result in higher trade frequency.
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้งานที่ผู้เขียนอนุมัตเท่านั้นจึงจะสามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องขอและได้รับอนุญาตก่อนใช้งาน ซึ่งโดยทั่วไปจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม โปรดทำตามคำแนะนำของผู้เขียนด้านล่าง หรือติดต่อ andreans โดยตรง
TradingView ไม่แนะนำให้จ่ายเงินหรือใช้สคริปต์ เว้นแต่คุณจะเชื่อถือผู้เขียนและเข้าใจวิธีการทำงานของสคริปต์นั้นอย่างถ่องแท้ คุณยังสามารถหาทางเลือกแบบโอเพนซอร์สฟรีได้ใน สคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำจำกัดสิทธิ์ความรับผิดชอบ
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้งานที่ผู้เขียนอนุมัตเท่านั้นจึงจะสามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องขอและได้รับอนุญาตก่อนใช้งาน ซึ่งโดยทั่วไปจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม โปรดทำตามคำแนะนำของผู้เขียนด้านล่าง หรือติดต่อ andreans โดยตรง
TradingView ไม่แนะนำให้จ่ายเงินหรือใช้สคริปต์ เว้นแต่คุณจะเชื่อถือผู้เขียนและเข้าใจวิธีการทำงานของสคริปต์นั้นอย่างถ่องแท้ คุณยังสามารถหาทางเลือกแบบโอเพนซอร์สฟรีได้ใน สคริปต์ชุมชนของเรา