PROTECTED SOURCE SCRIPT
Atualizado LDO Virgin Levels from Candle Patterns (Multi-Timeframe)

User Guide: LDO Virgin Levels from Candle Patterns (Multi-Timeframe)
Overview
The "LDO Virgin Levels from Candle Patterns (Multi-Timeframe)" script is a TradingView indicator that identifies and plots "virgin levels" across multiple timeframes (15-minute, 4-hour, daily, weekly, and monthly). Virgin levels are price levels drawn at key reversal points based on candlestick patterns—specifically, the high or low of a candle preceding a bullish-to-bearish or bearish-to-bullish transition. These levels remain active ("virgin") until the price crosses them, at which point they are removed, and an alert can be triggered.
Key Features
Multi-Timeframe Support: Plots virgin levels on 15-minute, 4-hour, daily, weekly, and monthly timeframes.
Customizable Display: Enable/disable specific timeframes and customize line colors and width.
Alerts: Triggers alerts when the price crosses a virgin level on any enabled timeframe.
Version Tracking: Displays the script version on the chart for easy reference (current version: 1.1.0).
How It Works
Level Detection:
On each timeframe, the script detects candlestick pattern reversals:
Bullish-to-bearish: A bullish candle (close > open) followed by a bearish candle (close < open). A level is drawn at the high of the previous (bullish) candle.
Bearish-to-bullish: A bearish candle followed by a bullish candle. A level is drawn at the low of the previous (bearish) candle.
Levels are drawn as horizontal lines extending to the right, with a label showing the price.
Virgin Status:
A level remains "virgin" until the price closes across it on a new bar for that timeframe (e.g., a new 15-minute bar for 15m levels).
Once crossed, the level is removed from the chart.
Alerting:
When a virgin level is crossed, an alert is triggered for the corresponding timeframe (if enabled).
Setup Instructions
Add the Script to TradingView:
Open TradingView and go to the Pine Editor (bottom panel).
Copy and paste the script code into the editor.
Click "Add to Chart" to apply it to your active chart.
Configure Settings:
Timeframe Selection:
Toggle which timeframes to display levels for (default: all enabled):
Show Daily Levels
Show 4H Levels
Show 15M Levels
Show Weekly Levels
Show Monthly Levels
Disabling a timeframe clears its levels from the chart.
Line Settings:
Adjust the line width (default: 1).
Customize colors for each timeframe (default colors):
Daily: White
4H: Yellow
15M: Green
Weekly: Blue
Monthly: Red
Max Lines: Set the maximum number of lines to draw (default: 500, TradingView’s limit).
Verify Version:
The script version (e.g., "Version: 1.1.0") is displayed at the top of the chart for reference.
Using the Alerting Feature
The script includes the ability to set alerts when virgin levels are crossed, with separate alerts for each timeframe. Here’s how to set them up:
Enable Desired Timeframes:
Ensure the timeframe(s) you want alerts for are enabled in the settings (e.g., "Show 15M Levels").
Create an Alert:
Right-click on the chart and select "Create Alert" (or use the bell icon in TradingView).
In the alert dialog:
Condition: Select the script ("LDO Virgin Levels from Candle Patterns (Multi-Timeframe)").
Condition Dropdown: Choose the specific alert condition for the timeframe you want to monitor:
"15m Virgin Line Crossed"
"4h Virgin Line Crossed"
"Daily Virgin Line Crossed"
"Weekly Virgin Line Crossed"
"Monthly Virgin Line Crossed"
Message: The default message (e.g., "A virgin line on the 15m timeframe has been crossed.") will be sent, but you can customize it if needed.
Notifications: Choose your preferred notification method (e.g., email, SMS, popup, webhook).
Frequency: Set to "Once Per Bar Close" to avoid multiple triggers within the same bar.
Click "Create" to activate the alert.
Repeat for Other Timeframes:
You can create separate alerts for each timeframe by repeating the process and selecting the appropriate condition.
Behavior:
Alerts trigger when the price closes across a virgin level on a new bar for that timeframe (e.g., a new 15-minute bar for 15m levels).
If multiple levels are crossed on the same bar, only one alert per timeframe will fire.
Example Use Case
Scenario: You’re trading SUIUSDT on a 15-minute chart and want alerts for 15-minute and 4-hour virgin level crossings.
Setup:
Enable "Show 15M Levels" and "Show 4H Levels" in the script settings.
Create two alerts:
One with the condition "15m Virgin Line Crossed".
Another with the condition "4h Virgin Line Crossed".
Configure notifications (e.g., email or popup).
Result: When the price crosses a 15m virgin level (e.g., at 3.3901 USD), you’ll receive an alert. Similarly, a 4h level crossing will trigger its own alert.
Notes
Chart Timeframe: The script works on any chart timeframe because it uses request.security to fetch data for higher timeframes (e.g., 15m levels will work even on a 1m chart).
Line Limit: The script caps at 500 lines total (TradingView’s limit). Older levels may be overwritten if this limit is reached.
Version Updates: Check the version number on the chart and the changelog in the script comments for updates.
Troubleshooting
No Levels Visible: Ensure the desired timeframes are enabled and that price action has triggered reversal patterns.
Alerts Not Firing: Verify that alerts are set to "Once Per Bar Close" and that the timeframe is enabled in the script settings.
Too Many Lines: Adjust the "Max number of lines to draw" setting if levels are being overwritten.
This script provides a powerful tool for traders to identify key reversal levels across multiple timeframes, with the added benefit of customizable alerts to stay informed of significant price movements.
Overview
The "LDO Virgin Levels from Candle Patterns (Multi-Timeframe)" script is a TradingView indicator that identifies and plots "virgin levels" across multiple timeframes (15-minute, 4-hour, daily, weekly, and monthly). Virgin levels are price levels drawn at key reversal points based on candlestick patterns—specifically, the high or low of a candle preceding a bullish-to-bearish or bearish-to-bullish transition. These levels remain active ("virgin") until the price crosses them, at which point they are removed, and an alert can be triggered.
Key Features
Multi-Timeframe Support: Plots virgin levels on 15-minute, 4-hour, daily, weekly, and monthly timeframes.
Customizable Display: Enable/disable specific timeframes and customize line colors and width.
Alerts: Triggers alerts when the price crosses a virgin level on any enabled timeframe.
Version Tracking: Displays the script version on the chart for easy reference (current version: 1.1.0).
How It Works
Level Detection:
On each timeframe, the script detects candlestick pattern reversals:
Bullish-to-bearish: A bullish candle (close > open) followed by a bearish candle (close < open). A level is drawn at the high of the previous (bullish) candle.
Bearish-to-bullish: A bearish candle followed by a bullish candle. A level is drawn at the low of the previous (bearish) candle.
Levels are drawn as horizontal lines extending to the right, with a label showing the price.
Virgin Status:
A level remains "virgin" until the price closes across it on a new bar for that timeframe (e.g., a new 15-minute bar for 15m levels).
Once crossed, the level is removed from the chart.
Alerting:
When a virgin level is crossed, an alert is triggered for the corresponding timeframe (if enabled).
Setup Instructions
Add the Script to TradingView:
Open TradingView and go to the Pine Editor (bottom panel).
Copy and paste the script code into the editor.
Click "Add to Chart" to apply it to your active chart.
Configure Settings:
Timeframe Selection:
Toggle which timeframes to display levels for (default: all enabled):
Show Daily Levels
Show 4H Levels
Show 15M Levels
Show Weekly Levels
Show Monthly Levels
Disabling a timeframe clears its levels from the chart.
Line Settings:
Adjust the line width (default: 1).
Customize colors for each timeframe (default colors):
Daily: White
4H: Yellow
15M: Green
Weekly: Blue
Monthly: Red
Max Lines: Set the maximum number of lines to draw (default: 500, TradingView’s limit).
Verify Version:
The script version (e.g., "Version: 1.1.0") is displayed at the top of the chart for reference.
Using the Alerting Feature
The script includes the ability to set alerts when virgin levels are crossed, with separate alerts for each timeframe. Here’s how to set them up:
Enable Desired Timeframes:
Ensure the timeframe(s) you want alerts for are enabled in the settings (e.g., "Show 15M Levels").
Create an Alert:
Right-click on the chart and select "Create Alert" (or use the bell icon in TradingView).
In the alert dialog:
Condition: Select the script ("LDO Virgin Levels from Candle Patterns (Multi-Timeframe)").
Condition Dropdown: Choose the specific alert condition for the timeframe you want to monitor:
"15m Virgin Line Crossed"
"4h Virgin Line Crossed"
"Daily Virgin Line Crossed"
"Weekly Virgin Line Crossed"
"Monthly Virgin Line Crossed"
Message: The default message (e.g., "A virgin line on the 15m timeframe has been crossed.") will be sent, but you can customize it if needed.
Notifications: Choose your preferred notification method (e.g., email, SMS, popup, webhook).
Frequency: Set to "Once Per Bar Close" to avoid multiple triggers within the same bar.
Click "Create" to activate the alert.
Repeat for Other Timeframes:
You can create separate alerts for each timeframe by repeating the process and selecting the appropriate condition.
Behavior:
Alerts trigger when the price closes across a virgin level on a new bar for that timeframe (e.g., a new 15-minute bar for 15m levels).
If multiple levels are crossed on the same bar, only one alert per timeframe will fire.
Example Use Case
Scenario: You’re trading SUIUSDT on a 15-minute chart and want alerts for 15-minute and 4-hour virgin level crossings.
Setup:
Enable "Show 15M Levels" and "Show 4H Levels" in the script settings.
Create two alerts:
One with the condition "15m Virgin Line Crossed".
Another with the condition "4h Virgin Line Crossed".
Configure notifications (e.g., email or popup).
Result: When the price crosses a 15m virgin level (e.g., at 3.3901 USD), you’ll receive an alert. Similarly, a 4h level crossing will trigger its own alert.
Notes
Chart Timeframe: The script works on any chart timeframe because it uses request.security to fetch data for higher timeframes (e.g., 15m levels will work even on a 1m chart).
Line Limit: The script caps at 500 lines total (TradingView’s limit). Older levels may be overwritten if this limit is reached.
Version Updates: Check the version number on the chart and the changelog in the script comments for updates.
Troubleshooting
No Levels Visible: Ensure the desired timeframes are enabled and that price action has triggered reversal patterns.
Alerts Not Firing: Verify that alerts are set to "Once Per Bar Close" and that the timeframe is enabled in the script settings.
Too Many Lines: Adjust the "Max number of lines to draw" setting if levels are being overwritten.
This script provides a powerful tool for traders to identify key reversal levels across multiple timeframes, with the added benefit of customizable alerts to stay informed of significant price movements.
Notas de Lançamento
Added vector candlesNotas de Lançamento
Quick Guide: Using Vector Candle Zones and Virgin Lines for Trading ConfluenceOverview
The "LDO Virgin Levels from Candle Patterns (Multi-Timeframe) v2" indicator is a powerful tool for traders, combining Vector Candle Zones (VCZs) and Virgin Lines to identify key levels on the chart. When used together, these features can help pinpoint potential liquidity zones and high-probability trade setups, enhanced by customizable alerts and flexible timeframe settings.
1. Importance of Vector Candle Zones as Potential Liquidity Zones
What are Vector Candle Zones (VCZs)?
VCZs are areas on the chart identified by the indicator based on PVSRA (Price, Volume, Spread, Range Analysis) principles. They highlight zones where significant market activity (e.g., high volume, large candles) has occurred, often indicating areas where liquidity is concentrated.
Why are VCZs Potential Liquidity Zones?
Liquidity zones are price levels where large orders (stop-losses, take-profits, or pending orders) are likely placed by market participants. VCZs often mark these areas because they are derived from candles with high volume or significant price action, which attract institutional traders and market makers. These zones can act as magnets for price, as the market may revisit them to "hunt" for liquidity before reversing or continuing a trend.
Trading Implication:
VCZs can serve as key areas to watch for price reactions. For example, if price approaches a VCZ, it might reverse due to stop-loss triggers or continue through the zone if liquidity is absorbed, making these zones critical for entry, exit, or risk management decisions.
2. Using VCZs in Confluence with Virgin Lines
What are Virgin Lines?
Virgin Lines are untouched price levels drawn on the chart based on candle patterns (e.g., bullish-to-bearish or bearish-to-bullish reversals) across multiple timeframes (Daily, 4H, 15M, 1H, Weekly, Monthly). These lines represent potential support or resistance levels that have not yet been tested by price.
Confluence with VCZs:
When a Virgin Line on your desired timeframe (e.g., Daily or Weekly) aligns closely with a VCZ, it creates a high-probability trading zone. This confluence suggests that the area has both structural significance (from the Virgin Line) and liquidity potential (from the VCZ), increasing the likelihood of a strong price reaction. For example:
A Daily Virgin Line at 0.2434 overlapping with a VCZ might indicate a strong resistance zone where price could reverse.
If price breaks through this confluence, it might signal a strong trend continuation as liquidity is absorbed.
Trading Strategy:
Entry Points: Look for price action signals (e.g., candlestick patterns, rejection wicks) at the confluence of a Virgin Line and VCZ.
Confirmation: Use VCZs to confirm the strength of a Virgin Line. A VCZ overlapping a Virgin Line suggests higher liquidity, making the level more significant.
Risk Management: Place stop-losses just beyond the confluence zone to account for potential liquidity sweeps by the market.
3. Alerts for Timely Trading Decisions
Alert Functionality:
The indicator includes alert conditions for each timeframe (15M, 1H, 4H, Daily, Weekly, Monthly). An alert triggers when price touches a Virgin Line, notifying you of a potential trading opportunity.
Example Alert: "Daily Virgin Line Touched" triggers when price interacts with a Daily Virgin Line, allowing you to check if it aligns with a VCZ for confluence.
How to Set Alerts:
Right-click on the chart and select "Add Alert."
Choose the condition (e.g., "Daily Virgin Line Touched").
Set your preferred notification method (e.g., email, pop-up, or webhook).
When the alert triggers, check the chart to see if the touched Virgin Line aligns with a VCZ for a high-probability setup.
Trading Implication:
Alerts ensure you don’t miss key levels, especially when monitoring multiple timeframes. They are particularly useful for confirming confluence setups in real-time, allowing you to act quickly on potential trades.
4. Adding or Removing Timeframe Virgin Lines
Flexibility in Timeframe Selection:
The indicator allows you to customize which timeframe Virgin Lines are displayed, giving you control over the levels you want to focus on.
Default Settings (v1.3.16):
Daily, Weekly, and Monthly Virgin Lines are enabled by default.
4H, 15M, and 1H Virgin Lines are disabled by default to reduce chart clutter.
How to Add or Remove Timeframes:
Right-click the indicator title ("LDO Multi-TF Virgin Levels v2") on the chart and select "Settings."
Navigate to the "Timeframe Selection" section.
Check or uncheck the boxes for the desired timeframes:
To add 4H levels, check "Show 4H Levels."
To remove Weekly levels, uncheck "Show Weekly Levels."
Click "OK" to apply the changes.
Trading Implication:
Adding Timeframes: Enable shorter timeframes like 4H or 1H to identify more granular levels for intraday trading, especially if they align with VCZs.
Removing Timeframes: Disable timeframes that are not relevant to your strategy to declutter the chart and focus on key levels (e.g., focus only on Daily and Weekly Virgin Lines for swing trading).
5. Practical Example
Scenario: You're trading AIXBT/TetherUS on a 2H chart.
A Daily Virgin Line is at 0.2434, and a VCZ is nearby at a similar price level.
You set an alert for "Daily Virgin Line Touched."
When the alert triggers, you check the chart and see price rejecting at 0.2434 with a bearish candlestick pattern, confirming the confluence with the VCZ.
You enter a short trade with a stop-loss above the VCZ, targeting the next Virgin Line lower on the chart.
6. Tips for Effective Use
Adjust VCZ Visibility: If VCZs are not visible, go to the "Vector Candle Zones Settings" and reduce the "Zone Transparency" (default is 90) to make them more prominent for confluence analysis.
Prioritize Higher Timeframes: Daily, Weekly, and Monthly Virgin Lines often have more significance when combined with VCZs, as they represent stronger structural levels.
Combine with Other Analysis: Use additional tools (e.g., trendlines, volume profile) alongside VCZs and Virgin Lines to further confirm setups.
Conclusion
By using Vector Candle Zones as potential liquidity zones in confluence with Virgin Lines, traders can identify high-probability setups with greater confidence. The indicator’s alert system ensures timely notifications, while the ability to add or remove timeframe Virgin Lines provides flexibility to tailor the tool to your trading style. Combine these features with proper risk management to enhance your trading strategy.
Notas de Lançamento
Summary of the Indicator: LDO Virgin Levels from Candle Patterns (Multi-Timeframe) v2Indicator Overview:
This Pine Script v5 indicator, titled "LDO Virgin Levels from Candle Patterns (Multi-Timeframe) v2," plots horizontal "virgin" levels on a chart based on candle patterns across multiple timeframes (Daily, 4H, 15M, 1H, Weekly, Monthly). These levels are drawn at the close price of candles where bullish-to-bearish or bearish-to-bullish reversals occur, and they are removed when touched by the price range of a subsequent candle. The indicator also includes an optional Vector Candle Zones feature, adapted from the Traders Reality library, which highlights high-volume candle zones. It supports customizable line styles, colors, and label positions, with alerts for when levels are touched.
Key Features:
Virgin Levels: Plots lines at reversal points (bullish-to-bearish or bearish-to-bullish) on selected timeframes, removed when price touches them.
Multi-Timeframe Support: Analyzes Daily, 4H, 15M, 1H, Weekly, and Monthly timeframes.
Vector Candle Zones: Optionally displays zones based on high-volume candles using PVSRA (Price, Volume, Spread, Range Analysis).
Customizable Display: Users can adjust line styles (Solid, Dashed, Dotted), colors, widths, and label positions (with a configurable right offset).
Alerts: Triggers alerts when a virgin line is touched on any enabled timeframe.
Label Styling: Labels show price and timeframe (e.g., "1.2345 [Daily]") with text color matching the line color and a user-defined right offset.
Enable/Disable Options (via Input Settings):
General Settings:
Show Vector Candle Zones (show_vector_zones, default: enabled):
Enable: Displays high-volume candle zones using PVSRA logic.
Disable: Hides Vector Candle Zones and clears associated boxes.
Set PVSRA Candle Colors (setcandlecolors, default: disabled):
Enable: Applies PVSRA-based coloring to chart candles (e.g., red, green, violet, blue for high-volume candles).
Disable: Uses default chart candle colors.
Label X Offset (label_x_offset, default: 5 bars):
Adjusts how far right labels are positioned (0 = current bar, higher values move further right).
Timeframe Selection:
Show Daily Levels (show_daily, default: enabled):
Enable: Plots virgin levels based on Daily candle patterns.
Disable: Removes Daily levels and clears associated arrays.
Show 4H Levels (show_4h, default: disabled):
Enable: Plots virgin levels based on 4-hour candle patterns.
Disable: Removes 4H levels and clears associated arrays.
Show 15M Levels (show_15m, default: disabled):
Enable: Plots virgin levels based on 15-minute candle patterns.
Disable: Removes 15M levels and clears associated arrays.
Show 1H Levels (show_1h, default: disabled):
Enable: Plots virgin levels based on 1-hour candle patterns.
Disable: Removes 1H levels and clears associated arrays.
Show Weekly Levels (show_weekly, default: enabled):
Enable: Plots virgin levels based on Weekly candle patterns.
Disable: Removes Weekly levels and clears associated arrays.
Show Monthly Levels (show_monthly, default: enabled):
Enable: Plots virgin levels based on Monthly candle patterns.
Disable: Removes Monthly levels and clears associated arrays.
Line Settings (Customizable but not enable/disable):
Line Width (line_width, default: 1): Adjusts thickness of all virgin lines.
Line Style per Timeframe (e.g., daily_line_style, options: Solid, Dashed, Dotted): Sets line style for each timeframe.
Line Color per Timeframe (e.g., daily_color, default: white with 40% transparency): Sets line and label text color for each timeframe.
Vector Candle Zones Settings (Active when show_vector_zones is enabled):
Override Chart Symbol (overrideSym, default: disabled): Uses a custom symbol (e.g., INDEX:BTCUSD) for PVSRA calculations instead of the chart’s symbol.
Override Color (colorOverride, default: disabled): Uses a single zone color instead of PVSRA-based colors.
Zone Type (zoneType, options: Body only, Body with wicks): Defines whether zones are based on candle bodies or include wicks.
Zone Update Type (zoneUpdateType, options: Body only, Body with wicks): Determines how zones are cleared.
Zone Border Width (borderWidth, default: 0): Sets border thickness for zones.
Zone Transparency (transparency, default: 90): Adjusts transparency of zones.
Script protegido
Esse script é publicada como código fechado. No entanto, você pode usar ele livremente e sem nenhuma limitação – saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script protegido
Esse script é publicada como código fechado. No entanto, você pode usar ele livremente e sem nenhuma limitação – saiba mais aqui.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.