Time Algo [Project Baby Forex]This indicator is based on the Time Algorithm strategy developed by Project Baby Forex
מחזורים
Multiasset MVRVZ - MVRVZ for Multiple Crypto Assets [Da_Prof]This indicator shows the Market Value-Realized Value Z-score (MVRVZ) for Multiple Assets. The MVRV-Z score measures the value of a crypto asset by comparing its market cap to the realized value and dividing by the standard deviation of the market cap (market cap – realized cap) / stdev(market cap) to get a z-score. When the market value is significantly higher than the realized value, the asset may be considered "overvalued". Conversely, market values below the realized value may indicate the asset is "undervalued". For some assets (e.g., BTC) historically high values have generally signaled price tops and historically low values have signaled bottoms.
The indicator displays two lines: 1) the MVRV-Z of the current chart symbol if the data is available through Coin Metrics (this is displayed in light blue), and 2) the MVRV-Z of the symbol selected from the dropdown (displayed in orange). The MVRV-Z of BTC is the default selected orange line. The example chart shows CRYPTOCAP:ETH 's MVRV-Z in blue and CRYPTOCAP:BTC 's MVRV-Z in orange.
The MVRV-Z in this indicator is calculated on the weekly and will display consistently on lower timeframes. Some MVRV-Z indicators calculate this value from collection of all data from the beginning of the chart on the timeframe of the chart. This creates inconsistency in the standard deviation calculation and ultimately the z-score calculation when moving between time frames. This indicator calculates MVRV-Z based on the set number of weeks prior from the source data directly (default is two years worth of weekly data). This allows consistent MVRV-Z values on weekly and lower timeframes.
RSI OB/OS Strategy Analyzer█ OVERVIEW
The RSI OB/OS Strategy Analyzer is a comprehensive trading tool designed to help traders identify and evaluate overbought/oversold reversal opportunities using the Relative Strength Index (RSI). It provides visual signals, performance metrics, and a detailed table to analyze the effectiveness of RSI-based strategies over a user-defined lookback period.
█ KEY FEATURES
RSI Calculation
Calculates RSI with customizable period (default 14)
Plots dynamic overbought (70) and oversold (30) levels
Adds background coloring for OB/OS regions
Reversal Signals
Identifies signals based on RSI crossing OB/OS levels
Two entry strategies available:
Revert Cross: Triggers when RSI exits OB/OS zone
Cross Threshold: Triggers when RSI enters OB/OS zone
Trade Direction
Users can select a trade bias:
Long: Focuses on oversold reversals (bullish signals)
Short: Focuses on overbought reversals (bearish signals)
Performance Metrics
Calculates three key statistics for each lookback period:
Win Rate: Percentage of profitable trades
Mean Return: Average return across all trades
Median Return: Median return across all trades
Metrics calculated as percentage changes from entry price
Visual Signals
Dual-layer signal display:
BUY: Green triangles + text labels below price
SELL: Red triangles + text labels above price
Semi-transparent background highlighting in OB/OS zones
Performance Table
Interactive table showing metrics for each lookback period
Color-coded visualization:
Win Rate: Gradient from red (low) to green (high)
Returns: Green for positive, red for negative
Time Filtering
Users can define a specific time window for the indicator to analyze trades, ensuring that performance metrics are calculated only for the desired period.
Customizable Display
Adjustable table font sizes: Auto/Small/Normal/Large
Toggle option for table visibility
█ PURPOSE
The RSI OB/OS Strategy Analyzer helps traders:
Identify mean-reversion opportunities through RSI extremes
Backtest entry strategy effectiveness across multiple time horizons
Optimize trade timing through visual historical performance data
Quickly assess strategy robustness with color-coded metrics
█ IDEAL USERS
Counter-Trend Traders: Looking to capitalize on RSI extremes
Systematic Traders: Needing quantitative strategy validation
Educational Users: Studying RSI behavior in different market conditions
Multi-Timeframe Analysts: Interested in forward returns analysis
Buy Sell Cipher pro v2.5 - CryptoBoostArmamos una estrategia de compra y venta basado en el momentum del precio. Podes probarlo en estrategias del Scalping en 15min y 1hr detectando impulsos y retrocesos.
3 Down, 3 Up Strategy█ STRATEGY DESCRIPTION
The "3 Down, 3 Up Strategy" is a mean-reversion strategy designed to capitalize on short-term price reversals. It enters a long position after consecutive bearish closes and exits after consecutive bullish closes. This strategy is NOT optimized and can be used on any timeframes.
█ WHAT ARE CONSECUTIVE DOWN/UP CLOSES?
- Consecutive Down Closes: A sequence of trading bars where each close is lower than the previous close.
- Consecutive Up Closes: A sequence of trading bars where each close is higher than the previous close.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The price closes lower than the previous close for Consecutive Down Closes for Entry (default: 3) consecutive bars.
The signal occurs within the specified time window (between Start Time and End Time).
If enabled, the close price must also be above the 200-period EMA (Exponential Moving Average).
2. EXIT CONDITION
A Sell Signal is generated when the price closes higher than the previous close for Consecutive Up Closes for Exit (default: 3) consecutive bars.
█ ADDITIONAL SETTINGS
Consecutive Down Closes for Entry: Number of consecutive lower closes required to trigger a buy. Default = 3.
Consecutive Up Closes for Exit: Number of consecutive higher closes required to exit. Default = 3.
EMA Filter: Optional 200-period EMA filter to confirm long entries in bullish trends. Default = disabled.
Start Time and End Time: Restrict trading to specific dates (default: 2014-2099).
█ PERFORMANCE OVERVIEW
Designed for volatile markets with frequent short-term reversals.
Performs best when price oscillates between clear support/resistance levels.
The EMA filter improves reliability in trending markets but may reduce trade frequency.
Backtest to optimize consecutive close thresholds and EMA period for specific instruments.
intra_UpwardHere we calculate resistance levels for intraday. it calculates level on the basis of base price instead of previous range.
Low Timeframe Leverage Strategylow time frme strategy for 3m or 5 m or 15 minute please use lev maximal 40
Internal Bar Strength (IBS) Strategy█ STRATEGY DESCRIPTION
The "Internal Bar Strength (IBS) Strategy" is a mean-reversion strategy designed to identify trading opportunities based on the closing price's position within the daily price range. It enters a long position when the IBS indicates oversold conditions and exits when the IBS reaches overbought levels. This strategy was designed to be used on the daily timeframe.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
- **Low IBS (≤ 0.2)**: Indicates the close is near the bar's low, suggesting oversold conditions.
- **High IBS (≥ 0.8)**: Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The IBS value drops below the Lower Threshold (default: 0.2).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the IBS value rises to or above the Upper Threshold (default: 0.8). This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Upper Threshold: The IBS level at which the strategy exits trades. Default is 0.8.
Lower Threshold: The IBS level at which the strategy enters long positions. Default is 0.2.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for ranging markets and performs best when prices frequently revert to the mean.
It is sensitive to extreme IBS values, which help identify potential reversals.
Backtesting results should be analyzed to optimize the Upper/Lower Thresholds for specific instruments and market conditions.
Turn around Tuesday on Steroids Strategy█ STRATEGY DESCRIPTION
The "Turn around Tuesday on Steroids Strategy" is a mean-reversion strategy designed to identify potential price reversals at the start of the trading week. It enters a long position when specific conditions are met and exits when the price shows strength by exceeding the previous bar's high. This strategy is optimized for ETFs, stocks, and other instruments on the daily timeframe.
█ WHAT IS THE STARTING DAY?
The Starting Day determines the first day of the trading week for the strategy. It can be set to either Sunday or Monday, depending on the instrument being traded. For ETFs and stocks, Monday is recommended. For other instruments, Sunday is recommended.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The current day is the first day of the trading week (either Sunday or Monday, depending on the Starting Day setting).
The close price is lower than the previous day's close (`close < close `).
The previous day's close is also lower than the close two days ago (`close < close `).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
If the MA Filter is enabled, the close price must also be above the 200-period Simple Moving Average (SMA).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Starting Day: Determines the first day of the trading week. Options are Sunday or Monday. Default is Sunday.
Use MA Filter: Enables or disables the 200-period SMA filter for long entries. Default is disabled.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for markets with frequent weekly reversals.
It performs best in volatile conditions where price movements are significant at the start of the trading week.
Backtesting results should be analysed to optimize the Starting Day and MA Filter settings for specific instruments.
Ultimate Precision Buy/Sell Signals - Advanced Edition V1.01Ultimate Precision Buy/Sell Signals - Advanced Edition V1.01
Overview
This powerful TradingView indicator is designed for maximum precision in trading by utilizing a combination of EMA, RSI, ATR, ADX, Fibonacci extensions, and divergence detection to identify optimal buy and sell opportunities. The script is designed to help traders maximize profits while minimizing risk with advanced risk calculations and stop-loss mechanisms.
How to Use the Indicator
1. Buy and Sell Signals
BUY Signal (Green Label Below Candles):
RSI crosses above 30 (indicating an oversold recovery).
Price is below the EMA (indicating undervaluation).
ADX confirms a strong trend (if enabled).
📌 Action: Open a long position and set a stop-loss based on the risk level.
SELL Signal (Red Label Above Candles):
RSI crosses below 70 (indicating an overbought condition).
Price is above the EMA (indicating overextension).
ADX confirms a strong trend (if enabled).
📌 Action: Open a short position and set a stop-loss based on the risk level.
2. Risk and Profit Calculations
Risk Level is determined using ATR × Risk Multiplier.
Potential Profit is calculated as Risk Level × Risk-Reward Ratio.
These values are displayed in a floating label to help manage your trades efficiently.
📌 Tip: A higher Risk Multiplier means wider stop-losses, useful for volatile markets.
3. Trend Confirmation (ADX Filter)
If trend filtering is enabled, buy/sell signals will only appear in strong trends.
ADX must be above 25 to confirm that the market is trending.
📌 Tip: Use this to avoid false signals in ranging markets.
4. Divergence Detection
Bullish Divergence (Blue Circle Below Candles): Indicates a potential reversal upwards.
Bearish Divergence (Orange Circle Above Candles): Indicates a potential downward reversal.
📌 Tip: Divergences provide early warnings before market reversals.
5. Heatmap Visualization
Green Background: Indicates a high-confidence buy zone.
Red Background: Indicates a high-confidence sell zone.
📌 Tip: Use heatmaps to spot high-conviction trades.
6. Fibonacci-Based Take Profit (Optional)
If enabled, the script will use Fibonacci extensions instead of fixed risk-reward levels.
📌 Tip: Fibonacci-based TP works well in trending markets.
7. Alerts (No Need to Stare at the Charts!)
Set alerts for BUY and SELL signals.
TradingView will notify you when a perfect trade setup appears.
📌 Tip: Enable alerts in TradingView settings.
Socials & Live Stream Promotion 🚀
If you love this indicator and want to see it in action, check out my live trading sessions and content here:
🎥 YouTube: www.YouTube.com
🎮 Kick: www.Kick.com
🎥 Twitch: twitch.tv
👀 Follow me for more trading insights, strategies, and live action!
Funny Trading Joke to Brighten Your Day 😆
💬 Trader: "I lost my whole account today!"💬 Friend: "What happened?!"💬 Trader: "Well... I kept seeing those green candles and thought they were money-growing trees. Turns out they were just market traps!"😂😂😂
🚀 Smash that FOLLOW button if this indicator helps your trading! Let’s dominate the markets together! 📈🔥
Bollinger Bands Reversal Strategy Analyzer█ OVERVIEW
The Bollinger Bands Reversal Overlay is a versatile trading tool designed to help traders identify potential reversal opportunities using Bollinger Bands. It provides visual signals, performance metrics, and a detailed table to analyze the effectiveness of reversal-based strategies over a user-defined lookback period.
█ KEY FEATURES
Bollinger Bands Calculation
The indicator calculates the standard Bollinger Bands, consisting of:
A middle band (basis) as the Simple Moving Average (SMA) of the closing price.
An upper band as the basis plus a multiple of the standard deviation.
A lower band as the basis minus a multiple of the standard deviation.
Users can customize the length of the Bollinger Bands and the multiplier for the standard deviation.
Reversal Signals
The indicator identifies potential reversal signals based on the interaction between the price and the Bollinger Bands.
Two entry strategies are available:
Revert Cross: Waits for the price to close back above the lower band (for longs) or below the upper band (for shorts) after crossing it.
Cross Threshold: Triggers a signal as soon as the price crosses the lower band (for longs) or the upper band (for shorts).
Trade Direction
Users can select a trade bias:
Long: Focuses on bullish reversal signals.
Short: Focuses on bearish reversal signals.
Performance Metrics
The indicator calculates and displays the performance of trades over a user-defined lookback period ( barLookback ).
Metrics include:
Win Rate: The percentage of trades that were profitable.
Mean Return: The average return across all trades.
Median Return: The median return across all trades.
These metrics are calculated for each bar in the lookback period, providing insights into the strategy's performance over time.
Visual Signals
The indicator plots buy and sell signals on the chart:
Buy Signals: Displayed as green triangles below the price bars.
Sell Signals: Displayed as red triangles above the price bars.
Performance Table
A customizable table is displayed on the chart, showing the performance metrics for each bar in the lookback period.
The table includes:
Win Rate: Highlighted with gradient colors (green for high win rates, red for low win rates).
Mean Return: Colored based on profitability (green for positive returns, red for negative returns).
Median Return: Colored similarly to the mean return.
Time Filtering
Users can define a specific time window for the indicator to analyze trades, ensuring that performance metrics are calculated only for the desired period.
Customizable Display
The table's font size can be adjusted to suit the user's preference, with options for "Auto," "Small," "Normal," and "Large."
█ PURPOSE
The Bollinger Bands Reversal Overlay is designed to:
Help traders identify high-probability reversal opportunities using Bollinger Bands.
Provide actionable insights into the performance of reversal-based strategies.
Enable users to backtest and optimize their trading strategies by analyzing historical performance metrics.
█ IDEAL USERS
Swing Traders: Looking for reversal opportunities within a trend.
Mean Reversion Traders: Interested in trading price reversals to the mean.
Strategy Developers: Seeking to backtest and refine Bollinger Bands-based strategies.
Performance Analysts: Wanting to evaluate the effectiveness of reversal signals over time.
MTSDZ-R02Just for a friend .He knows how yo use it.
Just for a friend .He knows how yo use it.
Just for a friend .He knows how yo use it.
Just for a friend .He knows how yo use it.
Just for a friend .He knows how yo use it.
Squeeze Momentum BUY SELL - CryptoBoostSqueeze momentum con Cipher pro para activar ordenes de compra y de venta. Modificado para la estrategia que usamos en nuestro fondo de inversiones
AI Risk & SignalThis TradingView Pine Script is designed to combine AI-driven risk management with simple buy/sell signal generation. It provides real-time trading insights and visual indicators directly on the chart. Here’s what the script does:
Risk Level Visualization:
Calculates a risk zone using the ATR (Average True Range) indicator to assess market volatility.
Marks high-risk zones with a red background and low-risk zones with a green background, helping traders visually identify safer trading areas.
Buy/Sell Signals:
Uses Exponential Moving Averages (EMA) to generate trading signals:
A buy signal is triggered when the short-term EMA crosses above the long-term EMA.
A sell signal is triggered when the short-term EMA crosses below the long-term EMA.
Signals are displayed on the chart using arrows and labels:
Green "Buy" labels below bars for buy signals.
Red "Sell" labels above bars for sell signals.
Customizable Parameters:
Allows the user to define their risk tolerance level via an input field (Risk Level).
Higher risk levels increase the threshold for marking high/low-risk zones based on volatility.
Dynamic Risk Assessment:
Leverages ATR to dynamically calculate the risk zone boundaries, adjusting for market conditions.
Daily_DownwardCalculate retracement on basis of percentage. normally we calcaulate retracement on previous range . here we calculate support and resistance on the basis of base price.
Consecutive Bars Above/Below EMA Buy the Dip Strategy█ STRATEGY DESCRIPTION
The "Consecutive Bars Above/Below EMA Buy the Dip Strategy" is a mean-reversion strategy designed to identify potential buying opportunities when the price dips below a moving average for a specified number of consecutive bars. It enters a long position when the dip condition is met and exits when the price shows strength by exceeding the previous bar's high. This strategy is suitable for use on various timeframes.
█ WHAT IS THE MOVING AVERAGE?
The strategy uses either a Simple Moving Average (SMA) or an Exponential Moving Average (EMA) as a reference for identifying dips. The type and length of the moving average can be customized in the settings.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price is below the selected moving average for a specified number of consecutive bars (`consecutiveBarsTreshold`).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the high of the previous bar (`close > high `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Consecutive Bars Threshold: The number of consecutive bars the price must remain below the moving average to trigger a Buy Signal. Default is 3.
MA Type: The type of moving average used (SMA or EMA). Default is SMA.
MA Length: The length of the moving average. Default is 5.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for mean-reverting markets and performs best when the price frequently oscillates around the moving average.
It is sensitive to the number of consecutive bars below the moving average, which helps to identify potential dips.
Backtesting results should be analysed to optimize the Consecutive Bars Threshold, MA Type, and MA Length for specific instruments.
Gradual buy/sellAyarlar sekmesinden ilk alımı gerçekleştireceğiniz fiyatı belirleyin. İndikatör otomatik olarak ayarlarda bulunan yüzdelere göre alım ve satım emirlerinin noktalarını belirleyecek. İsterseniz etiketleri label kısmına tik atarak kapatabilirsiniz.
RSI Ultimate Optime Zones CryptoBoostIndicador modificado de RSI con zonas optimas de entrada y salida. Complemento de la estrategia de CryptoBoost Inversiones
3-Bar Low Strategy█ STRATEGY DESCRIPTION
The "3-Bar Low Strategy" is a mean-reversion strategy designed to identify potential buying opportunities when the price drops below the lowest low of the previous three bars. It enters a long position when specific conditions are met and exits when the price exceeds the highest high of the previous seven bars. This strategy is suitable for use on various timeframes.
█ WHAT IS THE 3-BAR LOW?
The 3-Bar Low is the lowest price observed over the last three bars. This level is used as a reference to identify potential oversold conditions and reversal points.
█ WHAT IS THE 7-BAR HIGH?
The 7-Bar High is the highest price observed over the last seven bars. This level is used as a reference to identify potential overbought conditions and exit points.
█ SIGNAL GENERATION
1. LONG ENTRY
A Buy Signal is triggered when:
The close price is below the lowest low of the previous three bars (`close < _lowest `).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
If the EMA Filter is enabled, the close price must also be above the 200-period Exponential Moving Average (EMA).
2. EXIT CONDITION
A Sell Signal is generated when the current closing price exceeds the highest high of the previous seven bars (`close > _highest `). This indicates that the price has shown strength, potentially confirming the reversal and prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
MA Period: The lookback period for the 200-period EMA used in the EMA Filter. Default is 200.
Use EMA Filter: Enables or disables the EMA Filter for long entries. Default is disabled.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for mean-reverting markets and performs best when the price frequently oscillates around key support and resistance levels.
It is sensitive to oversold conditions, as indicated by the 3-Bar Low, and overbought conditions, as indicated by the 7-Bar High.
Backtesting results should be analyzed to optimize the MA Period and EMA Filter settings for specific instruments.
Dblocs 4 Year BTC Cycle Guide// Indicator Description:
// The "Dblocs 4 Year BTC Cycle Guide" indicator represents a fixed recurring profit-taking cycle that begins with each Bitcoin halving event.
// Functionality Explained:
// After every halving event, there has been a fixed number of weeks following that marked the area of highest profitability for taking profit.
// • 40 Weeks (Post-Halving) = Start of the optimal profit-taking zone.
// • 80 Weeks (Post-Halving) = "Last Call" for profit-taking before the bear market.
// • 135 Weeks (Post-Halving) = Optimal area to begin Dollar-Cost Averaging.
//@version=5
indicator(title='Dblocs 4 Year BTC Cycle Guide', overlay=true)
// Function to check if it's after a halving based on months (weekly)
isAfterHalvingWeeks(y, m, d, months) =>
halvingDate = timestamp(y, m, d)
startDate = request.security(syminfo.tickerid, 'D', halvingDate + 1)
endDate = startDate + months * 30 * 24 * 60 * 60 * 300
time >= startDate and time <= endDate
// Function to check if it's after a halving based on months (monthly)
isAfterHalvingMonths(y, m, d, months) =>
halvingDate = timestamp(y, m, d)
startDate = request.security(syminfo.tickerid, 'M', halvingDate + 1)
endDate = startDate + months * 36 * 30 * 24 * 60 * 60 * 100
time >= startDate and time <= endDate
// Set the future halving date
halvingDate4th = timestamp(2024, 4, 19)
halvingdate = input(defval=true, title="Halving Date")
var WeeklyProfitSTART = input(true, title="(Weekly) Profit ")
var WeeklyProfitEND = input(true, title="(Weekly) Profit ")
var MonthlyProfitSTART = input(true, title="(Monthly) Profit ")
var MonthlyProfitEND = input(true, title="(Monthly) Profit ")
var DCAstart = input(true, title="DCA (Show)")
var ShowBackgroundColor = input(true, title="Show Background Color")
isDate(y, m, d) => timestamp(y, m, d) <= time and timestamp(y, m, d) > time
// Check if it's a daily chart
isDaily = timeframe.isdaily
// Check if it's a weekly chart
isWeekly = timeframe.isweekly
// Check if it's a monthly chart
isMonthly = timeframe.ismonthly
// Weekly Plots & Calculations
profitStartOffsetWeekly = input.int(40, title="(Weekly) START Profit ", minval=-40)
profitEndOffsetWeekly = input.int(80, title="(Weekly) END Profit ", minval=0)
DCAstartOffsetWeekly = input.int(123, title="DCA Weekly ", minval=0)
// Monthly Plots & Calculations
profitStartOffsetMonthly = input.int(10, title="(Monthly) START Profit ", minval=-100)
profitEndOffsetMonthly = input.int(18, title="(Monthly) END Profit ", minval=0)
DCAstartOffsetMonthly = input.int(27, title="DCA Monthly ", minval=0)
// Use the same input for weekly
bgcolor(ShowBackgroundColor and isWeekly and (isAfterHalvingWeeks(2012, 11, 28, 5.5) or isAfterHalvingWeeks(2016, 7, 9, 5.5) or isAfterHalvingWeeks(2020, 5, 11, 5.5) or isAfterHalvingWeeks(2024, 4, 10, 6)) ? color.rgb(0, 255, 8, 90) : na, offset=+40)
bgcolor(ShowBackgroundColor and isWeekly and (isAfterHalvingWeeks(2012, 11, 28, 5.5) or isAfterHalvingWeeks(2016, 7, 9, 5.5) or isAfterHalvingWeeks(2020, 5, 11, 5.5) or isAfterHalvingWeeks(2024, 4, 10, 6)) ? color.rgb(0, 255, 8, 85) : na, offset=+47)
bgcolor(ShowBackgroundColor and isWeekly and (isAfterHalvingWeeks(2012, 11, 28, 5.5) or isAfterHalvingWeeks(2016, 7, 9, 5.5) or isAfterHalvingWeeks(2020, 5, 11, 5.5) or isAfterHalvingWeeks(2024, 4, 10, 6)) ? color.rgb(0, 255, 8, 80) : na, offset=+54)
bgcolor(ShowBackgroundColor and isWeekly and (isAfterHalvingWeeks(2012, 11, 28, 5.5) or isAfterHalvingWeeks(2016, 7, 9, 5.5) or isAfterHalvingWeeks(2020, 5, 11, 5.5) or isAfterHalvingWeeks(2024, 4, 10, 6)) ? color.rgb(0, 255, 8, 75) : na, offset=+61)
bgcolor(ShowBackgroundColor and isWeekly and (isAfterHalvingWeeks(2012, 11, 28, 5.5) or isAfterHalvingWeeks(2016, 7, 9, 5.5) or isAfterHalvingWeeks(2020, 5, 11, 5.5) or isAfterHalvingWeeks(2024, 4, 10, 6)) ? color.rgb(0, 255, 8, 60) : na, offset=+68)
bgcolor(ShowBackgroundColor and isWeekly and (isAfterHalvingWeeks(2012, 11, 28, 3.5) or isAfterHalvingWeeks(2016, 7, 9, 3.5) or isAfterHalvingWeeks(2020, 5, 11, 3.5) or isAfterHalvingWeeks(2024, 4, 10, 4)) ? color.rgb(0, 255, 8, 55) : na, offset=+75)
// Use the same input for monthly
bgcolor(ShowBackgroundColor and isMonthly and (isAfterHalvingMonths(2012, 11, 28, 0.25) or isAfterHalvingMonths(2016, 7, 9, 0.25) or isAfterHalvingMonths(2020, 5, 11, 0.25) or isAfterHalvingMonths(2024, 4, 10, 1)) ? color.rgb(0, 255, 8, 85) : na, offset=+11)
bgcolor(ShowBackgroundColor and isMonthly and (isAfterHalvingMonths(2012, 11, 28, 0.25) or isAfterHalvingMonths(2016, 7, 9, 0.25) or isAfterHalvingMonths(2020, 5, 11, 0.25) or isAfterHalvingMonths(2024, 4, 10, 1)) ? color.rgb(0, 255, 8, 80) : na, offset=+12)
bgcolor(ShowBackgroundColor and isMonthly and (isAfterHalvingMonths(2012, 11, 28, 0.25) or isAfterHalvingMonths(2016, 7, 9, 0.25) or isAfterHalvingMonths(2020, 5, 11, 0.25) or isAfterHalvingMonths(2024, 4, 10, 1)) ? color.rgb(0, 255, 8, 75) : na, offset=+13)
bgcolor(ShowBackgroundColor and isMonthly and (isAfterHalvingMonths(2012, 11, 28, 0.25) or isAfterHalvingMonths(2016, 7, 9, 0.25) or isAfterHalvingMonths(2020, 5, 11, 0.25) or isAfterHalvingMonths(2024, 4, 10, 1)) ? color.rgb(0, 255, 8, 65) : na, offset=+14)
bgcolor(ShowBackgroundColor and isMonthly and (isAfterHalvingMonths(2012, 11, 28, 0.25) or isAfterHalvingMonths(2016, 7, 9, 0.25) or isAfterHalvingMonths(2020, 5, 11, 0.25) or isAfterHalvingMonths(2024, 4, 10, 1)) ? color.rgb(0, 255, 8, 55) : na, offset=+15)
bgcolor(ShowBackgroundColor and isMonthly and (isAfterHalvingMonths(2012, 11, 28, 0.25) or isAfterHalvingMonths(2016, 7, 9, 0.25) or isAfterHalvingMonths(2020, 5, 11, 0.25) or isAfterHalvingMonths(2024, 4, 10, 1)) ? color.rgb(0, 255, 8, 45) : na, offset=+16)
bgcolor(ShowBackgroundColor and isMonthly and (isAfterHalvingMonths(2012, 11, 28, 0.25) or isAfterHalvingMonths(2016, 7, 9, 0.25) or isAfterHalvingMonths(2020, 5, 11, 0.25) or isAfterHalvingMonths(2024, 4, 10, 1)) ? color.rgb(0, 255, 8, 40) : na, offset=+17)
// Define a variable for label x-coordinate
labelX = isDaily ? bar_index + 280 : bar_index + 0
// Draw Halving function for daily
drawHalving(y, m, d, align, align2) =>
line.new(bar_index, low, bar_index, high, xloc.bar_index, extend.both, color=color.rgb(255, 123, 0), style=line.style_dashed, width=3)
if (halvingdate)
label.new(bar_index, high, text='⛏ Halving ' + str.tostring(m) + '/' + str.tostring(d) + '/' + str.tostring(y) + ' 🟠', style=label.style_label_lower_right, textcolor=color.rgb(0, 0, 0), color=color.rgb(255, 136, 0, 5), textalign=text.align_center, yloc=yloc.abovebar, size=size.normal)
if isWeekly
label.new(WeeklyProfitSTART ? labelX + profitStartOffsetWeekly : na, na, text='Profit START 🟢 ⛏ 40ʷ ᵃᵍᵒ', style=label.style_label_lower_right, textcolor=color.rgb(0, 0, 0), color=color.rgb(17, 255, 0), textalign=text.align_center, yloc=yloc.abovebar, size=size.normal)
label.new(WeeklyProfitEND ? labelX + profitEndOffsetWeekly : na, na, text='Profit END 🔴 ⛏ 80ʷ ᵃᵍᵒ', style=label.style_label_lower_left, textcolor=color.rgb(0, 0, 0), color=color.rgb(255, 0, 0), textalign=text.align_center, yloc=yloc.abovebar, size=size.normal)
label.new(DCAstart ? labelX + DCAstartOffsetWeekly : na, na, text='→ DCA 🟡 ⛏ 135ʷ ᵃᵍᵒ', style=label.style_label_up, textcolor=color.rgb(0, 0, 0), color=color.rgb(226, 246, 0, 25), textalign=text.align_center, yloc=yloc.belowbar, size=size.normal)
line.new(WeeklyProfitSTART ? labelX + profitStartOffsetWeekly : na, low, WeeklyProfitSTART ? labelX + profitStartOffsetWeekly : na, high, xloc.bar_index, extend.both, color=color.rgb(0, 255, 8), style=line.style_dotted, width=2)
line.new(WeeklyProfitEND ? labelX + profitEndOffsetWeekly : na, low, WeeklyProfitEND ? labelX + profitEndOffsetWeekly : na, high, xloc.bar_index, extend.both, color=color.rgb(255, 0, 0), style=line.style_dotted, width=2)
label.new(WeeklyProfitSTART ? labelX + profitStartOffsetWeekly : na, high, style=label.style_cross, yloc=yloc.abovebar, color=color.rgb(40, 255, 0), size=size.small)
label.new(WeeklyProfitEND ? labelX + profitEndOffsetWeekly : na, high, style=label.style_cross, yloc=yloc.abovebar, color=color.rgb(40, 255, 0), size=size.small)
label.new(DCAstart ? labelX + DCAstartOffsetWeekly + 0 : na, high, style=label.style_circle, yloc=yloc.belowbar, color=color.rgb(251, 226, 0), size=size.tiny)
label.new(DCAstart ? labelX + DCAstartOffsetWeekly + 12 : na, high, style=label.style_circle, yloc=yloc.belowbar, color=color.rgb(203, 249, 0, 35), size=size.tiny)
label.new(DCAstart ? labelX + DCAstartOffsetWeekly + 24 : na, high, style=label.style_circle, yloc=yloc.belowbar, color=color.rgb(170, 255, 59, 46), size=size.tiny)
label.new(DCAstart ? labelX + DCAstartOffsetWeekly + 36 : na, high, style=label.style_circle, yloc=yloc.belowbar, color=color.rgb(115, 255, 0, 58), size=size.tiny)
label.new(DCAstart ? labelX + DCAstartOffsetWeekly + 48 : na, high, style=label.style_circle, yloc=yloc.belowbar, color=color.rgb(38, 255, 0, 58), size=size.tiny)
if isMonthly
label.new(MonthlyProfitSTART ? labelX + profitStartOffsetMonthly : na, na, text='Profit START 🟢 ⛏ 40ʷ ᵃᵍᵒ', style=label.style_label_lower_right, textcolor=color.rgb(0, 0, 0), color=color.rgb(17, 255, 0), textalign=text.align_center, yloc=yloc.abovebar, size=size.normal)
label.new(MonthlyProfitEND ? labelX + profitEndOffsetMonthly : na, na, text='Profit END 🔴 ⛏ 80ʷ ᵃᵍᵒ', style=label.style_label_lower_left, textcolor=color.rgb(0, 0, 0), color=color.rgb(255, 0, 0), textalign=text.align_center, yloc=yloc.abovebar, size=size.normal)
... (35 lines left)