MeanRevert Matrix [StabTrading]MeanRevert Matrix is a sophisticated trading tool designed to detect when prices significantly deviate from their historical averages, signalling potential market trends and reversals.
Leveraging complex algorithms that incorporate human emotions and mean reversion theory, this indicator is the first stage in a comprehensive system for identifying market entry points. Its versatility allows it to be applied across all charts and timeframes, providing traders with clear visual cues for trend analysis and decision-making.
This indicator is purposefully straightforward, allowing traders to observe how the different algorithms work in confluence. The MeanRevert Matrix can be customized to fit individual trading styles, particularly in terms of aggressiveness, making it adaptable to various market conditions. Working in tandem with the FloWave Oscillator, it offers an additional layer of confluence, ensuring that trading signals are more reliable.
💡 Features
Reversal Zones - These zones are integral to the MeanRevert Matrix, highlighting areas where trader emotions and money flow suggest potential longer-term reversals. The lighter shaded zones indicate early-stage reversals, while darker shades signal stronger reversal potential. This feature is designed to help traders anticipate market shifts and prepare for them accordingly.
Localized Mean Reversion Signals - These signals are triggered when the price deviates significantly from the mean, unaffected by longer-term price movements. This localized algorithm helps traders focus on short-term market fluctuations without being influenced by broader trends.
Yellow Signals - These signals identify isolated overbought or oversold conditions. While they often indicate reversal points, they can also signal the beginning of accelerated buying or selling, giving traders early warning of potential market shifts.
Trading Style Customization - The MeanRevert Matrix allows traders to tailor their strategy by adjusting the indicator’s aggressiveness. A more aggressive setting will produce more frequent reversal signals, offering flexibility based on the trader’s risk tolerance and market outlook.
Noise Eliminator - This feature helps traders filter out market noise or manipulation by increasing the noise value. By removing unwanted or misleading signals, it ensures that traders are acting on the most reliable data.
📈 Implementing the System
Step 1 - Begin by observing the localized blue trend to identify reversal points below the mean. Green or red signals within this trend indicate that the price remains within the current market parameters, suggesting that a reversal may occur more quickly. Yellow signals, however, indicate that the trend is likely to continue, so it’s advisable to wait for clearer reversal zones to develop. To avoid misleading signals, consider using higher noise values.
Step 2 - Wait for the reversal zone algorithm to indicate a potential market reversal by showing either light or dark red/green colour. A lighter zone suggests that the overall trend is beginning to reverse, while a darker zone indicates a higher likelihood of reversal.
Step 3 - Once a reversal zone is identified, monitor the trend line for signals that the price is moving significantly away from the mean. This indicates a strong localized price movement that is poised for a reversal. At this stage, you can reduce the noise value and increase the aggressiveness of the trading style to capture more reversal signals.
🛠️ Usage/Practice
In the example above, the indicator is set with neutral aggression for buy signals and lower aggression for sell signals, reflecting the current bull market cycle
Red Reversal Zone - A bearish reversal zone emerges, followed by a darker bearish zone, indicating an increased probability of a trend reversal. The red signals show price reversion from the localized mean, but the absence of yellow signals suggests the reversion isn't abnormally aggressive, making this a good area to consider a short position.
Strong Reversal Opportunity - Similar to point 1, but this time a green signal appears within the bullish dark green zone, highlighting a strong reversal potential. Subsequent red signals suggest opportunities to take profits as the trend faces resistance.
Opportunity to Strengthen Long Position - Once again, the indicator shows a bullish reversal zone without yellow signals. This suggests an area of increased resistance at this price point, offering traders another chance to increase their long positions before the market enters the long bull cycle.
Excessive Buying Pressure - The price has deviated significantly from the mean, triggering a yellow signal. This indicates excessive buying pressure, suggesting the trend is likely to continue upward. Although not an immediate bearish area, the red sell signals suggest it could be a time to conservatively take partial profits.
Trend Weakening - As the trend slows down, bearish zones appear, indicating potential reversal points. As the market shows signs of losing upward momentum, this suggests an opportunity to reduce their long exposure or enter a short trade and take advantage of the correction in the bull cycle.
Potential for Additional Long Position - Despite the earlier sell signals, the overall uptrend remains strong. This presents an opportunity either to add to the long position or to take profits from a previous sell position. The strength of the upward trend suggests that the market may continue higher.
Abnormal Upward Momentum - Similar to points 4 and 5, the yellow signals indicate abnormal price action with aggressive upward momentum. As the trend corrects to a normal range, the price hitting a resistance level is confirmed by the appearance of red reversal zones, suggesting a potential pullback.
Sideways Market Signals - In a sideways market, the indicator shows signals that remain within the normal mean reversion range. These signals are not abnormal and suggest potential entry points for trades within a sideways market, indicating periods where the market lacks strong directional momentum.
🔶 Conclusion
With its seamless integration into various charts and timeframes, the MeanRevert Matrix stands as a reliable and adaptable tool, essential for navigating the complexities of modern markets. By following the implementation guidelines and leveraging its features, traders have the potential to effectively anticipate market movements and optimize their entry and exit points.
We developed this indicator to help traders enhance their understanding of market trends and achieve their trading objectives with greater precision.
Циклический анализ
FloWave Oscillator [StabTrading]The FloWave Oscillator is a powerful trading tool designed to identify market trends and reversals by analysing reversal zones based on momentum and fear algorithms.
Serving as the first stage in a comprehensive trading system, it is intentionally straightforward, allowing traders to clearly see potential entry points across all charts and timeframes.
By inputting their own market sentiment, traders can customize the algorithm to align with their trading style. This flexibility helps traders navigate complex market environments with greater precision, whether they are seeking to capitalize on short-term opportunities or ride longer-term trends.
💡 Features
Reversal Zones - The FloWave Oscillator identifies key reversal zones driven by momentum and fear dynamics. Lighter green zones signal the initial stages of a potential reversal, while darker green zones indicate that a trend flip is imminent.
Trading Style Customization - The indicator allows traders to adjust their trading style with sensitivity settings ranging from Very Aggressive to Very Conservative. This flexibility lets traders tailor the indicator to their preferred time horizon—whether they seek to scalp short-term opportunities or capture long-term reversals.
🔥 Sensitivity Settings
Very Aggressive/Aggressive - These settings increase the indicator's sensitivity, generating more frequent signals, ideal for traders focused on short-term gains or those navigating choppy markets.
Neutral - Offers a balanced approach, combining both aggressive and conservative elements. It's a starting point for traders to evaluate performance before adjusting to more specific styles.
Conservative/Very Conservative - These settings reduce signal frequency, focusing on stronger, more reliable reversals. Best suited for long-term traders aiming to minimize risk and avoid premature market entries or exits.
🛠️ Usage/Practice
In the above example we’ll analysis how the indicator accurately predicts both the tops and bottoms of a market cycle.
Top of the Bull Market - The trendline initially shows two light red reversal zones, signalling a potential weakening in the upward momentum. As the trend progresses, a dark red zone emerges, confirming that a more substantial trend reversal to the downside is likely. This sequence provides an early warning, allowing traders to prepare for a possible market shift.
First Bull Signal - In the following phase, the indicator mirrors the previous action but in the opposite direction, identifying a reversal towards the upside. This behaviour demonstrates the indicator's ability to adapt to changing market conditions.
Bottom of the Bear Market - As the market continues its downward trajectory, the indicator presents two dark green reversal zones, highlighting areas where the selling pressure may be easing. These dark green zones offer three distinct opportunities to dollar-cost average (DCA) into the asset, allowing traders to build or enhance their positions during the end of the bear cycle. The indicator’s sensitivity in this phase ensures that traders can navigate the bearish market with confidence.
Continuation of Bull Cycle - In this segment, the indicator does not display any dark green reversal zones, implying that the uptrend remains robust. The absence of these zones suggests that the upward momentum is likely to continue, providing traders with another opportunity to add to their long positions. This scenario underscores the indicator’s capacity to identify when a trend is strong enough to warrant additional investment.
Potential Correction in an Uptrend - A light red zone appears, signalling a possible correction within the ongoing uptrend. However, the absence of a dark red zone indicates that the correction may be minor and that the overall trend is still upward. Traders might view this as a conservative point to take some profits off the table, managing risk while staying aligned with the broader bull market.
Bearish Signal - Eventually, a dark red reversal zone emerges, indicating that the trend has lost its upward momentum. This signal serves as a strong indicator that the uptrend may be concluding, prompting traders to consider exiting their positions or taking a more defensive stance. As the market enters a sideways phase, the trader can switch to a more aggressive trading style, seeking opportunities to scalp within the range while navigating the flat market conditions.
In this example, we demonstrate how to identify scalp trading opportunities by combining the Very Conservative and Very Aggressive settings. The key strategy is to use the Very Conservative trend to confirm the validity of reversal zones identified by the Very Aggressive setting.
The VC trend doesn’t indicate a buy reversal zone, but it shows an upward divergence. This suggests that the reversal buy zone on the VA chart is a potential entry point due to the supportive VC trend.
Multiple sell zones appear on the VA chart, but the VC trend shows a strong and steady uptrend. This suggests that we should wait for confirmation from the VC trend before considering a sell position, as the market is still moving upward strongly.
The VA chart shows several buy zones, but the VC trend indicates a strong downtrend, and no buy zone appears on the conservative setting. This suggests waiting for the next VA buy zone, confirmed by an upward divergence on the VC trend, before entering a trade.
Similar to Point 3 but in the opposite direction, the VA chart shows sell zones, but the VC trend indicates caution. The strategy would be to wait for confirmation from the VC trend before making a move.
🔶Conclusion
When used in conjunction with other indicators like the MeanRevert Matrix, the FloWave Oscillator becomes an integral part of a comprehensive trading system. It helps traders make informed decisions by providing clear signals that are aligned with the current market sentiment and broader economic trends. By following the implementation guidelines and adjusting the indicator settings as market conditions change, traders can effectively enhance their trading performance.
CZ Parabolic SAR + MAThe "CZ Parabolic SAR + MA" indicator combines a Parabolic SAR (PSAR) and a Moving Average (MA) to generate buy and sell signals, with an optional noise filter based on the MA. Here's a breakdown of how to use the indicator and its key parameters:
Key Features:
Parabolic SAR helps identify potential reversals by plotting dots above or below the price.
Moving Average smooths out price action and can be shifted forward or backward.
Noise Filter can be toggled on/off to reduce signals when the price doesn't align with the moving average.
How to Use the Indicator:
Parabolic SAR:
Green dots: Indicate a potential buy signal when the PSAR crosses below the price.
Red dots: Indicate a potential sell signal when the PSAR crosses above the price.
Buy/Sell Signals:
BUY: Occurs when the PSAR crosses below the price, and the price is above the moving average (if the filter is enabled).
SELL: Occurs when the PSAR crosses above the price, and the price is below the moving average (if the filter is enabled).
Noise Filter:
If enabled, the indicator will only trigger buy/sell signals if the price is also aligned with the moving average (above for buy, below for sell).
Moving Average:
A simple moving average (SMA) is plotted as a green line on the chart.
The moving average can be shifted forward or backward using the "MA Shift" parameter.
Parameters Explained:
Parabolic SAR Step (Default: 0.02): Controls the sensitivity of the PSAR dots. A smaller step results in dots closer to price, while a larger step results in dots further away.
Parabolic SAR Max (Default: 0.2): The maximum step size the PSAR can reach. This affects how quickly the dots move in strong trends.
Moving Average Period (Default: 6): The number of periods used to calculate the simple moving average. Adjust this to smooth out price action more or less.
MA Shift (Default: 0): Shifts the moving average line. Positive values shift it forward, and negative values shift it backward.
Enable Moving Average Filter (Default: True): Enables or disables the noise filter. If enabled, buy/sell signals require alignment with the moving average.
Solar System in 3D [Astro Tool w/ Zodiac]Hello Traders and Developers,
I am excited to announce my latest Open Source indicator. At the core, this is a demonstration of PineScript’s capabilities in Rendering 3D Animations, while at the same time being a practical tool for Financial Astrologists.
This 3D Engine dynamically renders all the major celestial bodies with their individual orbits, rotation speeds, polar inclinations and astrological aspects, all while maintaining accurate spatial relationships and perspective.
This is a Geocentric model of the solar system (viewed from the perspective of Earth), since that is what most Astrologists use. Thanks to the AstroLib Library created by @BarefootJoey, this model uses the real coordinates of cosmic bodies for every timestamp.
This script truly comes to life when using the “Bar Replay” mode in TradingView, as you can observe the relationships between planets and price action as time progresses, with the full animation capabilities as mentioned above.
In addition to what I have described, this indicator also displays the orbital trajectories for each cosmic body, and has labels for everything. I have also added the ability to hover on all the labels, and see a short description of what they imply in Astrology.
Optional Planetary Aspect Computation
This indicator supports all the Major Planetary Aspects, with an accuracy defined by the user (1° by default).
Conjunction: 0° Alignment. This draws a RED line starting from the center, and going through both planets.
Sextile: 60° Alignment. This draws three YELLOW lines, connecting the planets to each other and to the center.
Square: 90° Alignment. This draws three BLUE lines, connecting the planets to each other and to the center.
Trine: 120° Alignment. This draws three PURPLE lines, connecting the planets to each other and to the center.
Opposition: 180° Alignment. This draws a GREEN line starting from one planet, passing through the center and ending on the second planet.
The below image depicts a Top-Down view of the system, with the Moon in Opposition to Venus and with Mars in Square with Neptune .
Retrograde Computation
This indicator also displays when a planet enters Retrograde (Apparent Backward Motion) by making its orbital trajectory dashed and the planet name getting a red background.
The image below displays an example of Jupiter, Saturn, Neptune and Pluto in Retrograde Motion, from the camera perspective of a 65 degree inclination.
Optional Zodiac Computation (Tropical and Sidereal)
Zodiac represents the relatively stationary star formations that rest along the ecliptic plane, with planets transitioning from one to the next, each with a 30° separation (making 12 in total). I have implemented the option to switch between Tropical mode (where these stars were 2,000 years ago) and Sidereal (where these stars are today).
The image below displays the Zodiac labels with clear lines denoting where each planet falls into.
While this indicator is deployed in a separate pane, it is trivial to transfer it onto your price chart, just by clicking and dragging the graphics. After that, you can adjust the visuals by dragging the scale on the side, or optimizing model settings. You can also drag the model above or below the price, as shown in the following image:
Of course, there are a lot of options to customize this planetary model to your tastes and analytical needs. Aside from visual changes for the labels, colors or resolution you can also disable certain planets that don’t meet your needs as shown below:
Once can also infer the current lunar phases using the Aspects between the Sun and Moon. When the Moon is Opposite the Sun that is a Full Moon, while when they are Conjunct that is a New Moon (and sometimes Eclipse).
—---------------------------------------------------------------------------
I have made this indicator open source to help PineScript programmers understand how to approach 3D graphics rendering, enabling them to develop ever more capable scripts and continuously push the boundaries of what's possible on TradingView.
The code is well documented with comments and has a clear naming convention for functions and variables, to aid developers understand how everything operates.
For financial astrologists, this indicator offers a new way to visualize and correlate planetary movements, adding depth and ease to astrological market analysis.
Regards,
Hawk
Multi-Timeframe Intrabar CRT Candles
# Multi-Timeframe Intrabar Indicator
This advanced indicator visualizes Candle Range Theory (CRT) across multiple timeframes, providing traders with a comprehensive view of market structure and potential high-probability setups.
## Key Features:
- Supports 7 timeframes: 30 minutes, 1 hour, 2 hours, 4 hours, daily, weekly, and monthly
- Customizable color schemes for each timeframe
- Options to display mid-level (50%) lines for each range
- Bullish and bearish touch detection with customizable label display
- End-of-line labels for easy identification of CRT levels
- Flexible alert system for touch detections on each timeframe
- Adjustable minimum and maximum bar count for range validity
- Options for wick touch and body touch detection
## How It Works:
The indicator plots CRT ranges for each selected timeframe, identifying potential accumulation, manipulation, and distribution phases. It detects when price touches these levels, providing visual cues and optional alerts for potential trade setups.
## Customization:
Users can fine-tune the indicator's appearance and functionality through various input options, including:
- Toggling timeframes on/off
- Adjusting colors for range lines and mid-levels
- Controlling label display and count
- Setting alert preferences
- Adjusting line widths and label offsets
## Usage:
This indicator is designed for traders familiar with Candle Range Theory and multi-timeframe analysis. It can be used to identify potential entry and exit points, confirm trends, and spot potential reversals across different timeframes.
## Note:
This indicator is for educational and informational purposes only. Always combine with other forms of analysis and proper risk management when making trading decisions.
## Credits:
Inspired by Romeo's Candle Range Theory and developed to provide a comprehensive multi-timeframe analysis tool.
LRS-Strategy: 200-EMA Buffer & Long/Short Signals LRS-Strategy: 200-EMA Buffer & Long/Short Signals
This indicator is designed to help traders implement the Leveraged Return Strategy (LRS) using the 200-day Exponential Moving Average (EMA) as a key trend-following signal. The indicator offers clear long and short signals by analyzing the price movements relative to the 200-day EMA, enhanced by customizable buffer zones for increased precision.
Key Features:
200-Day EMA: The main trend indicator. When the price is above the 200-day EMA, the market is considered in an uptrend, and when it is below, it indicates a downtrend.
Customizable Buffer Zones: Users can define a percentage buffer around the 200-day EMA (default is 3%). The upper and lower buffer zones help filter out noise and prevent premature signals.
Precise Long/Short Signals:
Long Signal: Triggered when the price moves from below the lower buffer zone, crosses the 200-day EMA, and then breaks above the upper buffer zone.
Short Signal: Triggered when the price moves from above the upper buffer zone, crosses the 200-day EMA, and then breaks below the lower buffer zone.
Alternating Signals: Ensures that a new signal (long or short) is only generated after the opposite signal has been triggered, preventing multiple signals of the same type without a reversal.
Clear Visual Aids: The indicator displays the 200-day EMA and buffer zones on the chart, along with buy (long) and sell (short) signals. This makes it easy to track trends and time entries/exits.
How to Use:
Long Entry: Look for the price to move below the lower buffer, cross the 200-day EMA from below, and then break out of the upper buffer to confirm a long signal.
Short Entry: Look for the price to move above the upper buffer, cross below the 200-day EMA, and then break below the lower buffer to confirm a short signal.
This indicator is perfect for traders who prefer a structured, trend-following approach, using clear rules to minimize noise and identify meaningful long or short opportunities.
Bitcoin Thermocap [InvestorUnknown]The Bitcoin Thermocap indicator is designed to analyze Bitcoin's market data using a variant of the "Thermocap Multiple" concept from BitBo. This indicator offers several modes for interpreting Bitcoin's historical block and price data, aiding investors and analysts in understanding long-term market dynamics and generating potential investing signals.
Key Features:
1. Thermocap Calculation
The core of the indicator is based on the Thermocap Multiple, which evaluates Bitcoin's value relative to its cumulative historical blocks mined.
Thermocap Formula:
Source: Bitbo
btc_price = request.security("INDEX:BTCUSD", "1D", close)
BTC_BLOCKSMINED = request.security("BTC_BLOCKSMINED", "D", close)
// Variable to store the cumulative historical blocks
var float historical_blocks = na
// Initialize historical blocks on the first bar
if (na(historical_blocks))
historical_blocks := 0.0
// Update the cumulative blocks for each day
historical_blocks += BTC_BLOCKSMINED * btc_price
// Calculate the Thermocap
float thermocap = ((btc_price / historical_blocks) * 1000000) // the multiplication is just for better visualization
2. Multiple Display Modes:
The indicator can display data in four different modes, offering flexibility in interpretation:
RAW: Displays the raw Thermocap value.
LOG: Applies the logarithm of the Thermocap to visualize long-term trends more effectively, especially for large-value fluctuations.
MA Oscillator: Shows the ratio between the Thermocap and its moving average (MA). Users can choose between Simple Moving Average (SMA) or Exponential Moving Average (EMA) for smoothing.
Normalized MA Oscillator: Provides a normalized version of the MA Oscillator using a dynamic min-max rescaling technique.
3. Normalization and Rescaling
The indicator normalizes the Thermocap Oscillator values between user-defined limits, allowing for easier interpretation. The normalization process decays over time, with values shrinking towards zero, providing more relevance to recent data.
Negative values can be allowed or restricted based on user preferences.
f_rescale(float value, float min, float max, float limit, bool negatives) =>
((limit * (negatives ? 2 : 1)) * (value - min) / (max - min)) - (negatives ? limit : 0)
f_max_min_normalized_oscillator(float x) =>
float oscillator = x
var float min = na
var float max = na
if (oscillator > max or na(max)) and time >= normalization_start_date
max := oscillator
if (min > oscillator or na(min)) and time >= normalization_start_date
min := oscillator
if time >= normalization_start_date
max := max * decay
min := min * decay
normalized_oscillator = f_rescale(x, min, max, lim, neg)
Usage
The Bitcoin Thermocap indicator is ideal for long-term market analysis, particularly for investors seeking to assess Bitcoin's relative value based on mining activity and price dynamics. The different display modes and customization options make it versatile for a variety of market conditions, helping users to:
Identify periods of overvaluation or undervaluation.
Generate potential buy/sell signals based on the MA Oscillator and its normalized version.
By leveraging this Thermocap-based analysis, users can gain a deeper understanding of Bitcoin's historical and current market position, helping to inform investment strategies.
SPY $ectors | by Octopu$🏭 SPY Sectors with % Variance and Ticker Status| by Octopu$
What is SPY Sectors?
They are 11 SPY Sectors based on activity, which groups together their specific markets as well as the composition about the Tickers on the Sector.
For example: information technology, consumer discretionary, consumer staples, health care, financials, industrials, communication services, energy, , materials, utilities, real estate.
It is an useful resource for a trading system:
Can be used to follow up with tickers/sectors up and down moves and percentages as well as overall status and market sentiment as a whole.
AMEX:SPY
This indicator however should not be used as a standalone tool.
(The combination of factors relies on your own knowledge about Confluence Factors along with your Due Diligence)
This indicator is not an advice to buy or sell securities in any form.
ANY Ticker. ANY Timeframe.
Features:
• ALL Sector Track
• Up and Down Status
• Green and Red Colors
• % Indication
Options:
• Customization
• Location
Notes:
v1.0
Indicator release.
Changes and updates can come in the future for additional functionalities or per requests. Follow and Stay Tuned!
Did you like it? Please Support and Shoot me a message! I'd appreciate if you dropped by to say thanks! Thank you.
- Octopu$
🐙
ORB - Alerts, VWAP and MACD Checks, Extended Fib Levels
ORB Range Alerter with Shading, VWAP Check, MACD Check, and Extended Fibonacci Levels for TP – Fully Customizable
This indicator is designed to give you a comprehensive analysis of the Opening Range Breakout (ORB) combined with advanced conditions based on VWAP and MACD indicators, along with Extended Fibonacci Levels for both long and short TP positions.
Key Features:
Opening Range Breakout (ORB):
Defines the opening range at the market open (9:30 AM by default) based on your chart timeframe and shades it for visibility.
The high and low of the first candle after the open are plotted on the chart, creating a breakout range that traders can use to identify potential long or short positions.
VWAP Condition (Optional):
This indicator includes the option to enforce the VWAP (Volume-Weighted Average Price) as a condition for entering trades.
- Longs will only trigger if the price is above VWAP (when enabled).
- Shorts will only trigger if the price is below VWAP (when enabled).
Customizable : You can enable or disable the VWAP condition through a simple checkbox in the indicator’s settings.
MACD Condition (Optional):
Includes an optional MACD (Moving Average Convergence Divergence) condition.
- Longs will only trigger if the MACD line is above 0 and the signal line, providing confirmation of bullish momentum.
- Shorts will only trigger if the MACD line is below 0 and the signal line, indicating bearish momentum.
Customizable : You can enable or disable the MACD condition through a checkbox in the indicator’s settings, allowing you to trade with or without the MACD confirmation.
Fibonacci Extensions for Profit Targets:
Automatically calculates Fibonacci extension levels based on the ORB range for TP levels.
These levels provide key areas for potential profit-taking or reversal points.
Fibonacci extensions are plotted only after a confirmed breakout, either long or short.
The extensions include 127.2%, 161.8%, 200%, 261.8%, 423.6%, and 685.4%, offering a comprehensive set of targets for different trading strategies.
Shading of ORB Range:
The ORB high and low are visually emphasized on the chart with a shaded area for easy identification.
The shading is semi-transparent to help keep your chart clean and easy to read.
Customizable Timeframe:
The ORB range is defined based on the time of day (default is 9:30 AM to 4:00 PM), but you can adjust the timeframe to suit different trading sessions or markets.
Alerts for Breakouts:
Built-in alerts notify you when price crosses above or below the ORB high or low, along with the optional VWAP and MACD conditions.
Alerts can be used to create automated notifications or even execute automated trades based on your chosen settings.
How to Use:
Long Trade Example: When the price crosses above the ORB high, VWAP is above the price, and MACD shows bullish momentum (if these conditions are enabled), a potential long entry is triggered. You can use the Fibonacci extensions for profit targets.
Short Trade Example: When the price crosses below the ORB low, VWAP is below the price, and MACD confirms bearish momentum (if these conditions are enabled), a short entry is triggered. Fibonacci levels for the short position can guide your exit strategy.
Flexibility: You can enable or disable both VWAP and MACD conditions based on your trading style. This flexibility allows the indicator to adapt to different market conditions and strategies.
Customization Options:
Enable/Disable VWAP Condition: Decide if you want to include VWAP as a trade filter.
Enable/Disable MACD Condition: Choose whether to require MACD as confirmation for trade entries.
Adjust ORB Timeframe: Customize the time range for defining the ORB based on the market you're trading.
Fibonacci Extensions: Visualize key profit targets using Fibonacci extensions, which are automatically calculated and displayed after a breakout.
Time-based Vertical LinesThe Time-Based Vertical Line Script is a Pine Script tool designed to plot vertical lines at specific times during the trading day. The script allows users to mark important time-based events or price movement patterns by plotting fully customizable vertical lines on the chart. Each line can be configured with a specific time, color, width, and style, providing a clear visual reference for key moments throughout the trading session.
Key Features:
Custom Time Inputs:
Users can specify the hour and minute for each vertical line to mark crucial times, such as the opening or closing of a market session, or events like news releases.
The script can accommodate up to 24 vertical lines, each with individual time settings.
Customizable Appearance:
Color: Select different colors for each line to visually distinguish between important events or trading sessions.
Width: Adjust the thickness of the vertical lines to emphasize specific times.
Style: Choose from solid, dashed, or dotted lines for further customization.
No Built-in UTC Offset:
Important: This script does not automatically adjust for time zones or UTC offsets. The user must manually set the time for each vertical line based on the platform's server time or the desired trading session time.
If you are in a different time zone, you will need to calculate the time difference between your local time and the platform's time zone (which could be UTC or any other time zone).
For example, if the platform is set to UTC and you are in New York (UTC-4 during daylight savings), you will need to manually adjust your time inputs to match the time zone difference.
Static Time Configuration: The times you input for the vertical lines are fixed, meaning they won’t automatically adjust based on daylight savings or time zone shifts. You'll need to manually reconfigure the times if such changes occur.
Use Cases:
Session Marking: Mark the beginning and end of specific market sessions like New York, London, or Asian trading hours.
Event Monitoring: Plot lines to mark important economic events or news releases, ensuring you're prepared for potential market movements.
Strategy Tracking: For traders using time-sensitive strategies, such as the ICT (Inner Circle Trader) models, the script can help you highlight critical time windows for potential setups.
Important Note on Time Zone:
Since the script doesn't automatically apply a UTC offset, users need to figure out the correct time to input based on their own time zone and the platform's time zone. For example:
If you're in New York (UTC-4) and want to mark the New York session open at 9:30 AM, but your platform runs on UTC time, you would input 13:30 as the hour for the vertical line (since 9:30 AM UTC-4 corresponds to 13:30 UTC).
Example:
If your platform’s time is set to UTC, and you want to mark an event that happens at 10:00 AM in your local time zone (UTC-5), you'll need to set the vertical line to 15:00 (because 10:00 AM UTC-5 is 15:00 in UTC).
This means you'll need to calculate the offset based on your location and input the adjusted time into the script manually.
Forex Macro Metrics [MacroGlide]"Forex Macro Metrics " is a powerful tool for analyzing macroeconomic metrics, designed to help traders make more informed decisions in the forex market. This indicator displays key economic indicators such as interest rates, money supply (M1 and M2), unemployment rate, and government debt for various currencies and their pairs, allowing users to assess the macroeconomic differences between the base and quote currencies.
Key Features:
• Interest Rates Display: Includes interest rates for major world currencies with the ability to show the differential between the base and quote currencies.
• Money Supply Analysis (M1 and M2): Displays the money supply for both the base and quote currencies, including differential calculations.
• Unemployment Rate: Compares the unemployment rates between currencies, showing the differences on the chart.
• Government Debt: Shows government debt levels for the base and quote currencies with differential calculations.
• Customizable Options: Enable/disable specific metrics and adjust colors for better visual clarity.
How to Use:
• Select a Currency Pair: Apply the indicator to your chart and choose the desired currency pair. The indicator will automatically load the relevant data for the base and quote currencies.
• Adjust Display Settings: Use the indicator settings to enable or disable specific metrics and their differentials.
• Analyze the Data: Compare the economic conditions of the two currencies through the charts and identify potential trading opportunities based on macroeconomic differences.
Methodology:
The indicator uses economic data available through TradingView tickers to calculate the values of the base and quote currencies. Differentials are calculated by subtracting the values of the quote currency from the base currency, allowing for a visual assessment of their differences. The displayed data includes historical changes, helping to identify trends and potential reversal points.
Originality and Usefulness:
"Forex Macro Metrics " is a unique tool that combines several key macroeconomic indicators into one comprehensive indicator. This simplifies the analysis process for traders looking to understand the fundamental differences between currencies. Using this approach provides an advantage in assessing long-term trends and potential shifts in currency pairs driven by changes in macroeconomic conditions.
Charts:
The indicator displays data in the form of lines and areas on the chart, with interest rates shown as lines for the base and quote currencies, accompanied by an area representing the differential. For money supply (M1 and M2), lines are drawn for each currency, with areas highlighting the differences. Similarly, the unemployment rate and government debt are displayed with clear visual separation of the data and their differentials, making it easy to compare and analyze the macroeconomic conditions of the currencies involved.
Enjoy the game!
MAC-Z Indicator with Slope-Based Coloring - Vondor XMAC-Z Indicator with Trend-Based Slope Filtering and Background Shading
Author: Vondor
Description:
The MAC-Z Indicator is an advanced technical analysis tool designed to assess momentum and trend strength using a combination of Z-score and MACD principles. The indicator applies a calculated MAC-Z value, which is derived from a weighted combination of a VWAP Z-score and MACD-style moving averages. The inclusion of a short-term Simple Moving Average (SMA) on the MAC-Z helps identify potential crossovers, providing signals of momentum changes.
Additionally, this enhanced version incorporates trend-based slope filtering, which adjusts the coloring and background of the chart based on the slope of the MAC-Z SMA (SMAMACZ). The filter helps to distinguish between uptrends, downtrends, and flat trends. Dynamic color coding is used to visualize the direction of the trend:
Green: Uptrend, indicating positive momentum.
Red: Downtrend, indicating negative momentum.
Yellow: Flat or sideways trend.
How It Works:
MAC-Z Calculation: The indicator computes a MAC-Z value, blending the Z-score (a standardized measure of relative price) and MACD (trend-following momentum).
SMA Slope Filter: A short-term SMA on the MAC-Z value smooths the signal, and the slope of this SMA determines trend direction. The slope's magnitude is compared against a threshold to determine whether it is flat, up, or down.
Visual Cues: The indicator uses color coding for the MAC-Z SMA line and applies background shading to highlight uptrend, downtrend, and flat trend conditions.
Inputs:
Z-Score Length (lengthz): Defines the period for calculating the VWAP Z-score.
Standard Deviation Length (lengthStdev): The lookback period for standard deviation in the MACD calculation.
MAC-Z Constant A & B (A, B): Constants used to adjust the impact of the Z-score and MACD in the final MAC-Z formula.
Laguerre Smoothing (useLag, gamma): Optional smoothing using the Laguerre filter to reduce noise.
SMA MAC-Z Length (SZlen): Length of the short SMA applied to the MAC-Z to create crossover signals.
Flat Slope Threshold: Defines the sensitivity for detecting flat trends (default is 0.08).
Usage:
The MAC-Z Indicator is particularly useful for identifying trend reversals, momentum shifts, and spotting overbought/oversold conditions. By filtering out noise using the SMA slope-based coloring, it can help avoid false signals in periods of small oscillations.
Best Timeframes:
This indicator is most effective on longer time periods, such as 4-hour or daily charts, where price movements are more stable and less prone to short-term market noise. Using it on lower timeframes may result in frequent false signals and more "choppy" market conditions.
The background shading and color-coded lines make it easy to spot trend changes, helping traders make informed decisions about entering or exiting trades based on longer-term momentum shifts.
Conclusion:
The MAC-Z Indicator with trend filtering is a powerful tool for identifying momentum-driven market trends. It combines the strengths of Z-scores, MACD, and moving average crossovers to provide clear signals, making it an excellent choice for traders who focus on longer timeframes, such as daily or 4-hour charts, to capture significant trend movements.
Time-input Lines [MFX]THE LINES
The indicator plots a horizontal price line at a specified hour and minute (default: 9:30 - Equities Open). This line extends for a predefined number of minutes (default: 60 minutes - Opening Range Full Spectrum). Additionally, the indicator can plot two vertical lines: one at the selected start time and another at the end of the horizontal line.
STYLE
Both the horizontal and vertical lines are fully customizable, allowing adjustments to color, style, and width. For a cleaner, minimalist chart, any of these lines can be disabled.
TIMEZONE
By default, the indicator operates in the New York time zone, but this can be modified by unchecking the option and specifying a custom offset relative to UTC/GMT. The default offset is +2, corresponding to CEST (Central European Summer Time, UTC/GMT+2). The offset can be adjusted with up to 15-minute precision, where 0.25 represents a quarter of an hour.
S&R Tracker [CHE]Dynamic S&R Tracker
1. Introduction to the Tool
Purpose:
The Dynamic S&R Tracker is a powerful TradingView tool designed to automatically detect and display support and resistance levels across multiple timeframes. It dynamically adjusts based on the current chart’s timeframe, making it easier for traders to identify key price levels for both shortterm and longterm analysis.
Key Features:
Dynamic adjustment of support and resistance levels based on realtime market conditions
Simultaneous visualization of support and resistance for two different timeframes
Automatic selection of optimal timeframes for accurate and efficient analysis
2. Functionality
Automatic Timeframe Selection:
The Dynamic S&R Tracker uses a smart function to automatically adjust the analysis timeframe based on the market’s current conditions. It selects the appropriate intervals (e.g., 1 hour, 1 day, 1 month) for displaying support and resistance levels, reducing the need for manual intervention.
Support and Resistance Identification:
The tool calculates and identifies key pivot highs and lows, which act as support and resistance levels. These levels are displayed for two timeframes at once, giving a comprehensive view of the market's shortterm and longterm trends.
3. Benefits
Efficiency:
With automatic adjustments, traders save time by not having to manually change timeframes or recalculate levels.
Enhanced Market Insight:
By analyzing two timeframes simultaneously, the tool provides a broader market perspective, helping traders spot potential reversal points and breakouts.
Customizability:
Though dynamic, the Dynamic S&R Tracker offers flexibility for manual adjustments, allowing traders to finetune the analysis based on personal preferences or market strategies.
4. Visualization
Support and Resistance Levels:
The tool uses clear visual markers—green for support and red for resistance—making it easy to spot critical price zones on the chart.
Informative Timeframe Display:
The tracker includes a customizable information box that shows the selected timeframes used in the analysis, keeping the user informed at all times.
5. Conclusion
The Dynamic S&R Tracker is an essential tool for traders seeking an automated, precise, and flexible way to analyze support and resistance across multiple timeframes. By offering dynamic adjustments and clear visual feedback, it simplifies the decisionmaking process and provides deeper market insights.
Ideal for traders who need a streamlined and adaptable solution to better navigate market trends.
Revenue GridDescription:
The Revenue Grid indicator helps traders and investors visualize a stock’s valuation by plotting horizontal lines based on its price-to-sales (P/S) ratio. This tool displays how the stock price compares to multiples of its total revenue per share, giving a clear perspective on valuation benchmarks.
Fundamental Concept:
The price-to-sales ratio compares a company’s stock price to its revenue per share. It’s used to evaluate whether a stock is overvalued or undervalued based on its revenue.
This indicator offers a unique way to view this ratio by applying Fibonacci multiples to the revenue per share. It plots lines at these multiples to show how the stock price measures up against different valuation levels.
How It Works:
Data Inputs:
Total Revenue (TR): The company’s revenue over the past twelve months.
Total Shares Outstanding (TSO): The total number of shares in circulation.
Calculation:
Calculates the revenue per share (TR/TSO).
Plots lines at fixed Fibonacci multiples (e.g., 1x, 2x, 3x, 5x, 8x, 13x) of the revenue per share value.
How to Use:
1. Add the "Revenue Grid" indicator to your chart by searching for it in the indicator library and applying it.
2. Observe the lines plotted on the chart. If these lines are trending upwards, it indicates that the revenue is increasing.
3. Analyze how historical prices trend relative to these lines. Look for periods where the stock price supports around specific multiples, you can easily get a sense of overvaluation or undervaluation in certain periods.
Use this information to guide further analysis and investment decisions.
Benefits:
1. Clear Valuation View: Easily see how the company’s revenue translates into stock price levels.
2. Investment Insight: Identify if the stock price is lagging behind revenue growth, which might signal a buying opportunity.
3. Historical Context: Understand how the market has historically valued the company and assess the current valuation.
Do let me know your feedbacks in comments. Happy Investing :)
ICT Time Levels Description:
The Time Levels Indicator is designed to enhance trading decisions by marking significant price levels at key times throughout the trading day. This indicator specifically focuses on three crucial times: 8:30 AM, 9:30 AM, and 10:00 AM (UTC-4), which are often associated with significant market movements.
Key Features:
Customizable Time Levels: Users can toggle the display of price levels at 8:30 AM, 9:30 AM, and 10:00 AM. Each level is marked with a line on the chart, which helps traders visually identify these critical points.
Style and Color Options: Customize the appearance of each time level with different line styles (solid, dotted, dashed) and colors to match your chart preferences.
Dynamic Labeling: The indicator automatically places a label at the current price level for each time, making it easier to identify and track these levels as the day progresses.
Real-Time Updates: As the trading session unfolds, the indicator adjusts the lines and labels to reflect the latest price data at the specified times.
How It Works:
At the specified times (8:30 AM, 9:30 AM, and 10:00 AM), the indicator captures the opening price and plots a horizontal line at that level.
These lines serve as reference points, helping traders to observe how the price interacts with these key levels throughout the day.
The lines and labels are fully customizable, allowing users to adapt the indicator to their trading style and visual preferences.
Use Cases:
Market Open Strategies: Traders can use the 9:30 AM level to monitor the opening price of the New York Stock Exchange (NYSE), which often sets the tone for the trading session.
Morning Volatility: The 8:30 AM and 10:00 AM levels can be useful for identifying potential support and resistance levels during periods of increased volatility, such as economic data releases or after the market opens.
This indicator is particularly useful for intraday traders who focus on morning trading sessions and want to have a clear visual reference to guide their decisions.
Note: This script is designed to be simple yet effective, providing traders with essential information without cluttering the chart.
Season ChartThis overlay is built on the idea of seasonal charts.
It is constructed by taking the percentage change from each close and recording that change for every trading day of any year that is within the sample. We then take the average for each day of all the years.
These averages are then cumulated to create the chart as per traditional seasonal chart construction.
I have also taken a trimmed mean of the averages to try and dampen the impact one off moves that may have a dramatic effect on the daily averages (for example the crash to $0 in oil in April 2020) however, even removing 10% may not guarantee one off moves won’t affect the average.
The construction of the chart is completely dependent on the data provided by TradingView and so it is recommended that if longer sample sizes are used, the user go back to check that the years contained within the sample have a full history. Some data may have large gaps in their history and this can distort the seasonality readings.
I have attempted to align the chart with the first trading day of the year, but the start of some months may be out by a day or two as it becomes difficult to track all weeks with differing market holidays closures each year and this in turn varies the total amount of actual trading days in each year as well as leap years.
This overlay is designed for the Daily time frame only and will not work on Crypto or any other instrument that trades outside of usual business weekdays. Future updates may include the ability to adapt to Crypto instruments.
All feedback and comments welcome!
ICT Intraday Timeline [neo.|]ICT Intraday Timeline is a script that aims to cleanly display key times that the "Inner Circle Trader" often refers to during the day on a separate pane in your Tradingview chart. While using it, you can clearly see the time it is currently in New York time, as well as your own through Tradingview as usual, as well as relevant times such as the lunch times, Silver Bullet times, and Asian range time.
By using this indicator it is simpler to consider what every time is doing and the effect it has on your current bias, for example: you may want to look at the 8:30 am open which is where news usually comes out, if not you can use 9:30 am for formulating trades. The AM SB is a time for when the "Silver Bullet (ICT)" setup can be found and executed, as it refines a specific range and targets inefficiencies and allows liquidity to form for which it comes back for, meaning it may be a better time for you to enter a trade, these are just examples of what you can look for, and how considering time can help you come up with and refine trade ideas.
Other times which are included are the:
Asia Range: You can mark out the highs and lows which occur during this time to use as liquidity later.
Midnight Open: On equities price will often interact with the midnight opening price, meaning it is an important time to consider.
London Open SB and Premarket SB: As mentioned previously you can find the "Silver Bullet" setup in here.
NY Lunch & London Lunch: Lunch times usually mean less volume therefore you may see less probable trades at this time.
AM SB and PM SB: Once again, times where you can potentially find more probable trades.
You can also easily customize any of the colors such as the SB (Silver Bullet) times, London lunch and NY Lunch times, or the Asia range or line colors to your preference and individual chart style.
Prometheus StochasticThe Stochastic indicator is a popular indicator developed in the 1950s. It is designed to identify overbought and oversold scenarios on different assets. A value above 80 is considered overbought and a value below 20 is considered oversold.
The formula is as follows:
%k = ((Close - Low_i) / (High_i / Low_i)) * 100
Low_i and High_i represent the lowest low and highest high of the selected period.
The Prometheus version takes a slightly different approach:
%k = ((High - Lowest_Close_i) / (High_i / Low_i)) * 100
Using the Current High minus the Lowest Close provides us with a more robust range that can be slightly more sensitive to moves and provide a different perspective.
Code:
stoch_func(src_close, src_high, src_low, length) =>
100 * (src_high - ta.lowest(src_close, length)) / (ta.highest(src_high, length) - ta.lowest(src_low, length))
This is the function that returns our Stochastic indicator.
What period do we use for the calculation? Let Prometheus handle that, we utilize a Sum of Squared Error calculation to find what lookback values can be most useful for a trader. How we do it is we calculate a Simple Moving Average or SMA and the indicator using a lot of different bars back values. Then if there is an event, characterized by the indicator crossing above 80 or below 20, we subtract the close by the SMA and square it. If there is no event we return a big value, we want the error to be as small as possible. Because we loop over every value for bars back, we get the value with the smallest error. We also do this for the smoothing values.
// Function to calculate SSE for a given combination of N, K, and D
sse_calc(_N, _K, _D) =>
SMA = ta.sma(close, _N)
sf = stoch_func(close, high, low, _N)
k = ta.sma(sf, _K)
d = ta.sma(k, _D)
var float error = na
if ta.crossover(d, 80) or ta.crossunder(d, 20)
error := math.pow(close - SMA, 2)
else
error := 999999999999999999999999999999999999999
error
var int best_N = na
var int best_K = na
var int best_D = na
var float min_SSE = na
// Loop through all combinations of N, K, and D
for N in N_range
for K in K_range
for D in D_range
sse = sse_calc(N, K, D)
if (na(min_SSE) or sse < min_SSE)
min_SSE := sse
best_N := N
best_K := K
best_D := D
int N_opt = na
int K_opt = na
int D_opt = na
if c_lkb_bool == false
N_opt := best_N
K_opt := best_K
D_opt := best_D
This is the section where the best lookback values are calculated.
We provide the option to use this self optimizer or to use your own lookback values.
Here is an example on the daily AMEX:SPY chart. The top Stochastic is the value with the SSE calculation, the bottom is with a fixed 14, 1, 3 input values. We see in the candles with boxes where some potential differences and trades may be.
This is another comparison of the SSE functionality and the fixed lookbacks on the NYSE:PLTR 1 day chart.
Differences may be more apparent on lower time frame charts.
We encourage traders to not follow indicators blindly, none are 100% accurate. SSE does not guarantee that the values generated will be the best for a given moment in time. Please comment on any desired updates, all criticism is welcome!
Enhanced Local Polynomial Regression [Yosiet]Local Polynomial Regression (LPR) is an advanced statistical method that offers a flexible approach to estimating the underlying trend in financial time series data.
The Mathematical Explanation
The core idea of LPR is to fit a polynomial of degree p at each point x using weighted least squares. The weight of each data point decreases with its distance from x, controlled by a kernel function and a bandwidth parameter.
The general form of the local polynomial estimator is:
β̂(x) = argmin Σ K((Xi - x) / h) (Yi - β0 - β1(Xi - x) - ... - βp(Xi - x)^p)^2
Where:
β̂(x) is the vector of estimated coefficients
K is the kernel function
h is the bandwidth
Xi and Yi are the predictor and response variables
p is the degree of the polynomial
Our implementation uses the Epanechnikov kernel:
K(u) = 3/4 * (1 - u^2) for |u| ≤ 1, 0 otherwise
The Implementation
This script implements LPR for the easier way to interpret its values with the following key components:
Input Parameters: Can adjust the lookback period, bandwidth, and polynomial degree.
Kernel Function: The Epanechnikov kernel is used for weighting.
LPR Function: Implements the core algorithm using matrix operations.
Signal Generation: Generates buy/sell signals based on crossovers of smoothed price and LPR results.
How to Use
Apply the indicator to your chart in TradingView.
Adjust the input parameters:
Lookback Period: Controls how many past bars are considered.
Bandwidth: Affects the smoothness of the regression line.
Polynomial Degree: Determines the complexity of the local fit.
Signal Smoothing Length: Adjusts the responsiveness of buy/sell signals.
Monitor buy/sell signals for potential trade entries.
Limitations
Sensitivity to Parameters: The choice of bandwidth and polynomial degree significantly impacts the results.
Lag: Like all trend-following indicators, LPR may lag behind rapid price movements.
Edge Effects: The indicator may be less reliable at the edges of the data (recent bars).
Recommendations
Parameter Optimization: Experiment with different lookback periods, bandwidths, and polynomial degrees to find the best fit for your trading style and timeframe.
Combine with Other Indicators: Use LPR in conjunction with momentum oscillators or volume indicators for confirmation.
Multiple Timeframes: Apply LPR on different timeframes to gain a more comprehensive view of the trend.
Avoid Overfitting: Be cautious of using high polynomial degrees, as they may lead to overfitting on historical data.
Consider Market Conditions: LPR works best in trending markets; be aware of its limitations in ranging or highly volatile conditions.
Backtest Thoroughly: Always backtest strategies based on LPR across different market conditions before live trading.
Conclusion
Local Polynomial Regression offers a sophisticated approach to trend analysis in financial markets. By providing a flexible, adaptive trend line, it can help traders identify potential entry and exit points with greater precision than traditional moving averages. However, like all technical indicators, it should be used as part of a comprehensive trading strategy that includes proper risk management and consideration of fundamental factors.
if you have an strategy or idea and need to make it real through an indicator or trading bot, you can DM or comment
MACD with DPO Strategy by NGExplanation of the MACD with DPO Strategy:
MACD (Moving Average Convergence Divergence):
The MACD is a trend-following indicator that shows the relationship between two moving averages of a price.
In this script:
We calculate the MACD line by subtracting the slow moving average (typically 26-period EMA) from the fast moving average (typically 12-period EMA).
The Signal line is calculated as a 9-period EMA of the MACD line.
The Histogram is the difference between the MACD line and the Signal line, indicating the momentum of the price trend.
Buy Condition: The script generates a buy signal when the MACD histogram crosses from negative to positive (indicating a bullish momentum) and DPO is also positive.
Sell Condition: The script generates a sell signal when the MACD histogram crosses from positive to negative (indicating a bearish momentum) and DPO is also negative.
DPO (Detrended Price Oscillator):
The DPO removes long-term trends from prices, making it easier to identify shorter-term cycles or oscillations.
In this script:
We calculate the DPO by subtracting a shifted simple moving average (SMA) from the close price. The shifting period depends on half the specified period.
We also calculate the DPO SMA as a 30-period EMA of the DPO values.
DPO Color: The DPO line is colored green when the DPO is above zero (indicating upward momentum) and red when it is below zero (indicating downward momentum). The histogram is also colored based on whether the DPO is positive or negative.
Plotting and Alerts:
The script plots the MACD, Signal, and Histogram on the chart.
Additionally, it plots the DPO and its SMA with different colors depending on whether the DPO is above or below zero.
Buy Signal: A green arrow labeled "BUY" is plotted below the bar when both MACD and DPO indicate a bullish condition.
Sell Signal: A red arrow labeled "SELL" is plotted above the bar when both MACD and DPO indicate a bearish condition.
Background colors are used to highlight the chart whenever a buy or sell condition occurs.
The script also includes alerts for both buy and sell signals, allowing users to set notifications when conditions are met.
How to Use:
Identify Buy and Sell Signals:
The script generates a Buy signal when:
The MACD histogram crosses from negative to positive (bullish momentum), and
The DPO is above zero (indicating upward momentum).
The script generates a Sell signal when:
The MACD histogram crosses from positive to negative (bearish momentum), and
The DPO is below zero (indicating downward momentum).
Chart Visualization:
The MACD histogram and Signal line help visualize the momentum and potential trend reversal.
The DPO and DPO SMA help visualize the shorter-term price cycles.
The signals (Buy and Sell) will be plotted on the chart with arrows indicating entry points.
Customization:
You can adjust the MACD and DPO parameters (such as fast_length, slow_length, period_) to fit your trading style or market conditions.
The script can be used in any timeframe depending on your strategy (e.g., intraday trading or longer-term trading).
Example Scenario:
If you're looking for potential buy opportunities, wait for the script to generate a buy signal (green arrow) where the MACD histogram has shifted to positive, and DPO is also in the green (above zero). This signals that both momentum and cycle direction are aligned for a potential upward movement.
Conversely, for sell opportunities, wait for the red arrow where MACD momentum is turning negative and DPO is also negative (below zero), indicating a bearish condition.
This combination of MACD and DPO allows traders to identify stronger and more reliable entry/exit points by confirming the trend with the MACD and detecting shorter-term price cycles with the DPO.
Greer BuyZone toolGreer BuyZone Tool
Description:
The Greer BuyZone Tool is a custom Pine Script indicator designed to help identify potential long-term investment opportunities by marking BuyZones on the chart. This tool utilizes the Aroon indicator in combination with Fibonacci numbers to define periods where the asset might be a good candidate for dollar-cost averaging.
Features:
BuyZone Detection: The script identifies and marks the beginning and end of a BuyZone with vertical lines and labels.
Visual Markers: A red vertical line and label indicate the start of a BuyZone, while a green vertical line and label mark the end of a BuyZone.
Aroon Indicator Calculation: Utilizes the Aroon indicator with a Fibonacci length (233) to determine key price levels.
How to Use:
Setup: Add the Greer BuyZone Tool to your TradingView chart. It will display vertical lines and labels marking the BuyZone periods.
BuyZone Identification: Use the red lines and labels ("BZ Begins ->>") to identify the start of a BuyZone, and the green lines and labels ("<<- BZ Ends") to determine when the BuyZone ends.
Long-Term Investment: This tool is intended for long-term investing and dollar-cost averaging strategies, not for day trading.
Disclaimer:
This script is provided for informational purposes only and is not intended as financial advice. The Greer BuyZone Tool is designed to assist in identifying potential long-term investment opportunities and is not suitable for day trading. The use of this tool involves risk, and there is no guarantee of profitability. Users are advised to conduct their own research and consult with a qualified financial advisor before making any investment decisions. The creator of this script assumes no liability for any losses or damages resulting from the use of this indicator.
Author: Sean Lee Greer
Date: 9/1/2024
Realized Price Oscillator [InvestorUnknown]Overview
The Realized Price Oscillator is a fundamental analysis tool designed to assess Bitcoin's price dynamics relative to its realized price. The indicator calculates various metrics using data from the realized market capitalization and total supply. It applies normalization techniques to scale values within a specified range, helping investors identify overbought or oversold conditions over the long time horizon. The oscillator also features DCA-based signals to assist in strategic market entry and exit.
Key Features
1. Normalization and Scaling:
The indicator scales values using a limit that can be adjusted for decimal precision (Limit). It allows for both positive and negative values, providing flexibility in analysis.
Decay functionality is included to progressively reduce the extreme values over time, ensuring recent data impacts the oscillator more than older data.
f_rescale(float value, float min, float max, float limit, bool negatives) =>
((limit * (negatives ? 2 : 1)) * (value - min) / (max - min)) - (negatives ? limit : 0)
2. Realized Price Oscillator Calculation:
Realized Price Oscillator is computed using logarithmic differences between the open, high, low, and close prices and the realized price. This helps in identifying how the current market price compares with the average cost basis of the Bitcoin supply.
f_realized_price_oscillator(float realized_price) =>
rpo_o = math.log(open / realized_price)
rpo_h = math.log(high / realized_price)
rpo_l = math.log(low / realized_price)
rpo_c = math.log(close / realized_price)
3. Oscillator Normalization:
The normalized oscillator calculates the range between the maximum and minimum values over time. It adjusts the oscillator values based on these bounds, considering a decay factor. This normalized range assists in consistent signal generation.
normalized_oscillator(float x, float b) =>
float oscillator = b
var float min = na
var float max = na
if (oscillator > max or na(max)) and time >= normalization_start_date
max := oscillator
if (min > oscillator or na(min)) and time >= normalization_start_date
min := oscillator
if time >= normalization_start_date
max := max * decay
min := min * decay
normalized_oscillator = f_rescale(x, min, max, lim, neg)
4. Dollar-Cost Averaging (DCA) Signals:
DCA-based signals are generated using user-defined thresholds (DCA IN and DCA OUT). The oscillator triggers buy signals when the normalized low value falls below the DCA IN threshold and sell signals when the normalized high value exceeds the DCA OUT threshold.
5. Visual Representation:
The indicator plots candlestick representations of the normalized Realized Price Oscillator values (open, high, low, close) over time, starting from a specified date (plot_start_date).
Colors are dynamically adjusted using a gradient to represent the state of the oscillator, ranging from green (buy zone) to red (sell zone). Background and bar colors also change based on DCA conditions.
How It Works
Data Sourcing: Realized price data is sourced using Bitcoin’s realized market cap (BTC_MARKETCAPREAL) and total supply (BTC_SUPPLY).
Realized Price Oscillator Metrics: Logarithmic differences between price and realized price are computed to generate Realized Price Oscillator values for open, high, low, and close.
Normalization: The indicator rescales the oscillator values based on a defined limit, adjusting for negative values if allowed. It employs a decay factor to reduce the influence of historical extremes.
Conclusion
The Realized Price Oscillator is a sophisticated tool that combines market price analysis with realized price metrics to offer a robust framework for understanding Bitcoin's valuation. By leveraging normalization techniques and DCA thresholds, it provides actionable insights for long-term investing strategies.