Super Trend and RSI Strategy### Super Trend and RSI Strategy: A Brief Overview
The Super Trend and RSI (Relative Strength Index) strategy is a popular trading approach that combines the trend-following capabilities of the Super Trend indicator with the momentum analysis of the RSI. This hybrid strategy aims to provide traders with reliable entry and exit signals by confirming trends and identifying potential reversals.
#### Super Trend Indicator
The Super Trend indicator is a trend-following tool that signals the current market direction. It is calculated using the Average True Range (ATR) to identify volatility and price movement. The indicator plots lines above or below the price, signaling bullish (green) or bearish (red) trends:
- **Buy Signal**: When the price crosses above the Super Trend line and the line turns green.
- **Sell Signal**: When the price crosses below the Super Trend line and the line turns red.
#### Relative Strength Index (RSI)
The RSI is a momentum oscillator that measures the speed and change of price movements on a scale from 0 to 100. It helps identify overbought or oversold conditions:
- **Overbought Condition**: RSI value above 70, suggesting the asset may be overvalued and a correction could be imminent.
- **Oversold Condition**: RSI value below 30, suggesting the asset may be undervalued and a rebound could be imminent.
#### Strategy Implementation
1. **Trend Confirmation with Super Trend**:
- Enter a long position (buy) when the Super Trend turns green and the price closes above it.
- Enter a short position (sell) when the Super Trend turns red and the price closes below it.
2. **Momentum Confirmation with RSI**:
- For long positions, ensure the RSI is not in the overbought zone (preferably below 70).
- For short positions, ensure the RSI is not in the oversold zone (preferably above 30).
3. **Entry Signals**:
- **Buy Signal**: Super Trend turns green, price closes above the Super Trend line, and RSI is below 70.
- **Sell Signal**: Super Trend turns red, price closes below the Super Trend line, and RSI is above 30.
4. **Exit Signals**:
- Close long positions when the Super Trend turns red or the RSI enters the overbought zone.
- Close short positions when the Super Trend turns green or the RSI enters the oversold zone.
#### Advantages and Considerations
- **Advantages**:
- Combines trend-following and momentum analysis for more robust signals.
- Helps filter out false signals by requiring confirmation from both indicators.
- **Considerations**:
- Like all trading strategies, it is not foolproof and can generate false signals.
- Best used in conjunction with other analysis techniques and proper risk management.
- Performance can vary across different market conditions and timeframes.
The Super Trend and RSI strategy is a versatile tool that can enhance trading decisions by providing clearer entry and exit points, helping traders capture significant market moves while avoiding potential pitfalls of relying on a single indicator.
Trend Analysis
Adaptive Trend Lines [MAMA and FAMA]Updated my previous algo on the Adaptive Trend lines, however I have added new functionalities and sorted out the settings.
You can now switch between normalized and non-normalized settings, the colors have also been updated and look much better.
The MAMA and FAMA
These indicators was originally developed by John F. Ehlers (Stocks & Commodities V. 19:10: MESA Adaptive Moving Averages). Everget wrote the initial functions for these in pine script. I have simply normalized the indicators and chosen to use the Laplace transformation instead of the hilbert transformation
How the Indicator Works:
The indicator employs a series of complex calculations, but we'll break it down into key steps to understand its functionality:
LaplaceTransform: Calculates the Laplace distribution for the given src input. The Laplace distribution is a continuous probability distribution, also known as the double exponential distribution. I use this because of the assymetrical return profile
MESA Period: The indicator calculates a MESA period, which represents the dominant cycle length in the price data. This period is continuously adjusted to adapt to market changes.
InPhase and Quadrature Components: The InPhase and Quadrature components are derived from the Hilbert Transform output. These components represent different aspects of the price's cyclical behavior.
Homodyne Discriminator: The Homodyne Discriminator is a phase-sensitive technique used to determine the phase and amplitude of a signal. It helps in detecting trend changes.
Alpha Calculation: Alpha represents the adaptive factor that adjusts the sensitivity of the indicator. It is based on the MESA period and the phase of the InPhase component. Alpha helps in dynamically adjusting the indicator's responsiveness to changes in market conditions.
MAMA and FAMA Calculation: The MAMA and FAMA values are calculated using the adaptive factor (alpha) and the input price data. These values are essentially adaptive moving averages that aim to capture the current trend more effectively than traditional moving averages.
But Omar, why would anyone want to use this?
The MAMA and FAMA lines offer benefits:
The indicator offers a distinct advantage over conventional moving averages due to its adaptive nature, which allows it to adjust to changing market conditions. This adaptability ensures that investors can stay on the right side of the trend, as the indicator becomes more responsive during trending periods and less sensitive in choppy or sideways markets.
One of the key strengths of this indicator lies in its ability to identify trends effectively by combining the MESA and MAMA techniques. By doing so, it efficiently filters out market noise, making it highly valuable for trend-following strategies. Investors can rely on this feature to gain clearer insights into the prevailing trends and make well-informed trading decisions.
This indicator is primarily suppoest to be used on the big timeframes to see which trend is prevailing, however I am not against someone using it on a timeframe below the 1D, just be careful if you are using this for modern portfolio theory, this is not suppoest to be a mid-term component, but rather a long term component that works well with proper use of detrended fluctuation analysis.
Dont hesitate to ask me if you have any questions
Again, I want to give credit to Everget and ChartPrime!
Code explanation as required by House Rules:
fastLimit = input.float(title='Fast Limit', step=0.01, defval=0.01, group = "Indicator Settings")
slowLimit = input.float(title='Slow Limit', step=0.01, defval=0.08, group = "Indicator Settings")
src = input(title='Source', defval=close, group = "Indicator Settings")
input.float: Used to create input fields for the user to set the fastLimit and slowLimit values.
input: General function to get user inputs, like the data source (close price) used for calculations.
norm_period = input.int(3, 'Normalization Period', 1, group = "Normalized Settings")
norm = input.bool(defval = true, title = "Use normalization", group = "Normalized Settings")
input.int: Creates an input field for the normalization period.
input.bool: Allows the user to toggle normalization on or off.
Color settings in the code:
col_up = input.color(#22ab94, group = "Color Settings")
col_dn = input.color(#f7525f, group = "Color Settings")
Constants and functions
var float PI = math.pi
laplace(src) =>
(0.5) * math.exp(-math.abs(src))
_computeComponent(src, mesaPeriodMult) =>
out = laplace(src) * mesaPeriodMult
out
_smoothComponent(src) =>
out = 0.2 * src + 0.8 * nz(src )
out
math.pi: Represents the mathematical constant π (pi).
laplace: A function that applies the Laplace transform to the source data.
_computeComponent: Computes a component of the data using the Laplace transform.
_smoothComponent: Smooths data by averaging the current value with the previous one (nz function is used to handle null values).
Alpha function:
_computeAlpha(src, fastLimit, slowLimit) =>
mesaPeriod = 0.0
mesaPeriodMult = 0.075 * nz(mesaPeriod ) + 0.54
...
alpha = math.max(fastLimit / deltaPhase, slowLimit)
out = alpha
out
_computeAlpha: Calculates the adaptive alpha value based on the fastLimit and slowLimit. This value is crucial for determining the MAMA and FAMA lines.
Calculating MAMA and FAMA:
mama = 0.0
mama := alpha * src + (1 - alpha) * nz(mama )
fama = 0.0
fama := alpha2 * mama + (1 - alpha2) * nz(fama )
Normalization:
lowest = ta.lowest(mama_fama_diff, norm_period)
highest = ta.highest(mama_fama_diff, norm_period)
normalized = (mama_fama_diff - lowest) / (highest - lowest) - 0.5
ta.lowest and ta.highest: Find the lowest and highest values of mama_fama_diff over the normalization period.
The oscillator is normalized to a range, making it easier to compare over different periods.
And finally, the plotting:
plot(norm == true ? normalized : na, style=plot.style_columns, color=col_wn, title = "mama_fama_diff Oscillator Normalized")
plot(norm == false ? mama_fama_diff : na, style=plot.style_columns, color=col_wnS, title = "mama_fama_diff Oscillator")
Example of Normalized settings:
Example for setup:
Try to make sure the lower timeframe follows the higher timeframe if you take a trade based on this indicator!
Advanced Fractal and Hurst IndicatorAdvanced Fractal and Hurst Indicator (AFHI)
Description:
The Advanced Fractal and Hurst Indicator (AFHI) is a custom technical analysis tool designed to identify market trends and potential reversals by leveraging the concepts of Fractal Dimension and the Hurst Exponent . These advanced mathematical concepts provide insights into the complexity and persistence of price movements, making this indicator a powerful addition to any trader's toolkit.
How It Works:
Fractal Dimension (FD) :
The Fractal Dimension measures the complexity of price movements. A higher Fractal Dimension indicates a more complex, choppy market, while a lower value suggests smoother trends.
The FD is calculated using the log difference of price movements over a specified length.
Hurst Exponent (HE) :
The Hurst Exponent indicates the tendency of a time series to either regress to the mean or cluster in a direction. Values below 0.5 indicate a tendency to revert to the mean (mean-reverting), while values above 0.5 suggest a trending market.
The HE is calculated using the rescaled range method, comparing the range of price movements to the standard deviation.
Composite Indicator :
The Composite Indicator combines the smoothed Fractal Dimension and Hurst Exponent to provide a single value indicating market conditions. This is done by normalizing the FD and HE values and combining them into one metric.
A positive Composite Indicator suggests an uptrend, while a negative value indicates a downtrend.
Smoothing :
Both FD and HE values are smoothed using a simple moving average to reduce noise and provide clearer signals.
Trend Confirmation :
A 50-period moving average (MA) is used to confirm the trend direction. The price being above the MA indicates an uptrend, while below the MA indicates a downtrend.
Background Shading :
The indicator pane is shaded green during uptrend conditions (positive Composite Indicator and price above MA) and red during downtrend conditions (negative Composite Indicator and price below MA).
How Traders Can Use It:
Identifying Trends :
Traders can use the AFHI to identify current market trends. The background shading in the indicator pane provides a visual cue for trend direction, with green indicating an uptrend and red indicating a downtrend.
Trend Confirmation :
The Composite Indicator line, plotted in purple, helps confirm the trend. Positive values suggest a strong uptrend, while negative values indicate a strong downtrend.
Entry and Exit Signals :
Traders can use the transitions of the Composite Indicator and the background shading to time their entry and exit points. For instance, a shift from red to green shading suggests a potential buy opportunity, while a shift from green to red suggests a potential sell opportunity.
Alerts :
The script includes alert conditions that can notify traders when the Composite Indicator signals a new trend direction. Alerts can be set up for both uptrends and downtrends, helping traders stay informed of key market changes.
Strategy Development :
By integrating AFHI into their trading strategies, traders can develop more robust systems that account for market complexity and persistence. The indicator can be used alongside other technical tools to enhance decision-making and improve trade accuracy.
Multi Timeframe Moving Average Convergence Divergence {DCAquant}Overview
The MTF MACD indicator provides a unique view of MACD (Moving Average Convergence Divergence) and Signal Line dynamics across various timeframes. It calculates the MACD and Signal Line for each selected timeframe and aggregates them for analysis.
Key Features
MACD Calculation
Utilizes standard MACD calculations based on user-defined parameters like fast length, slow length, and signal smoothing.
Determines the difference between the MACD and Signal Line to identify convergence or divergence.
Multiple Timeframe Analysis
Allows users to select up to six different timeframes for analysis, ranging from minutes to days, providing a holistic view of market trends.
Calculates MACD and Signal Line for each timeframe independently.
Aggregated Analysis
Combines MACD and Signal Line values from multiple timeframes to derive a consolidated view.
Optionally applies moving average smoothing to aggregated MACD and Signal Line values for better clarity.
Position Identification
Determines the trading position (Long, Short, or Neutral) based on the relationship between MACD and Signal Line.
Considers the proximity of MACD and Signal Line to identify potential trading opportunities.
Visual Representation
Plots MACD and Signal Line on the price chart for visual analysis.
Utilizes color-coded backgrounds to indicate trading conditions (Long, Short, or Neutral) for quick interpretation.
Dynamic Table Display
Displays trading position alongside graphical indicators (rocket for Long, snowflake for Short, and star for Neutral) in a customizable table.
Offers flexibility in table placement and size for user preference.
How to Use
Parameter Configuration
Adjust parameters like fast length, slow length, and signal smoothing to fine-tune MACD calculations.
Select desired timeframes for analysis based on trading preferences and market conditions.
Interpretation
Monitor the relationship between MACD and Signal Line on the price chart.
Pay attention to color-coded backgrounds and graphical indicators in the table for actionable insights.
Decision Making
Consider entering Long positions when MACD is above the Signal Line and vice versa for Short positions.
Exercise caution during Neutral conditions, as there may be uncertainty in market direction.
Risk Management
Combine MTF MACD analysis with risk management strategies to optimize trade entries and exits.
Set stop-loss and take-profit levels based on individual risk tolerance and market conditions.
Conclusion
The Multi Timeframe Moving Average Convergence Divergence (MTF MACD) indicator offers a robust framework for traders to analyze market trends across multiple timeframes efficiently. By combining MACD insights from various time horizons and presenting them in a clear and actionable format, it empowers traders to make informed decisions and enhance their trading strategies.
Disclaimer
The Multi Timeframe Moving Average Convergence Divergence (MTF MACD) indicator provided here is intended for educational and informational purposes only. Trading in financial markets involves risk, and past performance is not indicative of future results. The use of this indicator does not guarantee profits or prevent losses.
Please be aware that trading decisions should be made based on your own analysis, risk tolerance, and financial situation. It is essential to conduct thorough research and seek advice from qualified financial professionals before engaging in any trading activity.
The MTF MACD indicator is a tool designed to assist traders in analyzing market trends and identifying potential trading opportunities. However, it is not a substitute for sound judgment and prudent risk management.
By using this indicator, you acknowledge that you are solely responsible for your trading decisions, and you agree to indemnify and hold harmless the developer and distributor of this indicator from any losses, damages, or liabilities arising from its use.
Trading in financial markets carries inherent risks, and you should only trade with capital that you can afford to lose. Exercise caution and discretion when implementing trading strategies, and consider seeking independent financial advice if necessary.
Multi Timeframe Relative Strength Index {DCAquant}Overview
The Multi Timeframe Relative Strength Index (MTF RSI) is a powerful technical analysis tool designed to provide insights into market momentum and potential trend reversals across multiple timeframes. Leveraging the Relative Strength Index (RSI) formula, this indicator offers traders a comprehensive view of market sentiment and identifies overbought and oversold conditions.
Key Features
RSI Calculation:
Utilizes the standard RSI calculation formula to measure the magnitude of recent price changes and assess the strength of market trends.
Employs a user-defined length parameter to customize the sensitivity of the RSI calculation based on trading preferences.
Multiple Timeframe Analysis:
Allows traders to analyze RSI values across up to six different timeframes, ranging from minutes to days, providing a holistic perspective on market dynamics.
Calculates RSI values independently for each selected timeframe, enabling comparison and trend identification.
Threshold Levels:
Defines overbought and oversold levels to highlight potential reversal points in market trends.
Offers flexibility in adjusting threshold levels based on individual risk tolerance and trading strategies.
Neutral Zone:
Establishes upper and lower neutral thresholds to identify periods of consolidation or sideways movement in price.
Helps traders distinguish between trending and ranging market conditions for more accurate analysis.
Moving Average Smoothing:
Provides the option to apply moving average smoothing to aggregated RSI values for enhanced clarity and reduced noise.
Enables smoother visualization of RSI trends, facilitating easier interpretation for traders.
Visual Representation:
Plots the aggregated MTF RSI values on the price chart, allowing traders to visually assess market momentum and potential reversal points.
Utilizes color-coded backgrounds to indicate Long, Short, or Neutral conditions for quick identification.
Dynamic Table Display:
Displays trading signals alongside graphical indicators (rocket for Long, snowflake for Short, and star for Neutral) in a customizable table format.
Offers flexibility in table placement and size to accommodate user preferences.
How to Use:
Parameter Configuration:
Adjust the length parameter to fine-tune the sensitivity of the RSI calculation based on the desired timeframe and trading strategy.
Define overbought and oversold levels to identify potential reversal points in market trends.
Customize upper and lower neutral thresholds to differentiate between trending and ranging market conditions.
Interpretation:
Monitor the aggregated MTF RSI values plotted on the price chart for signals of overbought or oversold conditions.
Pay attention to color-coded backgrounds and graphical indicators in the table for actionable trading insights.
Trading Strategy:
Consider entering Long positions when the aggregated MTF RSI is above the upper neutral threshold, indicating potential bullish momentum.
Evaluate Short opportunities when the aggregated MTF RSI falls below the lower neutral threshold, signaling possible bearish momentum.
Exercise caution during Neutral conditions, as there may be uncertainty in market direction.
Risk Management:
Combine MTF RSI analysis with robust risk management strategies, including stop-loss and take-profit levels, to manage trading risks effectively.
Practice prudent risk management and trade within your risk tolerance to minimize potential losses.
Disclaimer
Trading in financial markets involves risk, and past performance is not indicative of future results. The use of the MTF RSI indicator does not guarantee profits or prevent losses. Traders should conduct their own analysis, exercise caution, and seek advice from qualified financial professionals before making trading decisions.
Market Slayer (i)Market Slayer (i)
This script is designed to provide insights into market trends and generate trading signals based on a combination of moving average crossovers and trend confirmation. It aims to assist traders in identifying potential entry and exit points in the market.
Input Parameters:
Trend Timeframe: Allows the user to specify the timeframe for trend analysis. Default is set to W (weekly).
Trend Value: Defines the sensitivity of the trend detection algorithm.
Short SMA Length: Length of the short-term Simple Moving Average (SMA).
Long SMA Length: Length of the long-term Simple Moving Average (SMA).
Bullish Color: Color representation for bullish signals.
Bearish Color: Color representation for bearish signals.
Take Profit Color: Color representation for take profit events.
Simple Moving Average (SMA) Logic:
Two SMAs are calculated based on the provided lengths: one short-term and one long-term.
Short-term SMA values are plotted with a semi-transparent bearish color.
Long-term SMA values are plotted with a semi-transparent bullish color.
Trend Logic:
The script employs a modified SSL (Schaff Trend Cycle) indicator to determine the trend direction.
Trend direction is determined based on whether the closing price is above or below the SSL (Schaff Trend Cycle) indicator.
Trend changes are detected by comparing the current trend direction with the previous two trend directions.
Signal Logic:
Buy signals are generated when the short-term SMA crosses above the long-term SMA and the trend is bullish.
Sell signals are generated when the short-term SMA crosses below the long-term SMA and the trend is bearish.
Signals are confirmed only if there is no open position.
Take Profit Logic:
Take profit events are triggered when the trend changes direction after a position has been opened.
Take profit events are confirmed only if there is an open position.
Alerts:
Various alerts are included to notify traders of different events such as signal generation, take profit opportunities, and trend changes.
Usage of lookahead:
Within the script, the lookahead argument is utilized in the request.security() function to control how much historical data should be loaded for trend analysis.
Setting lookahead=barmerge.lookahead_on enables the script to consider future price movements when calculating trend conditions.
This functionality can enhance the accuracy of trend detection by incorporating future bars into the analysis.
Usage:
Traders can use this script on the TradingView platform to visualize market trends, identify potential entry and exit points, and receive timely alerts for trading opportunities.
Investify360 ICT IndicatorThe Investify360 ICT Indicator is designed to follow the ICT (Inner Circle Trader) strategy. It provides essential buy and sell signals based on price movements relative to a simple moving average (SMA). The indicator is built to be beginner-friendly with clear labels and color-coded signals.
Key Features
Simple Moving Average (SMA):
The script calculates a simple moving average based on a user-defined period (length), defaulting to 14 periods. This moving average helps smooth out price data and identify trends.
Buy and Sell Signals:
Buy Signal: A buy signal is generated when the current price (src, defaulting to the close price) crosses above the SMA. This event is typically interpreted as a potential upward trend.
Sell Signal: A sell signal is generated when the current price crosses below the SMA. This event is often interpreted as a potential downward trend.
These signals are visually represented on the chart with up and down labels respectively.
Labels and Colors:
Buy Signal: Displayed with an up label (BUY) in green color.
Sell Signal: Displayed with a down label (SELL) in red color.
The colors for these signals can be customized through the script inputs (buyColor and sellColor).
Beginner-Friendly Labels:
To assist beginners, the script includes a label at the start of the chart indicating the position of the moving average line (MA Line). This label is shown on the first bar to clarify the purpose of the plotted line.
Plotting the Moving Average:
The SMA is plotted on the chart with a yellow line, making it easily distinguishable. The moving average line helps traders visualize the trend direction.
Grid TraderGrid Trader Indicator ( GTx ):
Overview
The Grid Trader Indicator is a tool that helps traders visualize key levels within a specified trading range. The indicator plots accumulation and distribution levels, an entry level, an exit level, and a midpoint. This guide will help you understand how to use the indicator and its features for effective grid trading.
Basics of Trading Range, Grid Buy, and Grid Sell
Trading Range
A trading range is the horizontal price movement between a defined upper ( resistance ) and lower ( support ) level over a period of time. When a security trades within a range, it repeatedly moves between these two levels without trending upwards or downwards significantly. Traders often use the trading range to identify potential buy and sell points:
Upper Level (Resistance): This is the price level at which selling pressure overcomes buying pressure, preventing the price from rising further.
Lower Level (Support): This is the price level at which buying pressure overcomes selling pressure, preventing the price from falling further.
Grid Trading Strategy
Grid trading is a type of trading strategy that involves placing buy and sell orders at predefined intervals around a set price. It aims to profit from the natural market volatility by buying low and selling high in a range-bound market. The strategy divides the trading range into several grid levels where orders are placed.
Grid Buy
Grid buy orders are placed at intervals below the current price . When the price drops to these levels, buy orders are triggered . This strategy ensures that the trader buys more as the price falls, potentially lowering the average purchase price .
Grid Sell
Grid sell orders are placed at intervals above the current price . When the price rises to these levels, sell orders are triggered . This ensures that the trader sells portions of their holdings as the price increases, potentially securing profits at higher levels .
Key Points of Grid Trading
Grid Size : The interval between each buy and sell order. This can be constant (e.g., $2 intervals) or variable based on certain conditions.
Accumulation Range : The lower part of the trading range where buy orders are placed.
Distribution Range : The upper part of the trading range where sell orders are placed.
Midpoint : The average price of the entry and exit levels, often used as a reference point for balance.
As the price moves up and down within this range, your buy orders will be triggered as the price drops and your sell orders will be triggered as the price rises. This allows you to accumulate more of the asset at lower prices and sell portions at higher prices, profiting from the price oscillations within the defined range. Grid trading can be particularly effective in a sideways market where there is no clear long-term trend. However, it requires careful monitoring and adjustment of grid levels based on market conditions to minimize risks and maximize returns .
Configuring the Indicator :
Once the indicator is added, you will see a settings icon next to it. Click on it to open the settings menu.
Adjust the Upper Level , Lower Level , Entry Level , and Exit Level to match your trading strategy and market conditions.
Set the Levels Visibility to control how many bars back the levels will be plotted.
Interpreting the Levels :
Accumulation Levels : These are plotted below the entry level and are potential buy zones. They are labeled as Accumulation Level 1, 2, and 3.
Distribution Levels : These are plotted above the exit level and are potential sell zones. They are labeled as Distribution Level 1, 2, and 3.
Upper Level : Marked in fuchsia, indicating the top boundary of the trading range.
Exit Level : Marked in yellow, indicating the level at which you plan to exit trades.
Midpoint : Marked in white, indicating the average of the entry and exit levels.
Entry Level : Marked in yellow, indicating the level at which you plan to enter trades.
Lower Level : Marked in aqua, indicating the bottom boundary of the trading range.
By visualizing key levels, you can make informed decisions on where to place buy and sell orders, potentially maximizing your trading profits through systematic grid trading.
Double Vegas SuperTrend Enhanced - Strategy [presentTrading]
█ Introduction and How It Is Different
The "Double Vegas SuperTrend Enhanced" strategy is a sophisticated trading system that combines two Vegas SuperTrend Enhanced. Very Powerful!
Let's celebrate the joy of Children's Day on June 1st! Enjoyyy!
BTCUSD LS performance
The strategy aims to pinpoint market trends with greater accuracy and generate trades that align with the overall market direction.
This approach differentiates itself by integrating volatility adjustments and leveraging the Vegas Channel's width to refine the SuperTrend calculations, resulting in a dynamic and responsive trading system.
Additionally, the strategy incorporates customizable take-profit and stop-loss levels, providing traders with a robust framework for risk management.
-> check Vegas SuperTrend Enhanced - Strategy
█ Strategy, How It Works: Detailed Explanation
🔶 Vegas Channel and SuperTrend Calculations
The strategy initiates by calculating the Vegas Channel, which is derived from a simple moving average (SMA) and the standard deviation (STD) of the closing prices over a specified window length. This channel helps in measuring market volatility and forms the basis for adjusting the SuperTrend indicator.
Vegas Channel Calculation:
- vegasMovingAverage = SMA(close, vegasWindow)
- vegasChannelStdDev = STD(close, vegasWindow)
- vegasChannelUpper = vegasMovingAverage + vegasChannelStdDev
- vegasChannelLower = vegasMovingAverage - vegasChannelStdDev
SuperTrend Multiplier Adjustment:
- channelVolatilityWidth = vegasChannelUpper - vegasChannelLower
- adjustedMultiplier = superTrendMultiplierBase + volatilityAdjustmentFactor * (channelVolatilityWidth / vegasMovingAverage)
The adjusted multiplier enhances the SuperTrend's sensitivity to market volatility, making it more adaptable to changing market conditions.
BTCUSD Local picture.
🔶 Average True Range (ATR) and SuperTrend Values
The ATR is computed over a specified period to measure market volatility. Using the ATR and the adjusted multiplier, the SuperTrend upper and lower levels are determined.
ATR Calculation:
- averageTrueRange = ATR(atrPeriod)
**SuperTrend Calculation:**
- superTrendUpper = hlc3 - (adjustedMultiplier * averageTrueRange)
- superTrendLower = hlc3 + (adjustedMultiplier * averageTrueRange)
The SuperTrend levels are continuously updated based on the previous values and the current market trend direction. The market trend is determined by comparing the closing prices with the SuperTrend levels.
Trend Direction:
- If close > superTrendLowerPrev, then marketTrend = 1 (bullish)
- If close < superTrendUpperPrev, then marketTrend = -1 (bearish)
🔶 Trade Entry and Exit Conditions
The strategy generates trade signals based on the alignment of both SuperTrends. Trades are executed only when both SuperTrends indicate the same market direction.
Entry Conditions:
- Long Position: Both SuperTrends must signal a bullish trend.
- Short Position: Both SuperTrends must signal a bearish trend.
Exit Conditions:
- Positions are exited if either SuperTrend reverses its trend direction.
- Additional conditions include holding periods and configurable take-profit and stop-loss levels.
█ Trade Direction
The strategy allows traders to specify the desired trade direction through a customizable input setting. Options include:
- Long: Only enter long positions.
- Short: Only enter short positions.
- Both: Enter both long and short positions based on the market conditions.
█ Usage
To utilize the "Double Vegas SuperTrend Enhanced" strategy, traders need to configure the input settings according to their trading preferences and market conditions. The strategy includes parameters for ATR periods, Vegas Channel window lengths, SuperTrend multipliers, volatility adjustment factors, and risk management settings such as hold days, take-profit, and stop-loss percentages.
█ Default Settings
The strategy comes with default settings that can be adjusted to fit individual trading styles:
- trade Direction: Both (allows trading in both long and short directions for maximum flexibility).
- ATR Periods: 10 for SuperTrend 1 and 5 for SuperTrend 2 (shorter ATR period results in more sensitivity to recent price movements).
- Vegas Window Lengths: 100 for SuperTrend 1 and 200 for SuperTrend 2 (longer window length results in smoother moving averages and less sensitivity to short-term volatility).
- SuperTrend Multipliers: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher multipliers lead to wider SuperTrend channels, reducing the frequency of trades).
- Volatility Adjustment Factors: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher adjustment factors increase the responsiveness to changes in market volatility).
- Hold Days: 5 (defines the minimum duration a position is held, ensuring trades are not exited prematurely).
- Take Profit: 30% (sets the target profit level to lock in gains).
- Stop Loss: 20% (sets the maximum acceptable loss level to mitigate risk).
Push and Exhaustion Strategy with VWAP and Moving AveragesOverview:
The Push and Exhaustion Strategy Indicator is a custom technical analysis tool designed to help traders identify potential market turning points by highlighting significant price movements (pushes) and subsequent periods of reduced momentum (exhaustion). This indicator also incorporates key moving averages (50-period and 200-period) and the Volume Weighted Average Price (VWAP) to provide additional context for trading decisions.
Components:
Push and Exhaustion Thresholds:
Push Threshold: Set at 1.5 by default. This means the price must increase by 50% or more compared to the previous close to signal a push.
Exhaustion Threshold: Set at 0.7 by default. This means the price must decrease by 30% or more compared to the previous close to signal exhaustion.
VWAP (Volume Weighted Average Price):
VWAP is plotted on the chart to provide an average price weighted by volume, giving insight into the true average price paid for an asset.
Moving Averages:
50-period Moving Average (MA): Plotted in blue, it helps identify the short-to-mid-term trend direction.
200-period Moving Average (MA): Plotted in orange, it helps identify the long-term trend direction.
How It Works:
Push Condition:
A push signal is generated when the current closing price is at least 1.5 times the previous closing price (pushThreshold).
Additionally, the closing price must be above the VWAP, indicating strong upward momentum.
When these conditions are met, a green triangle is plotted above the price bar.
Exhaustion Condition:
An exhaustion signal is generated when the current closing price is at most 0.7 times the previous closing price (exhaustionThreshold).
Additionally, the closing price must be below the VWAP, indicating weakened momentum and potential reversal.
When these conditions are met, a red triangle is plotted below the price bar.
Visualization:
The indicator plots green triangles above bars to indicate a push signal and red triangles below bars to indicate an exhaustion signal.
It also plots the 50-period and 200-period moving averages as blue and orange lines, respectively.
The VWAP is plotted as a purple line, showing the average price considering the trading volume.
Alerts:
The indicator includes optional alerts that notify the trader when a push or exhaustion signal is detected.
Usage:
Push Signals: Traders might use push signals to enter trades in the direction of strong momentum, typically buying in an uptrend.
Exhaustion Signals: Traders might use exhaustion signals to anticipate potential reversals, considering exiting positions or entering counter-trend trades.
Moving Averages: The 50-period and 200-period moving averages help provide context to the overall trend, aiding in decision-making.
VWAP: Being above or below the VWAP helps validate the strength of the price movement.
This indicator provides a comprehensive view of market momentum, aiding traders in making informed decisions by highlighting significant price moves and potential reversals within the context of prevailing trends.
Ichimoku Cloud w/ HelpersIchimoku Cloud w/ Helpers is your standard Ichimoku Cloud indicator with two additions.
Checkout TradingView's write up on the Ichimoku Cloud here .
The two additions added to this indicator are described below:
1 — A box is drawn centered on the current bar and stretching a length equal to the 'Senkou Span B Period'.
• The box encompasses the highest high and lowest low in that period.
2 — Two new lines are added.
• Green Line : Projection from the Lagging Line (Chikou Span) to the Span A line, indicating historical price action relative to future projected support/resistance.
• Red Line : Projection from the Kijun-sen (Base Line) to the Span B line, indicating medium-term trend direction relative to future projected support/resistance.
Use cases :
• The Box is simply a visual cue to draw your eye towards the area that the Ichimoku Cloud is currently attempting to analyze: Past, Present and Future.
• The green and red lines add a way to interpret the sentiment:
• Diverging Lines with Green Above Red --> Interpret as Bullish Sentiment
• Converging Lines with Green Crossing Above Red --> Interpret as Bullish reversal or strengthening
• Converging Lines with Green Crossing Below Red --> Interpret as Bearish reversal or weakening.
• Diverging Lines with Red Above Green --> Interpret as Bearish Sentiment
• Converging Lines with Red Crossing Below Green --> Interpret as Bullish reversal or weakening bearish trend.
Current limitations :
• Under settings -> Styles, the plotted lines don't allow the colors to be changed. A bug I'm trying to figure out.
Bugs?
Kindly report any issues you run into and I'll try to fix them promptly.
Thank you!
Volume Weighted Relative Strength Index (VWRSI) [AlgoAlpha]Volume Weighted Relative Strength Index 📈✨
The Volume Weighted Relative Strength Index (VWRSI) by AlgoAlpha enhances traditional RSI by incorporating volume weighting, providing a more nuanced view of market strength. It uses custom range detection to measure consolidation strength, applying dynamic scoring to highlight trend phases. The indicator includes customizable moving averages (SMA, EMA, WMA, VWMA) and color-coded visual cues for uptrends and downtrends. Additionally, it marks significant bullish and bearish trend points with symbols, making it easier to identify potential trading opportunities. This powerful tool helps traders make informed decisions by combining volume, price action, and trend analysis.
✨ Key Features :
📊 Volume-Weighted RSI : Combines RSI with volume for better accuracy.
🔄 Range Detection : Identifies consolidation phases.
🎨 Customizable MAs : Choose from various moving averages.
🔔 Alert Capabilities : Set notifications for trend points.
🚀 How to Use :
🛠 Add Indicator : Add the indicator to favorites, and customize the settings to suite your trading style.
📊 Analyze Market : Watch RSI and range score for trends.
🔔 Set Alerts : Get notified of bullish/bearish points.
✨ How It Works :
The Volume Weighted Relative Strength Index (VWRSI) combines traditional RSI with volume weighting to offer a more comprehensive view of market momentum. It calculates the RSI using the closing price, then weights it by volume to enhance the accuracy of the trend analysis. The indicator also includes a custom range detection feature that evaluates consolidation strength by dynamically scoring the RSI over a specified period. This scoring helps identify phases of strong trends and consolidations. Visual elements like color-coded trend fills and symbols for bullish and bearish points make it easier to spot key market movements and potential trading opportunities.
Stay ahead with VWRSI by AlgoAlpha! 📈💡
Clube 369 LTA Concepts: Session Breaks & NYSE, Sunday OpenThe "Limitless LTA: Session Breaks & Sunday Open" indicator is a simple tool designed to help traders better understand market timing and track the opening price of the trading week. Here's what you need to know:
What It Does:
Displays vertical lines on the chart to mark specific times of interest, usually 18:00 PM UTC-5 over the last four days.
Plots a line representing the price of the first candle of the trading week, typically on a Sunday.
Customization:
Users can customize the appearance of the vertical lines by adjusting style, width, and color preferences.
Benefits:
Provides a visual reference for significant timestamps and the Sunday open price.
Helps traders understand market sentiment and potential trends.
In summary, the "Limitless Timestamp & Sunday Open" indicator is an accessible tool for traders to track important market timings and price movements, enhancing market analysis and decision-making.
Sunday Open Fixed on all timeframes.
FiboSequFiboSequ: Fibonacci Sequence Marking
Leonardo Fibonacci was an Italian mathematician who lived in the 12th century. His real name was Leonardo of Pisa, but he is commonly known as "Fibonacci." Fibonacci is famous for introducing the Hindu-Arabic numeral system to the Western world. This system is the basis of the modern decimal number system we use today.
Fibonacci Sequence
The Fibonacci sequence is a series of numbers that frequently appears in mathematics and nature. The first two numbers in the sequence are 0 and 1, and each subsequent number is the sum of the two preceding numbers.
The sequence is as follows:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, ...
Fibonacci Time Zones:
Fibonacci time zones are used to identify potential turning points in the market at specific time intervals. These time zones correspond to the Fibonacci sequence in terms of consecutive days or weeks.
The Fibonacci sequence has a wide range of applications in both mathematics and nature. Leonardo Fibonacci's work has had a significant impact on the development of modern mathematics and numeral systems. In financial markets, the Fibonacci sequence and ratios are frequently used by technical analysts to predict and analyze market movements.
Description:
Overview:
The FiboSequ indicator marks significant days on a price chart based on the Fibonacci sequence. This can help traders identify potential turning points or areas of interest in the market. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, often found in nature and financial markets.
Fibonacci Sequence:
The sequence used in this indicator includes: 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, and 2584.
These numbers represent the days to be marked on the chart, highlighting possible significant market movements.
How It Works:
User Input:
Users can input the starting date (Year, Month, and Day) from which the Fibonacci sequence will begin to be calculated.
This allows flexibility and customization based on the trader's analysis needs.
Calculation:
The starting date is converted into a timestamp in seconds.
For each bar on the chart, the number of days since the starting date is calculated.
The indicator checks if the current day matches any of the Fibonacci sequence days, the previous day, or the next day.
In this indicator, Fibonacci numbers can be displayed on the chart as plus and minus 2 days. For example, for the 145th day, signals start to appear as 143,144 and 145. This is due to dates that sometimes coincide with weekends and public holidays.
Marking the Chart:
When a match is found, a label is placed above the bar indicating the day number from the Fibonacci sequence.
These labels are colored blue with white text for easy visibility.
Usage:
This indicator can be used on any timeframe and market to help identify potential areas where price might react.
It is especially useful for those who employ Fibonacci analysis in their trading strategy.
Example:
If the starting date is January 1, 2020, the indicator will mark significant Fibonacci days (e.g., 1, 3, 5, 8 days, etc.) on the chart from this date onward.
Community Guidelines Compliance:
This indicator adheres to TradingView's Pine Script community guidelines.
It provides customizable user inputs and does not violate any terms of use.
By using the FiboSequ indicator, traders can enhance their technical analysis by incorporating time-based Fibonacci levels, potentially leading to better market timing and decision-making.
Frequently Asked Questions (FAQ)
Q: What is the FiboSequ indicator?
A: The FiboSequ indicator is a technical analysis tool that marks significant days on a price chart based on the Fibonacci sequence. This indicator helps traders identify potential turning points or areas of interest in the market.
Q: What is the Fibonacci sequence and why is it important?
A: The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. The first two numbers are 0 and 1. This sequence frequently appears in nature and financial markets and is used in technical analysis to identify important support and resistance levels.
Q: How do the Fibonacci time zones in the indicator work?
A: Fibonacci time zones are used to identify potential market turning points at specific time intervals. The indicator calculates days based on the Fibonacci sequence (e.g., 1, 3, 5, 8 days, etc.) from the starting date and marks them on the chart.
Q: How can users set the starting date?
A: Users can input the starting date by specifying the year, month, and day. This sets the date from which the indicator begins its calculations, providing flexibility for user analysis.
Q: What do the labels in the indicator represent?
A: The labels mark specific days in the Fibonacci sequence. For example, 1st day, 3rd day, 5th day, etc. These labels are displayed in blue with white text for easy visibility.
Q: Which timeframes can I use the FiboSequ indicator on?
A: The FiboSequ indicator can be used on any timeframe. This includes daily, weekly, or monthly charts, as well as shorter timeframes.
Q: Which markets can the FiboSequ indicator be used in?
A: The FiboSequ indicator can be used in various financial markets, including stocks, forex, cryptocurrencies, commodities, and more.
Q: How can I achieve better market timing with the FiboSequ indicator?
A: The FiboSequ indicator helps identify potential market turning points using time-based Fibonacci levels. This can lead to better market timing and more informed trading decisions for traders.
-Please feel free to write your valuable comments and opinions. I attach importance to your valuable opinions so that I can improve myself.
Bull Market Drawdowns V1.0 [ADRIDEM]Bull Market Drawdowns V1.0
Overview
The Bull Market Drawdowns V1.0 script is designed to help visualize and analyze drawdowns during a bull market. This script calculates the highest high price from a specified start date, identifies drawdown periods, and plots the drawdown areas on the chart. It also highlights the maximum drawdowns and marks the start of the bull market, providing a clear visual representation of market performance and potential risk periods.
Unique Features of the New Script
Default Timeframe Configuration: Allows users to set a default timeframe for analysis, providing flexibility in adapting the script to different trading strategies and market conditions.
Customizable Bull Market Start Date: Users can define the start date of the bull market, ensuring the script calculates drawdowns from a specific point in time that aligns with their analysis.
Drawdown Calculation and Visualization: Calculates drawdowns from the highest high since the bull market start date and plots the drawdown areas on the chart with distinct color fills for easy identification.
Maximum Drawdown Tracking and Labeling: Tracks the maximum drawdown for each period and places labels on the chart to indicate significant drawdowns, helping traders identify and assess periods of higher risk.
Bull Market Start Marker: Marks the start of the bull market on the chart with a label, providing a clear reference point for the beginning of the analysis period.
Originality and Usefulness
This script provides a unique and valuable tool by combining drawdown analysis with visual markers and customizable settings. By calculating and plotting drawdowns from a user-defined start date, traders can better understand the performance and risks associated with a bull market. The script’s ability to track and label maximum drawdowns adds further depth to the analysis, making it easier to identify critical periods of market retracement.
Signal Description
The script includes several key visual elements that enhance its usefulness for traders:
Drawdown Area : Plots the upper and lower boundaries of the drawdown area, filling the space between with a semi-transparent color. This helps traders easily identify periods of market retracement.
Maximum Drawdown Labels : Labels are placed on the chart to indicate the maximum drawdown for each period, providing clear markers for significant drawdowns.
Bull Market Start Marker : A label is placed at the start of the bull market, marking the beginning of the analysis period and helping traders contextualize the drawdown data.
These visual elements help quickly assess the extent and impact of drawdowns within a bull market, aiding in risk management and decision-making.
Detailed Description
Input Variables
Default Timeframe (`default_timeframe`) : Defines the timeframe for the analysis. Default is 720 minutes
Bull Market Start Date (`start_date_input`) : The starting date for the bull market analysis. Default is January 1, 2023
Functionality
Highest High Calculation : The script calculates the highest high price on the specified timeframe from the user-defined start date.
```pine
var float highest_high = na
if (time >= start_date)
highest_high := na(highest_high ) ? high : math.max(highest_high , high)
```
Drawdown Calculation : Determines the drawdown starting point and calculates the drawdown percentage from the highest high.
```pine
var float drawdown_start = na
if (time >= start_date)
drawdown_start := na(drawdown_start ) or high >= highest_high ? high : drawdown_start
drawdown = (drawdown_start - low) / drawdown_start * 100
```
Maximum Drawdown Tracking : Tracks the maximum drawdown for each period and places labels above the highest high when a new high is reached.
```pine
var float max_drawdown = na
var int max_drawdown_bar_index = na
if (time >= start_date)
if na(max_drawdown ) or high >= highest_high
if not na(max_drawdown ) and not na(max_drawdown_bar_index) and max_drawdown > 10
label.new(x=max_drawdown_bar_index, y=drawdown_start , text="Max -" + str.tostring(max_drawdown , "#") + "%",
color=color.red, style=label.style_label_down, textcolor=color.white, size=size.normal)
max_drawdown := 0
max_drawdown_bar_index := na
else
if na(max_drawdown ) or drawdown > max_drawdown
max_drawdown := drawdown
max_drawdown_bar_index := bar_index
```
Drawdown Area Plotting : Plots the drawdown area with upper and lower boundaries and fills the area with a semi-transparent color.
```pine
drawdown_area_upper = time >= start_date ? drawdown_start : na
drawdown_area_lower = time >= start_date ? low : na
p1 = plot(drawdown_area_upper, title="Drawdown Area Upper", color=color.rgb(255, 82, 82, 60), linewidth=1)
p2 = plot(drawdown_area_lower, title="Drawdown Area Lower", color=color.rgb(255, 82, 82, 100), linewidth=1)
fill(p1, p2, color=color.new(color.red, 90), title="Drawdown Fill")
```
Current Maximum Drawdown Label : Places a label on the chart to indicate the current maximum drawdown if it exceeds 10%.
```pine
var label current_max_drawdown_label = na
if (not na(max_drawdown) and max_drawdown > 10)
current_max_drawdown_label := label.new(x=bar_index, y=drawdown_start, text="Max -" + str.tostring(max_drawdown, "#") + "%",
color=color.red, style=label.style_label_down, textcolor=color.white, size=size.normal)
if (not na(current_max_drawdown_label))
label.delete(current_max_drawdown_label )
```
Bull Market Start Marker : Places a label at the start of the bull market to mark the beginning of the analysis period.
```pine
var label bull_market_start_label = na
if (time >= start_date and na(bull_market_start_label))
bull_market_start_label := label.new(x=bar_index, y=high, text="Bull Market Start", color=color.blue, style=label.style_label_up, textcolor=color.white, size=size.normal)
```
How to Use
Configuring Inputs : Adjust the default timeframe and start date for the bull market as needed. This allows the script to be tailored to different market conditions and trading strategies.
Interpreting the Indicator : Use the drawdown areas and labels to identify periods of significant market retracement. Pay attention to the maximum drawdown labels to assess the risk during these periods.
Signal Confirmation : Use the bull market start marker to contextualize drawdown data within the overall market trend. The combination of drawdown visualization and maximum drawdown labels helps in making informed trading decisions.
This script provides a detailed view of drawdowns during a bull market, helping traders make more informed decisions by understanding the extent and impact of market retracements. By combining customizable settings with visual markers and drawdown analysis, traders can better align their strategies with the underlying market conditions, thus improving their risk management and decision-making processes.
EngulfScanEngulf Scan
Introduction:
The Engulf Scan indicator helps users identify bullish and bearish engulfing candlestick patterns on their charts. These patterns are often used as signals for trend reversals and are important indicators for traders. Engulf Scan signals are generated when an engulfing pattern is swallowed by another candlestick of the opposite color.The signal of a candle engulfment formation is generated when the 1st candle is engulfed by the 2nd candle and the 2nd candle is engulfed by the 3rd candle.
Features:
Bullish Engulfing Pattern: Indicates the start of an upward trend and typically signals that the market is likely to move higher.
Bearish Engulfing Pattern: Indicates the start of a downward trend and typically signals that the market is likely to move lower.
Color Coding: Users can customize the background colors for bullish and bearish engulfing patterns.
Usage Guide:
Adding the Indicator: Add the "Engulf Scan" indicator to your TradingView chart.
Color Settings: Choose your preferred colors for bullish and bearish engulfing patterns from the indicator settings.
Pattern Detection: View the engulfing patterns on the chart with the specified colors and symbols. These patterns help identify potential trend reversal points.
Parameters and Settings:
Bullish Engulfing Color: Background color for the bullish engulfing pattern.( Green)
Bearish Engulfing Color: Background color for the bearish engulfing pattern. (Red)
Examples:
Bullish Engulfing Example: On the chart below, you can see bullish engulfing patterns highlighted with a green background. (Green)
Bearish Engulfing Example: On the chart below, you can see bearish engulfing patterns highlighted with a red background. (Red)
Frequently Asked Questions (FAQ):
How are engulfing patterns detected?
Engulfing patterns are formed when a candlestick completely engulfs the previous candlestick. For a bullish engulfing pattern, a bullish candlestick follows a bearish one. For a bearish engulfing pattern, a bearish candlestick follows a bullish one.
Which timeframes work best with this indicator?
Engulfing patterns are generally more reliable on daily and higher timeframes, but you can test the indicator on different timeframes to see if it fits your trading strategy.
Can I detect a reversal or trend?
As can be seen in the image, it sometimes appears as a return signal and sometimes as a harbinger of an ongoing trend.But it may be a mistake to use the indicator only for these purposes. However, this indicator may not be sufficient when used alone. It can be combined with different indicators from the Tradingview library.
Updates and Changelog:
v1.0: Initial release. Added detection and color coding for bullish and bearish engulfing patterns.
-Please feel free to write your valuable comments and opinions. I attach importance to your valuable opinions so that I can improve myself.
market slayerInput Parameters:
Various input parameters allow customization of the strategy, including options to show trend confirmation, specify trend timeframes and values, set SMA lengths, enable take profit and stop loss, and define their respective values.
Calculations:
Simple Moving Averages (SMAs) are calculated based on the specified lengths.
Buy and sell signals are generated based on the crossover and crossunder of the short and long SMAs.
Confirmation Bars:
Functions are defined to determine bullish or bearish confirmation bars based on certain conditions.
These confirmation bars are used to confirm trend direction and generate additional signals.
Plotting:
SMAs are plotted on the chart.
Trend labels and signal markers are plotted based on the calculated conditions.
Trade Signals:
Buy and sell conditions are defined based on the crossover/crossunder of SMAs and confirmation of trend direction.
Strategy entries and exits are executed accordingly.
Take Profit and Stop Loss:
Optional take profit and stop loss functionality is included.
Trades are automatically closed when profit or loss thresholds are reached.
Closing Trades:
Trades are also closed based on changes in trend confirmation bars to ensure alignment with the overall market direction.
Alerts:
Alert conditions are defined for opening and closing trades, providing notifications when certain conditions are met.
Overall, this script aims to provide a systematic approach to trading by combining moving average crossovers with trend confirmation bars, along with options for risk management through take profit and stop loss orders. Users can customize various parameters to adapt the strategy to different market conditions and trading preferences.
The script uses the request.security() function with the lookahead parameter set to barmerge.lookahead_on to access data from a higher timeframe within the Pine Script on TradingView. Let's break down why it's used:
Higher Timeframe Analysis:
By default, Pine Script operates on the timeframe of the chart it's applied to. However, in trading strategies, it's common to incorporate signals or data from higher timeframes to confirm or validate signals generated on lower timeframes. This helps traders to align their trades with the broader market trend.
Trend Confirmation:
In this script, the confirmationTrendTimeframe parameter allows users to specify a higher timeframe for trend confirmation. The request.security() function fetches the data from this higher timeframe and applies the defined conditions to confirm the trend direction.
Lookahead Behavior:
The lookahead parameter set to barmerge.lookahead_on ensures that the script considers the most up-to-date information available on the higher timeframe when making trading decisions on the lower timeframe. This prevents the script from lagging behind or using outdated data, enhancing the accuracy of trend confirmation.
Usage in confirmationTrendBullish and confirmationTrendBearish:
These variables are assigned the values returned by the request.security() function, which represents the bullish or bearish trend confirmation based on the conditions applied to the data from the higher timeframe.
Breakouts with Tests & Retests [LuxAlgo]The Breakouts Tests & Retests indicator highlights tests and retests of levels constructed from detected swing points. A swing area of interest switches colors when a breakout occurs.
Users can control the sensitivity of the swing point detection and the width of the swing areas.
🔶 USAGE
When a Swing point is detected, an area of interest is drawn, colored green for a bullish swing and red when bearish.
A test is confirmed when the opening price is situated in the area of interest, and the closing price is above or below the area, depending on whether it is a bullish or bearish swing. Tests are highlighted with a solid-colored triangle.
A breakout is confirmed when the price closes in the opposite position, below or above the area, in which case the area will switch colors.
If the opening price is located within the area and the closing price closes outside the area, in the same direction as the breakout, this is considered a retest . Retests are highlighted with a hollow-colored triangle.
Note that tests/retests do not act on wicks. The main factor is that the opening price is in the area of interest, while the closing price is outside.
🔹 Area Of Interest Width
The user can adjust the width of the swing areas. Changing the " Width " is a fast and easy way to find different areas of interest.
A higher "Multiple" setting would return a wider area, allowing price to develop within it for a longer period of time and potentially provide later test signals.
When a swing area is broken, a higher "Width" setting can make it more complicated for the price to break it again, allowing a swing area to remain valid for a longer period of time thus potentially providing more retest signals.
🔶 DETAILS
Generally, only one bullish/bearish pattern can be active at a time. This means that no more than 1 bullish or bearish area will be active.
The " Display " settings, however, can help control how areas of different types are displayed.
Bullish AND Bearish: Both, bullish and bearish patterns can be drawn at the same time
Bullish OR Bearish: Only 1 bullish or 1 bearish pattern is drawn at a time
Bullish: Only bullish patterns
Bearish: Only bearish patterns
🔹 Test/Retest Labels
The user can adjust the settings so only the latest test/retest label is shown or set a minimum number of bars until the next test/retest can be drawn.
🔹 Maximum Bars
Users can set a limit of bars for when there is no test/retest in that period; the area of interest won't be updated anymore and will be available and ready for the next Swing.
An option for pulling the area back to the last retest is included.
🔶 SETTINGS
Display: Determines which swing areas are displayed by the indicator. See the "DETAILS" section for more information
Multiple: Adjusts the width of the areas of interest
Maximum Bars: Limit of bars for when there is no test/retest
Display Test/Retest Labels: Show all labels or just the last test/retest label associated with a swing area
Minimum Bars: Minimum bars required for a subsequent test/retest label are allowed to be displayed
Set Back To Last Retest: When after "Maximum Bars" no test/retest is found, place the right side of the area at the last test/retest
🔹 Swings
Left: x amount of wicks on the left of a potential Swing need to be higher/lower for a Swing to be confirmed.
Right: The number of wicks on the right of a potential swing needs to be higher/lower for a Swing to be confirmed.
🔹 Style
Bullish: color for test period (before a breakout) / retest period (after a breakout)
Bearish: color for test period (before a breakout) / retest period (after a breakout)
Label Size
Linear Regression Trend ChannelThe "Linear Regression Trend Channel" is a technical indicator designed to illustrate price trends and their volatility using linear regression. This indicator calculates the main linear regression line based on the user-defined period length and computes the standard deviation to form a trend channel.
Key Features:
- Linear Regression Calculation: Computes the linear regression line based on the selected price data source and the defined period length.
- Slope and Intercept Calculation: Calculates the slope and intercept of the linear regression line using the calcSlopeIntercept function.
- Deviation Channels: Adds standard deviation channels to the linear regression line to highlight potential support and resistance areas.
Settings
- Linear Regression Length: Specifies the length of the period for the linear regression calculation (default: 100).
- Linear Regression Source: Defines the data source for the linear regression calculation, such as close price, open price, etc. (default: close).
- Linear Regression Color: Sets the color of the linear regression line (default: gray).
- Show Price Labels: Option to display price labels on the horizontal lines (default: true).
How to Use
- Set the Linear Regression Length to define the period for regression calculation.
- Choose the Linear Regression Source to specify the price data (e.g., close, open).
- Enable or disable Show Price Labels based on whether you want to see price labels on the horizontal lines.
This Indicator helps identify dynamic support and resistance levels and potential market turning points.
Entry Fragger - Strategy
For basic instructions please visit my other script "Entry Fragger".
The Signal Logic is explained there.
v1.4:
- Added advanced backtesting with fully customizable entries.
- Fully automated Buy Signals (profitable).
- Adjustable timeframes for signal logic. (requested)
Every setting affects the accuracy and profitability greatly now, based on settings applied.
The strategy performs best on high timeframes with larger capital and no leverage.
Useless for Forex, but absolutely smashes stocks and crypto on mid to high timeframes.
Please read through my other scripts description.
Set values as preferred and try your assets.
It does NOT work on low timeframes and forex!
Hint: BTC 4H, Custom Timeframe 1h, Moon Mode and Show Sell Signals enabled, R2R: 2.
Weighted Moving Range with Trend Signals (WMR-TS)Weighted Moving Range with Trend Signals (WMR-TS)
Technical analysis involves analyzing statistical trends from trading activity , such as price movement and volume, to make trading decisions. Technical indicators are mathematical calculations based on the price, volume, or open interest of a security or contract. They are used by traders to analyze price movements and predict future market behavior. The WMR-TS indicator combines weighted moving averages and range calculations to identify key trading levels and generate buy/sell signals. It dynamically adjusts to market conditions, offering traders insights into potential support, resistance, and trend reversal points. Key levels are color-coded for quick interpretation. It utilizes weighted moving averages (WMA) and range calculations to determine these levels, making it a robust tool for both trending and ranging markets.
SUMMARY
Parameters :
WMA Length : Determines the length for the primary weighted moving average.
Highest High Length : Sets the period for calculating the highest high.
Lowest Low Length : Sets the period for calculating the lowest low.
Range Corrector : Adjusts the range calculation slightly for fine-tuning.
Top Level : Multiplier for determining the top level from the calculated range.
Bottom Level : Multiplier for determining the bottom level from the calculated range.
Levels Visibility : Sets how many recent bars will display the levels.
Trading Zones :
Short Area : Highlighted zone indicating potential shorting opportunities.
Long Area : Highlighted zone indicating potential buying opportunities.
The Levels :
Wave (Yellow): Midpoint of the calculated range, adjusted by WMA.
Top Level (Red): Calculated upper boundary of the trading range.
Sell Level (Pink): Intermediate sell level.
Resistance Level (Magenta): Immediate resistance level.
Support Level (Cyan): Immediate support level.
Buy Level (Light Green): Intermediate buy level.
Bottom Level (Dark Green): Calculated lower boundary of the trading range.
Interpreting the Signals :
Hammer Signal : Red circles above bars indicate potential sell signals.
Rocket Signal : Green circles below bars indicate potential buy signals.
KEY CONCEPTS
Highest High and Lowest Low :
These values represent the highest high ( HH ) and lowest low ( LL ) over a specified number of periods.
Support Level :
This is the lower boundary of the trading range. It is a price level where demand is strong enough to prevent the price from falling further. As the price approaches the support level, it is likely to bounce back up.
Resistance Level :
This is the upper boundary of the trading range. It is a price level where supply is strong enough to prevent the price from rising further. As the price approaches the resistance level, it is likely to pull back down.
THE USE OF MULTIPLIERS :
The script uses several multipliers to adjust and fine-tune the calculated support and resistance levels, as well as to control the range and sensitivity of these levels. Here is a detailed explanation of these multipliers and their purpose:
Range Corrector : This multiplier adjusts the calculated high ( H ) and low ( L ) levels, adding flexibility to how these levels are positioned relative to the highest high and lowest low. It ranges from -1 to 1 , with a default value of 0 . The use of positive values increase the range, making the calculated levels further apart. Thus, using negative values decrease the range, bringing the calculated levels closer together.
Top Level : This multiplier adjusts the distance of the top level from the calculated high H ) level. It fluctuates from 0 to 2 , with a default value of 0.382 . Higher values will push the top level further above the high level, while lower values will bring it closer.
Bottom Level : This multiplier adjusts the distance of the bottom support level from the calculated low support level. Ranging from 0 to 2, with a default value of 0.214, the higher values will push the bottom level further below the low level, while lower values will bring it closer.
The script plots the support and resistance levels on the chart, allowing traders to visualize the trading range. Color-coded zones are used to indicate areas where buying or selling opportunities may arise based on the current price relative to the trading range. A trading range refers to the area between a price's support and resistance levels over a specific period of time. Within this range, the price of the security fluctuates up and down but does not break out above the resistance or below the support. Support and resistance levels to make trading decisions. Buying near the support level and selling near the resistance level is a common strategy. When the price moves above the resistance level, it is called a breakout . A breakout often indicates that the price may start a new upward trend . Conversely, when the price moves below the support level, it is called a breakdown . A breakdown often indicates that the price may start a new downward trend . By understanding and utilizing trading ranges, traders can make more informed decisions, optimize their trading strategies, and manage risk more effectively.
Understanding Moving Averages
A moving average (MA) is a widely used technical indicator that helps smooth out price data by creating a constantly updated average price. The main purpose of using a moving average is to identify the direction of the trend and to reduce the "noise" of random price fluctuations. The Weighted Moving Average ( WMA ) assigns different weights to each period, with more recent periods typically given more weight. A 10-day WMA might give the most recent day a weight of 10, the second most recent day a weight of 9, and so on. It is useful for traders who want to emphasize recent price data more than older data. When the price is above the moving average, it suggests an Bullish trend . A Bearish Trend is expected to take place when the price is below the moving average. Understanding the price reactions around these levels can be used to make trading decisions.
APPLYING CONCEPTS
Support and Resistance Calculations in the Script :
The script calculates dynamic support and resistance levels using weighted moving averages ( WMA s) and the highest high and lowest low over specified periods. Buy ( Rocket ) and sell ( Hammer ) signals are generated based on the crossing of the price with calculated top and bottom levels.These signals help traders identify potential entry and exit points within the trading range .
Weighted Moving Average (WMA) Application in the Script
This script calculates a special trendWMA using the close price that helps in creating a more dynamic moving average that considers both high and low price actions. This modified WMA is used in conjunction with highest high and lowest low values over specified periods to calculate dynamic support and resistance levels.
Explanation of the Levels in the Script
By understanding these levels, traders can make more informed decisions about where to enter and exit trades, manage risk, and anticipate potential market movements. The script incorporates several key levels levels that traders can use to better anticipate price movements and make more informed trading decisions. Leveraging the principles of Fibonacci retracement ratios ( 23.6%, 38.2%, 50%, 61.8%, and 100% ) to identify key support and resistance zones can also serve for gauging the overall market sentiment.
Top Level and Sell Leve l: Used to identify potential resistance zones where the price may reverse or pause.
Support Level and Buy Level : Used to identify potential support zones where the price may bounce.
Upper and Lower Pivot Values : Serve as intermediate levels for possible price retracements or extensions within the trading range.
Wave Level : Indicates the central trend direction, which can be useful for gauging the overall market sentiment.
Alerts are a crucial part of the script as they notify traders of potential buy and sell signals based on predefined conditions. There are two main alerts: one for a " Hammer " signal (sell condition) and one for a " Rocket " signal (buy condition).
Adjust the input parameters to fit your trading style and the specific asset being analyzed. Shorter lengths may be more responsive to price changes but can produce more false signals , while longer lengths provide smoother signals but may lag . Always backtest the indicator on historical data to understand its behavior and performance. Also remember that different markets may require different parameter settings for optimal performance.
Keep in mind that by nature like all moving averages, WMAs lag behind price action. This means that signals may be delayed. The indicator performs differently in various market conditions. Always consider the overall market context when interpreting signals.
Adjusting parameters like the range corrector and visibility can help tailor the indicator to specific market conditions or trading strategies, improving its effectiveness. The script uses the calculated levels to plot lines and fill zones on the chart, helping traders visualize potential support, resistance, and trend reversal points. The use of multipliers allows for dynamic adjustment of these levels, making the indicator flexible and adaptable to different market conditions.
I think traders can make more informed decisions about where to enter and exit trades, manage risk, and anticipate potential market movements following this code. Stay safe and always remember that market is always changing. Use this tool if you want, please stay informed and plan safe trades,
D.
SMA DMA Crossing SignalSMA and DMA Crossing Buy Sell Signals
This script implements a Double Moving Average (DMA) strategy, a popular technical analysis technique used by traders to identify trends and potential buy/sell signals in financial markets.
**Description:**
The Double Moving Average strategy involves the calculation of two moving averages – a short-term moving average and a long-term moving average. In this script, we calculate these moving averages as follows:
1. **Short-term DMA (`dmaShort`):**
- Calculated using a 28-bar Simple Moving Average (SMA).
- Represents the shorter-term trend in the price movement.
2. **Long-term DMA (`dmaLong`):**
- Also calculated using a 28-bar SMA.
- Displaced backward by 14 bars (`dmaLong := request.security(syminfo.tickerid, "D", dmaLong )`), effectively creating a 28-bar SMA with a -14 bar displacement.
- Represents the longer-term trend in the price movement.
**Signals:**
Buy and sell signals are generated based on the crossing of the short-term DMA over or under the long-term DMA:
- **Buy Signal (`DMA BUY`):** Occurs when the short-term DMA crosses above the long-term DMA (`dmaBuySignal`).
- **Sell Signal (`DMA SELL`):** Occurs when the short-term DMA crosses below the long-term DMA (`dmaSellSignal`).
**How to Use:**
- **Buy Signal:** Consider entering a long position when the short-term DMA crosses above the long-term DMA, indicating a potential uptrend.
- **Sell Signal:** Consider exiting a long position or entering a short position when the short-term DMA crosses below the long-term DMA, indicating a potential downtrend.
This script provides a visual representation of the DMA crossover signals on the chart, helping traders identify potential entry and exit points in the market.
**Note:** It's important to combine DMA signals with other technical analysis tools and risk management strategies for informed trading decisions.
All comments are welcome..
Supply & Demand (MTF) | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Supply and Demand (MTF) Indicator! This new indicator renders Supply and Demand zones based on momentum candles. It can detect Supply and Demand zones across up to 3 diferent timeframes. It's capable of combining zones, retest & break labels and it's customizable with invalidation and style settings.
Features of the new Supply and Demand (MTF) Indicator:
Renders Supply and Demand Zones Across 3 Timeframes
Combination Of Overlapping Zones
Retest & Break Labels
Retest & Break Alerts
Enable / Disable Historic Zones
Visual Customizability
📌 HOW DOES IT WORK ?
Supply and Demand is a key concept in trading. It helps traders see the zones that market-makers buy & sell the asset in large amounts. It's detected by finding momentum candles (candles that have large bodies) in a row.
Momentum candles are defined to have a larger body than the average candle in the chart, and at least 4 of them in a row is required to draw a supply or demand zone. The zone is drawn from the high wick to low wick of two candles before the first momentum candle in the row.
Check this example :
These zones are usually where market makers trade the asset in larger amounts. Thus, they act as support & resistance zones by their nature. A retest of these zones can make the price bounce to the opposite direction, while a breakout usually means strong price action momentum is incoming in that direction. Supply zones indicate bearish momentum while demand zones indicate bullish momentum.
Check this example :
Here a Supply Zone (Bearish) forms. Then price comes back up to test the zone, and it fails to break. After the failed attemp, a stong bearish momentum takes the price back to a lower level. Then another test of the zone occurs and successfully breaks the zone this time. This breakout starts a bullish momentum that takes the price to a higher level.
🚩UNIQUENESS
This indicator provides Supply and Demand zones in your chart with pure simplicity. It supports up to 3 different timeframes as we believe supporting your trades with higher timeframes can improve your trading experience. It also gets rid of complexity by combining overlapping zones into a single zone, even if they are from different timeframes! You can also set-up alerts to get notified when a supply or demand zone is being retested, or is broken. Overall, this indicator is the ultimate kit for supply and demand zones.
⚙️SETTINGS
1. General Configuration
Max Distance To Last Bar -> The maximum distance that the indicator will render supply and demand zones from. Higher settings mean rendering older supply and demand zones.
Zone Invalidation -> Select between Wick & Close price for Supply and Demand Zone Invalidation.
Retests & Breaks -> Enable retest & break labels in your chart.
Show Historic Zones -> This will show historic supply & demand zones which are invalidated if enabled. You can disable this to only see active supply and demand zones for a simpler chart.
2. Timeframes
You can set up to 3 different timeframes and enable / disable them using the checkboxes in this section.