OPEN-SOURCE SCRIPT

Buy Dip Multiple Positions

386
🎯 Objective
This strategy aims to capture aggressive dip-buying opportunities during volume-confirmed price reversals in short term downtrending markets. It is optimized for multi-entry precision, adaptive stop management, and real-time trade monitoring.

It allows traders to execute multiple long entries and dynamically trail stops to maximize gains while capping risk. Designed with modular inputs, this strategy is ideal for intraday momentum scalping and swing trading alike.

🔧 How It Operates
The strategy triggers buy entries when three conditions align:

Reversal Candle: Current close < prior low × 0.998

Volume Confirmation: Current volume exceeds average of prior 2 bars × 1.2

Price Surge Threshold: Current close below user-defined % of close from N bars ago

Once a reversal candle is confirmed, the strategy:

Calculates position size based on user-defined risk parameters

Allows up to a max number of simultaneous trades

Trailing Stop kicks in 2 bars after entry, climbing by a user-defined % each bar

Exit occurs when price hits either the trailing stop or target price

🛠️ Inputs
Users can customize all major aspects of the strategy:

Max Simultaneous Trades: Default 20

Trailing Stop Increase per Bar (%): Default 1%

Initial Stop (% of Reversal Low): Default 85%

Target Price (% Above Reversal Low): Default 60%

Price Surge Threshold (% of Past Close): Default 89%

Surge Lookback Bars: Default 14

Show Active Trade Dot: Toggle to display green trade status dot

📊 Visual Overlays
The chart displays the following:

Marker Description
🟢 Green Dot Active trade (toggleable)
🔴 Red Dot Max trades reached
📈 Trailing Stop Applied internally but not plotted (can be added)
📊 Metrics Plots of win rate, winning/losing trade counts
📎 Notes
Strategy uses strategy.cash allocation logic

Entry size adapts to account equity and risk per trade

All parameters are accessible via the settings panel

Built entirely in Pine Script v5

This strategy balances flexibility and precision, giving traders control over entry timing, capital allocation, and stop behavior. Ideal for those looking to automate dip-buy setups with tactical overlays and visual alerts.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.