Buy on 5% dip strategy with time adjustment**IMPORTANT** Works the best on SOXL
Add me on insta! _i_want_ubc_cs
Huge shout out to @QuantNomad and @dokang for
1. Core Functionality
✅ Buys after a 5% drop from the highest price
✅ Sells when the price increases by 22% (Take Profit Multiplier: 1.22x)
SOXL
✅ Forced sell after 230 days if the trade remains unprofitable, but waits for a -15% recovery before exiting
✅ Leverage and capital allocation can be adjusted
✅ Provides a performance table for monthly and yearly returns, including CAGR and Max Drawdown (MDD)
2. Key Features
1️⃣ Trading Period Restriction
The script allows trading only within a specific time range (e.g., from 2015 to 2026).
2️⃣ Buy Signal Based on Price Drop
It tracks the highest price recorded and checks if the current price has dropped by a user-defined percentage (-5%) to trigger a buy order.
3️⃣ Take Profit & Forced Sell Conditions
If the price reaches 1.22x of the entry price, the position is closed.
If the position remains open for 230 days and is still at a loss, it waits for a recovery of -15% from the entry price before selling.
4️⃣ Leverage & Position Sizing
Users can configure leverage and capital allocation percentage for each trade.
5️⃣ Performance Analysis Table
The strategy logs monthly and yearly profit/loss, calculates CAGR (Compound Annual Growth Rate), and tracks Max Drawdown (MDD) to assess risk and profitability.
3. Strategy Implementation
Buy Signal: Activated when the price drops 5% from the highest recorded price.
Sell Signal: Triggered when the price reaches 1.22x the entry price or recovers from a -15% drawdown after 230 days.
Performance Analysis: Generates a monthly and yearly P&L table to help users track strategy effectiveness.
Quantnomad
Supertrend Screener LABELThis screens for Supertrend reversal's in 10 different securities. The main logic for the screener is taken from "Simple Custom Screener in Pinescript" by QuantNomad with his permission. If the label color is not visible due to the text in it being white colored, then choose a different color from settings. Also added a simple supertrend to it.
Terminology explanation:
Confirmed Reversal: Supertrend reversal that happened in the last bar and cannot be repainted.
Potential Reversal: Supertrend reversal that might happen in the current bar but can also not happen depending upon the timeframe closing price.
Uptrend/Downtrend : Shows all the tickers that are either currently in uptrend or downtrend.