F.B_Volume Weighted Average Price MTFThe F.B_Volume Weighted Average Price MTF (VWAP MTF) indicator calculates the volume-weighted average price of a security across different timeframes. The VWAP is a powerful indicator used by both institutional and retail traders to make better trading decisions.
Functionality:
Timeframe:
The indicator allows you to adjust the timeframe for the VWAP calculation via the settings. By default, the timeframe is set to weekly ("W").
Restart at new timeframe:
At each new period in the chosen timeframe, the VWAP calculations are reset, and a new VWAP is calculated.
VWAP Calculation:
The VWAP is calculated by the volume-weighted average of the typical prices (High, Low, and Close) of the security. This calculation takes into account the volume of each transaction to provide an accurate average price.
Visualization:
The VWAP is displayed as a line on the chart, and the color of the line changes depending on the price position relative to the VWAP:
Green: The current closing price is above the VWAP (bullish signal).
Red: The current closing price is below the VWAP (bearish signal).
Options:
Show barcolors:
This option allows you to display the colors of the candles based on their position relative to the VWAP (green for bullish, red for bearish).
Show previous VWAP close:
This option shows the closing value of the VWAP from the previous period to provide historical reference points.
Interpretation:
Bullish Signal:
If the current price is above the VWAP, this indicates that the market trend is upward, which could be considered a buying opportunity.
Bearish Signal:
If the current price is below the VWAP, this indicates that the market trend is downward, which could be considered a selling signal.
Trend Analysis
Cot Histogram | MercorCot Histogram | Mercor
Overview:
The Cot Histogram | Mercor indicator provides a comprehensive visualization of the Commitment of Traders (COT) report data using bar charts. This indicator is designed to help traders analyze the positions held by commercial traders and large speculators in various markets. By representing the data as histograms, traders can easily interpret the long and short positions, as well as the net positions of these market participants.
Originality:
What sets the Cot Histogram | Mercor indicator apart is its unique approach to visualizing COT data using bar charts instead of traditional line charts. This method offers a clearer representation of the data, making it easier for traders to spot trends and changes in market sentiment. Additionally, the indicator allows for customization of colors and bar widths, providing a tailored experience for each user.
Features:
Show Shorts as Negative Numbers: This option allows users to display short positions as negative values, providing a more intuitive visualization.
Invert Colors: Users can invert the default colors for long and short positions, enabling better contrast and visual preference.
Bar Width: Adjust the width of the histogram bars to suit personal preferences and chart aesthetics.
Concepts Underlying the Calculations:
The Commitment of Traders (COT) report is a weekly publication by the Commodity Futures Trading Commission (CFTC) that provides a breakdown of the open interest positions of market participants in futures markets. This indicator focuses on two main categories of traders:
Commercial Traders: These are entities involved in the production, processing, or merchandising of a commodity. Their positions are typically hedging-oriented.
Large Speculators: These include institutional investors, hedge funds, and other entities that take positions based on market trends and expectations, often for speculative purposes.
The indicator calculates and plots the following metrics:
Commercial Long: The number of long positions held by commercial traders.
Commercial Short: The number of short positions held by commercial traders.
Commercial Net: The difference between commercial long and short positions.
Large Speculators Long: The number of long positions held by large speculators.
Large Speculators Short: The number of short positions held by large speculators.
Large Speculators Net: The difference between long and short positions of large speculators.
How to Use:
Load the Indicator: Add the Cot Histogram | Mercor indicator to your TradingView chart.
Customize Settings: Adjust the settings according to your preferences:
Enable or disable the "Show Shorts as Negative Numbers" option.
Invert the colors if needed.
Adjust the bar width for better visual representation.
Interpret the Data: Use the histograms to analyze the market positions:
Commercial Long and Short: Observe the positions held by commercial traders. Increasing long positions may indicate hedging against potential price increases, while increasing short positions may suggest hedging against potential price decreases.
Large Speculators Long and Short: Monitor the positions of large speculators to gauge market sentiment. A rise in long positions by large speculators often indicates bullish sentiment, while a rise in short positions suggests bearish sentiment.
Net Positions: The net positions provide a clearer picture of the overall stance of commercial traders and large speculators.
Example:
If you notice that commercial traders are increasing their long positions while large speculators are increasing their short positions, it may indicate a divergence in market expectations between hedgers and speculators. This could be a signal to further investigate potential market reversals or confirm existing trends.
By leveraging the Cot Histogram | Mercor indicator, traders can gain valuable insights into market dynamics, improve their trading strategies, and make more informed decisions. Whether you are a long-term investor or a short-term trader, understanding the positions of different market participants can provide a significant edge in the markets.
Auto Gann KEYLVLS "Auto Gann KEYLVLS" indicator can be a valuable tool for traders, especially those who employ Gann theory in their analysis. Here are some ways to effectively use this indicator:
Identifying Key Price Levels: Gann lines are known for their ability to identify key support and resistance levels. Use the plotted Gann lines to identify significant price levels where the market may react.
Confirmation of Trend Reversals: When price approaches a Gann line, observe how the price reacts. A bounce off a Gann line can confirm the continuation of the trend, while a break of a Gann line may indicate a potential trend reversal.
Entry and Exit Points: Gann lines can serve as entry and exit points for trades. Look for confluence between Gann lines and other technical indicators or patterns to identify high-probability trade setups.
Trading with the Trend: In an uptrend, consider buying opportunities near Gann support levels, while in a downtrend, look for selling opportunities near Gann resistance levels.
Risk Management: Use Gann lines to set stop-loss and take-profit levels. Place stop-loss orders below Gann support levels for long trades and above Gann resistance levels for short trades to manage risk effectively.
Timeframe Analysis: Utilize the flexibility of this indicator to plot Gann lines on different timeframes. Compare Gann lines across multiple timeframes to identify alignment or divergence, which can provide additional confirmation for trading decisions.
Combination with Other Indicators: Combine the information provided by Gann lines with other technical indicators, such as moving averages, RSI, or MACD, to strengthen your trading decisions.
Input Parameters:
The script defines several input parameters that control the behavior of the Gann lines, such as the number of weeks to look back for highs and lows, the number of Gann lines to plot, line extension settings, and options to show or hide specific Gann lines like .25, .37, .50, .63, and .75.
Auto Gann Functionality:
The script calculates the highest high and lowest low for the specified number of weeks, hours, and minutes.
It then calculates quartile levels (0.25, 0.50, 0.75) based on the weekly high and low.
Gann lines are drawn based on these levels, with options to extend them left and/or right.
Labels are added to the Gann lines indicating their values.
Weekly Gann Lines:
The script plots Gann lines and labels based on the weekly high and low levels.
Labels are added to these lines indicating their values.
Sub Gann Lines:
Additional Gann lines are plotted based on the weekly high and low levels, with subdivisions for lower timeframes like H4, H1, M15, and M1.
Label Management:
Labels are managed based on user preferences, including options to show labels once on the left side, redraw labels on the right side, or not show labels at all.
BBTrend w SuperTrend decision - Strategy [presentTrading]This strategy aims to improve upon the performance of Traidngview's newly published "BB Trend" indicator by incorporating the SuperTrend for better trade execution and risk management. Enjoy :)
█Introduction and How it is Different
The "BBTrend w SuperTrend decision - Strategy " is a trading strategy designed to identify market trends using Bollinger Bands and SuperTrend indicators. What sets this strategy apart is its use of two Bollinger Bands with different lengths to capture both short-term and long-term market trends, providing a more comprehensive view of market dynamics. Additionally, the strategy includes customizable take profit (TP) and stop loss (SL) settings, allowing traders to tailor their risk management according to their preferences.
BTCUSD 4h Long Performance
█ Strategy, How It Works: Detailed Explanation
The BBTrend strategy employs two key indicators: Bollinger Bands and SuperTrend.
🔶 Bollinger Bands Calculation:
- Short Bollinger Bands**: Calculated using a shorter period (default 20).
- Long Bollinger Bands**: Calculated using a longer period (default 50).
- Bollinger Bands use the standard deviation of price data to create upper and lower bands around a moving average.
Upper Band = Middle Band + (k * Standard Deviation)
Lower Band = Middle Band - (k * Standard Deviation)
🔶 BBTrend Indicator:
- The BBTrend indicator is derived from the absolute differences between the short and long Bollinger Bands' lower and upper values.
BBTrend = (|Short Lower - Long Lower| - |Short Upper - Long Upper|) / Short Middle * 100
🔶 SuperTrend Indicator:
- The SuperTrend indicator is calculated using the average true range (ATR) and a multiplier. It helps identify the market trend direction by plotting levels above and below the price, which act as dynamic support and resistance levels. * @EliCobra makes the SuperTrend Toolkit. He is GOAT.
SuperTrend Upper = HL2 + (Factor * ATR)
SuperTrend Lower = HL2 - (Factor * ATR)
The strategy determines market trends by checking if the close price is above or below the SuperTrend values:
- Uptrend: Close price is above the SuperTrend lower band.
- Downtrend: Close price is below the SuperTrend upper band.
Short: 10 Long: 20 std 2
Short: 20 Long: 40 std 2
Short: 20 Long: 40 std 4
█ Trade Direction
The strategy allows traders to choose their trading direction:
- Long: Enter long positions only.
- Short: Enter short positions only.
- Both: Enter both long and short positions based on market conditions.
█ Usage
To use the "BBTrend - Strategy " effectively:
1. Configure Inputs: Adjust the Bollinger Bands lengths, standard deviation multiplier, and SuperTrend settings.
2. Set TPSL Conditions: Choose the take profit and stop loss percentages to manage risk.
3. Choose Trade Direction: Decide whether to trade long, short, or both directions.
4. Apply Strategy: Apply the strategy to your chart and monitor the signals for potential trades.
█ Default Settings
The default settings are designed to provide a balance between sensitivity and stability:
- Short BB Length (20): Captures short-term market trends.
- Long BB Length (50): Captures long-term market trends.
- StdDev (2.0): Determines the width of the Bollinger Bands.
- SuperTrend Length (10): Period for calculating the ATR.
- SuperTrend Factor (12): Multiplier for the ATR to adjust the SuperTrend sensitivity.
- Take Profit (30%): Sets the level at which profits are taken.
- Stop Loss (20%): Sets the level at which losses are cut to manage risk.
Effect on Performance
- Short BB Length: A shorter length makes the strategy more responsive to recent price changes but can generate more false signals.
- Long BB Length: A longer length provides smoother trend signals but may be slower to react to price changes.
- StdDev: Higher values create wider bands, reducing the frequency of signals but increasing their reliability.
- SuperTrend Length and Factor: Shorter lengths and higher factors make the SuperTrend more sensitive, providing quicker signals but potentially more noise.
- Take Profit and Stop Loss: Adjusting these levels affects the risk-reward ratio. Higher take profit percentages can increase gains but may result in fewer closed trades, while higher stop loss percentages can decrease the likelihood of being stopped out but increase potential losses.
ICT KillZones Hunt [TradingFinder] 4 Sessions + OB + FVG + Alert🔵 Introduction
🟣 ICT
The "ICT" style is a subset of "Price Action" technical analysis. The primary goal of the ICT trading strategy is to merge "Price Action" with the "Smart Money" concept to pinpoint optimal trade entry points.
However, this approach's strength extends beyond merely finding entry points. It also helps traders gain a deeper understanding of price behavior and adapt their trading strategies to the market structure.
The most important concepts of "ICT" :
Order Block
Fair Value Gap(FVG)
Liquidity
🟣 Session
Financial markets are divided into several time periods, each featuring distinct characteristics and levels of activity. These periods, known as sessions, are active at different times during the day.
The primary active sessions in financial markets include :
Asian Session
European Session
New York Session
Based on the UTC time zone, the schedule for these key sessions is :
Asian Session: 23:00 to 06:00
European Session: 07:00 to 16:30
New York Session: 13:00 to 22:00
Note
To avoid session overlap and minimize interference during kill zones, the session times have been modified as follows :
Asian Session: 23:00 to 06:00
European Session: 07:00 to 14:25
New York Session: 14:30 to 22:55
🟣 KillZone
Kill zones are periods within a session where trader activity spikes. During these times, trading volume surges, and price movements become more pronounced.
The major kill zones, according to the UTC time zone, are as follows :
Asian Kill Zone: 23:00 to 03:55
European Kill Zone: 07:00 to 09:55
New York Morning Kill Zone: 14:30 to 16:55
New York Evening Kill Zone: 19:30 to 20:55
🔵 How to Use
🟣 Order Block
Order blocks are a distinct category of "Supply and Demand" zones, formed when a series of orders are grouped together. These blocks are often created by banks or other significant market participants.
Banks typically execute large orders in blocks during their trading sessions. If they were to enter the market with small quantities, substantial price movements would occur before the orders were fully executed, reducing potential profit.
To mitigate this, they divide their orders into smaller, more manageable positions. Traders should seek "buy" opportunities in "demand order blocks" and "sell" opportunities in "supply order blocks."
🟣 Fair Value Gap (FVG)
To pinpoint the "Fair Value Gap" on the chart, meticulous candle-by-candle analysis is essential. Pay close attention to candles with significant bodies, examining each candle alongside the one preceding it.
The candles flanking this central candle should exhibit elongated shadows, with bodies that do not intersect the body of the central candle. The span between the shadows of the first and third candles is referred to as the FVG range.
Note :
The origin of all Order Blocks and FVGs starts from inside a kill zone and extends up to the end of the same session.
🟣 Kill Zone Hunt
Following this strategy, after the conclusion of the kill zone and the stabilization of its high and low lines, if the price touches either of these lines within the same session and encounters a robust rejection, it presents an opportunity to enter a trade.
🔵 Setting
🟣 Global Setting
Show All Order Block :
If it is turned off, only the last Order Block will be displayed.
Show All FVG :
If it is turned off, only the last FVG will be displayed.
Show More Info Session :
If it is turned on, more information about kill zones (Trade Volume, Time, Number of Candles) will be displayed.
🟣 Logic Parameter
Pivot Period of Order Blocks Detector :
Enter the desired pivot period to identify the Order Block.
Order Block Validity Period (Bar) :
You can specify the maximum time the Order Block remains valid based on the number of candles from the origin.
Mitigation Level Order Block :
Determining the basic level of a block order. When the price hits the basic level, the order block due to mitigation.
🟣 Order Blocks Display
Demand Order Block :
Show or not show and specify color.
Supply order Block :
Show or not show and specify color.
🟣 Order Block Refinement
Refine Demand OB :
Enable or disable the refinement feature. Mode selection.
Refine Supply OB :
Enable or disable the refinement feature. Mode selection.
🟣 FVG
FVG Validity Period (Bar) :
You can specify the maximum time the FVG remains valid based on the number of candles from the origin.
Mitigation Level FVG :
Determining the basic level of a FVG. When the price hits the basic level, the FVG due to mitigation.
Show Demand FVG :
Show or not show and specify color.
Show Supply FVG :
Show or not show and specify color.
FVG Filter :
Enable or disable filtering of FVGs. Select filter mode.
🟣 Session
Show More Info Session Color
Asia Session, London Sesseion, New York am Session & New York pm Session :
Show or not show session and kill zones. Change the display color.
🟣 Alert
Send Alert When Touched Session high & Low :
On / Off
Alert Demand OB Mitigation :
On / Off
Alert Supply OB Mitigation :
On / Off
Alert Demand FVG Mitigation :
On / Off
Alert Supply FVG Mitigation :
On / Off
Message Frequency :
This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone :
The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
Display More Info :
Displays information about the price range of the order blocks (Zone Price) and the date, hour, and minute under "Display More Info". If you do not want this information to appear in the received message along with the alert, you should set it to "Off".
ATH/ATL Tracker [LuxAlgo]The ATH/ATL Tracker effectively displays changes made between new All-Time Highs (ATH)/All-Time Lows (ATL) and their previous respective values, over the entire history of available data.
The indicator shows a histogram of the change between a new ATH/ATL and its respective preceding ATH/ATL. A tooltip showing the price made during a new ATH/ATL alongside its date is included.
🔶 USAGE
By tracking the change between new ATHs/ATLs and older ATHs/ATLs, traders can gain insight into market sentiment, breadth, and rotation.
If many stocks are consistently setting new ATHs and the number of new ATHs is increasing relative to old ATHs, it could indicate broad market participation in a rally. If only a few stocks are reaching new ATHs or the number is declining, it might signal that the market's upward momentum is decreasing.
A significant increase in new ATHs suggests optimism and willingness among investors to buy at higher prices, which could be considered a positive sentiment. On the other hand, a decrease or lack of new ATHs might indicate caution or pessimism.
By observing the sectors where stocks are consistently setting new ATHs, users can identify which sectors are leading the market. Sectors with few or no new ATHs may be losing momentum and could be identified as lagging behind the overall market sentiment.
🔶 DETAILS
The indicator's main display is a histogram-style readout that displays the change in price from older ATH/ATLs to Newer/Current ATH/ATLs. This change is determined by the distance that the current values have overtaken the previous values, resulting in the displayed data.
The largest changes in ATH/ATLs from the ticker's history will appear as the largest bars in the display.
The most recent bars (depending on the selected display setting) will always represent the current ATH or ATL values.
When determining ATH & ATL values, it is important to filter out insignificant highs and lows that may happen constantly when exploring higher and lower prices. To combat this, the indicator looks to a higher timeframe than your chart's timeframe in order to determine these more significant ATHs & ATLs.
For Example: If a user was on a 1-minute chart and 5 highs-new highs occur across 5 adjacent bars, this has the potential to show up as 5 new ATHs. When looking at a higher timeframe, 5 minutes, only the highest of the 5 bars will indicate a new ATH. To assist with this, the indicator will display warnings in the dashboard when a suboptimal timeframe is selected as input.
🔹 Dashboard
The dashboard displays averages from the ATH/ATL data to aid in the anticipation and expectations for new ATH/ATLs.
The average duration is an average of the time between each new ATH/ATL, in this indicator it is calculated in "Days" to provide a more comprehensive understanding.
The average change is the average of all change data displayed in the histogram.
🔶 SETTINGS
Duration: The designated higher timeframe to use for filtering out insignificant ATHs & ATLs.
Order: The display order for the ATH/ATL Bars, Options are to display in chronological (oldest to newest) or reverse chronological order (newest to oldest).
Bar Width: Sets the width for each ATH/ATL bar.
Bar Spacing: Sets the # of empty bars in between each ATH/ATL bar.
Dashboard Settings: Parameters for the dashboard's size and location on the chart.
Death Cross and Golden Cross HighlighterOverview
The script is designed to visually indicate the occurrence of Death Cross and Golden Cross events on a TradingView chart. It achieves this by calculating two moving averages (short-term and long-term) and plotting them on the chart. It then detects when these moving averages cross and highlights these points with labels and background colors.
Inputs
The script begins by defining input parameters:
- Short Moving Average Length: This is set to 50 by default, representing the short-term moving average period.
- Long Moving Average Length: This is set to 200 by default, representing the long-term moving average period.
These inputs allow users to customize the lengths of the moving averages according to their trading strategy.
Moving Averages Calculation
The script calculates two simple moving averages (SMAs) based on the closing prices:
- Short Moving Average (shortMA): Calculated over the short-term period specified by the user.
- Long Moving Average (longMA): Calculated over the long-term period specified by the user.
Plotting the Moving Averages
The moving averages are then plotted on the chart:
- The short-term moving average is plotted in blue.
- The long-term moving average is plotted in red.
These lines help users visually track the trends and potential crossover points.
Identifying Crossovers
The script identifies two key events:
- Golden Cross: Occurs when the short-term moving average crosses above the long-term moving average. This is typically considered a bullish signal, indicating a potential upward trend.
- Death Cross: Occurs when the short-term moving average crosses below the long-term moving average. This is typically considered a bearish signal, indicating a potential downward trend.
Highlighting Crossovers
To make the crossover events more noticeable, the script adds visual cues:
- Golden Cross: When a Golden Cross is detected, a green label with an upward arrow is plotted below the bar where the crossover occurs.
- Death Cross: When a Death Cross is detected, a red label with a downward arrow is plotted above the bar where the crossover occurs.
Background Coloring
Additionally, the script highlights the background of the chart:
- When a Golden Cross occurs, the background color is changed to a translucent green.
- When a Death Cross occurs, the background color is changed to a translucent red.
These background colors help emphasize the crossover events, making them easier to spot.
Usage
To use this script, a user would:
1. Copy the script and paste it into the Pine Script editor on TradingView.
2. Save the script and apply it to their chart.
By doing so, the user will see the moving averages plotted, and any Golden Cross or Death Cross events will be highlighted with labels and background colors. This visual aid helps traders quickly identify significant crossover events, which can inform their trading decisions.
Trend Strength Signals [AlgoAlpha]🌟Introducing the Trend and Strength Signals indicator by AlgoAlpha ! This tool is designed to help you identify trends and gauge market strength with precision and ease. 📈🚀
🛠 Customizable Parameters : Adjust the period, standard deviation multiplier, gauge size, and colors to fit your trading style.
📊 Trend Detection : Visualize trends with clear color-coded signals for uptrends and downtrends.
📈 Strength Gauge : Assess market strength with a dynamic gauge that adapts to the current price action.
🔔 Alerts : Set alerts for bullish and bearish trend crossovers and take profit points to stay ahead of the market.
🎨 Visual Enhancements : Enjoy a clutter-free chart with the integration of plot shapes, color fills, and gradient gauges.
🚀 Quick Guide to Using the Trend and Strength Signals Indicator
Maximize your trading with the Trend and Strength Signals indicator by following these streamlined steps! 🎯✨
🛠 Add the Indicator : Add the indicator to your favorites. Customize settings like period, standard deviation multiplier, and colors to fit your trading style.
📊 Market Analysis : Observe the color-coded candles and gauge to understand market trend direction and strength. Use the alerts for key trading signals.
🔔 Alerts : Enable notifications for trend crossovers and take profit points to catch trading opportunities without constantly monitoring the chart.
⚙️ How it works
This indicator calculates the moving average and standard deviation of the closing price over a customizable period to identify the upper and lower bounds. When the price crosses these bounds, it signals an uptrend or downtrend. The gauge measures market strength by comparing the price to the moving average and scaling it over a customizable range, while the underlying logic uses concepts from the Bollinger Bands, this indicator gives a unique perspective on price behavior through added features and signals derived from it.
Unleash the power of trend and strength analysis with this comprehensive indicator! Happy trading! 🚀📈✨
Low and High Values [Alorse]🌟 What does this indicator do?
This magical indicator shows you the lowest (Low) and highest (High) values of the last X candles directly on your chart. Not only that, but it also tells you how much the price has changed from the opening price of the current candle to these key points, all in percentage format. You'll have a clear and precise view of market movement!
🔧 Customize to your liking
Want to adjust the number of candles to consider? No problem! You can easily change this parameter to suit your preference. Whether you like short-term strategies with just a few candles or prefer more extensive analysis with many candles, our indicator adapts to you.
🚀 How can this indicator help you?
Identify Support and Resistance: By showing the lowest and highest points, it helps you identify key support and resistance levels. Perfect for planning your entries and exits!
Trend Analysis: With the percentage labels, you can quickly see how the price has moved relative to recent extremes, helping you confirm trends or anticipate possible reversals.
Trading Strategies: Imagine the price is near a recent low, but the percentage indicates a significant drop from the opening. This could be a buy signal if you expect a rebound. Conversely, if the price is near a recent high with a large percentage increase, you might consider selling.
Calculate Stop Loss: Use this indicator to determine your Stop Loss levels by leaving a bit of margin between the indicator value and your desired SL. This helps protect your positions while allowing for some price fluctuation.
📊 Examples of Use
Intraday Trader: Use the indicator with 10-20 candles to capture quick moves and capitalize on daily fluctuations.
Mid-term Trader: Set the indicator to consider 50 candles for a broader view of trends and reversal points.
Long-term Strategist: Adjust the indicator to 100 candles or more to identify highs and lows over larger time frames.
🛠️ Customizable Parameters
Number of Candles: Define the number of candles the indicator will analyze to calculate the lowest and highest values. It's all up to you!
Volume-Enhanced Momentum Moving Average (VEMMA)Volume-Enhanced Momentum Moving Average (VEMMA)
Overview:
The Volume-Enhanced Momentum Moving Average (VEMMA) helps you spot market trends by combining momentum and volume as a moving average. This unique moving average adjusts itself based on the strength and activity of the market, giving you a clearer picture of what’s happening.
How It Works:
1. Key Settings (all of these are adjustable in the settings panel of the indicator):
◦ Base Length: Looks back over the last 50 days by default.
◦ Momentum Length: Uses the past 14 days to measure market strength.
◦ Volume Length: Uses the past 30 days to average trading volume.
◦ High/Low Thresholds: Considers RSI values above 70 as high momentum and below 30 as low momentum.
2. Momentum and Volume:
◦ Momentum: Calculated using the Relative Strength Index (RSI) to see if the market is gaining or losing strength.
◦ Volume: Average trading volume is calculated over the last 30 days to gauge trading activity.
3. VEMMA Calculation:
◦ For each of the past 50 days:
▪ Check Momentum: If RSI > 70, it’s high momentum; if RSI < 30, it’s low.
▪ Weight by Volume: High momentum days with high volume get more weight; low momentum days get less.
▪ Combine: Multiply the closing price by this weight and sum it up.
◦ Average: Divide the total by 50 to get the VEMMA value.
4. Visuals:
◦ Lines: Two lines, VEMMA1 (blue) and VEMMA2 (orange), show the adjusted moving averages.
◦ Colours: Background colors help you quickly spot high (green) and low (red) momentum periods.
How to Use:
• Spot Trends: Rising VEMMA lines suggest an uptrend; falling lines suggest a downtrend.
• Confirm Signals: When both VEMMA1 and VEMMA2 move together, it indicates a strong trend.
• Identify Reversals: Watch for background color changes from green to red or vice versa to catch potential trend reversals.
If the market has been strong and active, the VEMMA line will rise more sharply. If the market is weak and quiet, the line will be smoother.
Benefits:
• Integrated View: Combines market strength and trading activity for a fuller picture.
• Responsive: Adapts to significant market changes, highlighting key movements.
• Easy to Read: Clear visuals with color-coded backgrounds make interpretation simple.
Remember, just like any other indicator, this is not supposed to be used alone. Use it as part of your greater trading strategy. I do however believe it works exceptionally well for finding longer term trends early. The default VEMMA settings work very well as replacement for the EMA 200. Try it and see how it goes. Play around with the settings. Feedback appreciated.
Enhanced Reversal DetectionScript Description:
The "Enhanced Reversal Detection" indicator is a powerful tool designed to identify potential market reversals across various financial instruments. It incorporates a sophisticated algorithm that analyzes price action along with key technical indicators such as the Relative Strength Index (RSI), Bollinger Bands, and Moving Average (MA).
How to Use:
Adjustable Parameters: The indicator offers a range of adjustable parameters to cater to different trading preferences and market conditions.
RSI Length: Adjusts the length of the RSI calculation to fine-tune sensitivity.
Overbought Level: Sets the threshold for identifying overbought conditions on the RSI scale.
Oversold Level: Sets the threshold for identifying oversold conditions on the RSI scale.
Bollinger Bands Length: Determines the length of the Bollinger Bands calculation.
Bollinger Bands Multiplier: Adjusts the standard deviation multiplier for the Bollinger Bands, influencing band width.
Moving Average Length: Defines the length of the Moving Average calculation to capture trend direction.
Min Bars Between Signals: Sets the minimum number of bars required between consecutive reversal signals.
ADX Length: Adjusts the length of the Average Directional Index (ADX) calculation.
ADX Threshold: Defines the threshold value for ADX, serving as a filter for reversal signals.
Signal Generation: The indicator generates signals for both bullish and bearish reversals based on predefined criteria. A bullish reversal signal is triggered when the closing price exceeds the lower Bollinger Band and RSI falls below the oversold threshold. Conversely, a bearish reversal signal occurs when the closing price falls below the upper Bollinger Band and RSI surpasses the overbought threshold.
Alerts: Traders can opt to receive alerts for bullish and bearish reversal signals, enabling them to stay informed of potential trading opportunities even when away from the platform.
Publication Readiness:
To ensure readiness for publication in the TradingView public library, the script has been meticulously crafted and documented:
The code is extensively commented to provide clear explanations of parameters, calculations, and signal generation logic.
Best coding practices have been followed to enhance readability and maintainability.
Rigorous testing has been conducted to validate the accuracy and reliability of signal generation across various market conditions.
The script adheres to TradingView's guidelines and policies for script publication, ensuring compliance with platform standards and user expectations.
With its comprehensive features and user-friendly design, the "Enhanced Reversal Detection" indicator is poised to become a valuable asset for traders seeking to identify high-probability reversal opportunities in the financial markets.
ka66: FX Sessions High/LowThis indicator is specific to the 24-hour Forex Market. It provides 2 features:
Demarcating forex sessions with open and close lines. Note that looking at various sources online, we use the convention that the Asia session starts with the Tokyo market open, rather than the earlier Sydney session. Presumably this is better since we then have more liquidity in the market. Note that we have three sessions: Asia, London, New York.
At the end of each session, we begin plotting that (closed) session's high and low, which acts as a natural support and resistance for the Forex market. This is the key feature it provides. The first feature is mainly there for a visual guide, which can be turned off via the UI settings, but it certainly helps verifying the logic!
For more background, we are taking the idea of Previous Day High/Low (PDH/PDL), but adjusting it to a multi-session market like Forex. In essence, this is is a "Previous Session High/Low" indicator.
PDH/PDL works fine when you have a market with Regular Trading Hours, ignoring Extended Hours. However, in the Forex market, each session can have differing sentiments, e.g. we often see say London bringing prices up, and New York bringing them back down.
The break of session high/lows (or bouncing off them) can reflect where the potential direction price is going to take.
I also categorised this as a Sentiment indicator, because support and resistance areas where prices react do provide the sentiment of the market. They aren't just lines, they are prices of interest to major players.
Stock Rating [TrendX_]# OVERVIEW
This Stock Rating indicator provides a thorough evaluation of a company (NON-FINANCIAL ONLY) ranging from 0 to 5. The rating is the average of six core financial metrics: efficiency, profitability, liquidity, solvency, valuation, and technical ratings. Each metric encompasses several financial measurements to ensure a robust and holistic evaluation of the stock.
## EFFICIENCY METRICS
1. Asset-to-Liability Ratio : Measures a company's ability to cover its liabilities with its assets.
2. Equity-to-Liability Ratio : Indicates the proportion of equity used to finance the company relative to liabilities.
3. Net Margin : Shows the percentage of revenue that translates into profit.
4. Operating Expense : Reflects the costs required for normal business operations.
5. Operating Expense Ratio : Compares operating expenses to total revenue.
6. Operating Profit Ratio : Measures operating profit as a percentage of revenue.
7. PE to Industry Relative PE/PB : Compares the company's PE ratio to the industry average.
## PROFITABILITY METRICS
1. ROA : Indicates how efficiently a company uses its assets to generate profit.
2. ROE : Measures profitability relative to shareholders' equity.
3. EBITDA : Reflects a company's operational profitability.
4. Free Cash Flow Margin : Shows the percentage of revenue that remains as free cash flow.
5. Revenue Growth : Measures the percentage increase in revenue over a period.
6. Gross Margin : Reflects the percentage of revenue exceeding the cost of goods sold.
7. Net Margin : Percentage of revenue that is net profit.
8. Operating Margin : Measures the percentage of revenue that is operating profit.
## LIQUIDITY METRICS
1. Current Ratio : Indicates the ability to cover short-term obligations with short-term assets.
2. Interest Coverage Ratio : Measures the ability to pay interest on outstanding debt.
3. Debt-to-EBITDA : Compares total debt to EBITDA.
4. Debt-to-Equity Ratio : Indicates the relative proportion of debt and equity financing.
## SOLVENCY METRICS
1. Altman Z-score : Predicts bankruptcy risk
2. Beneish M-score : Detects earnings manipulation.
3. Fulmer H-factor : Predicts business failure risk.
## VALUATION METRICS
1. Industry Relative PE/PB Comparison : Compares the company's PE and PB ratios to industry averages.
2. Momentum of PE, PB, and EV/EBITDA Multiples : Tracks the trends of PE, PB, and EV/EBITDA ratios over time.
## TECHNICAL METRICS
1. Relative Strength Index (RSI) : Measures the speed and change of price movements.
2. Supertrend : Trend-following indicator that identifies market trends.
3. Moving Average Golden-Cross : Occurs when a short-term MA crosses above mid-term and long-term MA which are determined by half-PI increment in smoothing period.
4. On-Balance Volume Golden-Cross : Measures cumulative buying and selling pressure.
Cosine Kernel Regressions [QuantraSystems]Cosine Kernel Regressions
Introduction
The Cosine Kernel Regressions indicator (CKR) uses mathematical concepts to offer a unique approach to market analysis. This indicator employs Kernel Regressions using bespoke tunable Cosine functions in order to smoothly interpret a variety of market data, providing traders with incredibly clean insights into market trends.
The CKR is particularly useful for traders looking to understand underlying trends without the 'noise' typical in raw price movements. It can serve as a standalone trend analysis tool or be combined with other indicators for more robust trading strategies.
Legend
Fast Trend Signal Line - This is the foreground oscillator, it is colored upon the earliest confirmation of a change in trend direction.
Slow Trend Signal Line - This oscillator is calculated in a similar manner. However, it utilizes a lower frequency within the cosine tuning function, allowing it to capture longer and broader trends in one signal. This allows for tactical trading; the user can trade smaller moves without losing sight of the broader trend.
Case Study
In this case study, the CKR was used alongside the Triple Confirmation Kernel Regression Oscillator (KRO)
Initially, the KRO indicated an oversold condition, which could be interpreted as a signal to enter a long position in anticipation of a price rebound. However, the CKR’s fast trend signal line had not yet confirmed a positive trend direction - suggesting that entering a trade too early and without confirmation could be a mistake.
Waiting for a confirmed positive trend from the CKR proved beneficial for this trade. A few candles after the oversold signal, the CKR's fast trend signal line shifted upwards, indicating a strong upward momentum. This was the optimal entry point suggested by the CKR, occurring after the confirmation of the trend change, which significantly reduced the likelihood of entering during a false recovery or continuation of the downtrend.
This is one of the many uses of the CKR - by timing entries using the fast signal line , traders could avoid unnecessary losses by preventing premature entries.
Methodology
The methodology behind CKR is a multi-layered approach and utilizes many ‘base’ indicators.
Relative Strength Index
Stochastic Oscillator
Bollinger Band Percent
Chande Momentum Oscillator
Commodity Channel Index
Fisher Transform
Volume Zone Oscillator
The calculated output from each indicator is standardized and scaled before being averaged. This prevents any single indicator from overpowering the resulting signal.
// ╔════════════════════════════════╗ //
// ║ Scaling/Range Adjustment ║ //
// ╚════════════════════════════════╝ //
RSI_ReScale (_res ) => ( _res - 50 ) * 2.8
STOCH_ReScale (_stoch ) => ( _stoch - 50 ) * 2
BBPCT_ReScale (_bbpct ) => ( _bbpct - 0.5 ) * 120
CMO_ReScale (_chandeMO ) => ( _chandeMO * 1.15 )
CCI_ReScale (_cci ) => ( _cci / 2 )
FISH_ReScale (_fish1 ) => ( _fish1 * 30 )
VZO_ReScale (_VP, _TV ) => (_VP / _TV) * 110
These outputs are then fed into a customized cosine kernel regression function, which smooths the data, and combines all inputs into a single coherent output.
// ╔════════════════════════════════╗ //
// ║ COSINE KERNEL REGRESSIONS ║ //
// ╚════════════════════════════════╝ //
// Define a function to compute the cosine of an input scaled by a frequency tuner
cosine(x, z) =>
// Where x = source input
// y = function output
// z = frequency tuner
var y = 0.
y := math.cos(z * x)
Y
// Define a kernel that utilizes the cosine function
kernel(x, z) =>
var y = 0.
y := cosine(x, z)
math.abs(x) <= math.pi/(2 * z) ? math.abs(y) : 0. // cos(zx) = 0
// The above restricts the wave to positive values // when x = π / 2z
The tuning of the regression is adjustable, allowing users to fine-tune the sensitivity and responsiveness of the indicator to match specific trading strategies or market conditions. This robust methodology ensures that CKR provides a reliable and adaptable tool for market analysis.
Anchored Monte Carlo Shuffled Projection [LuxAlgo]The Anchored Monte Carlo Shuffled Projection tool randomly simulates future price points based on historical bar movements made before a user-anchored point in time.
By anchoring our data and projections to a single point in time, users can better understand and reflect on how the price played out while taking into consideration our random simulations.
🔶 USAGE
After selecting the indicator to apply to the chart, you will be prompted to "Set the Anchor Point". Do so by clicking on the desired location on your chart, only time is used as the anchor point.
Note: To select a new anchor point when applied to the chart, click on the 'More' dropdown next to the indicator status bar (○○○), then select "Reset points...".
Alternate Method: You are also able to click and drag the vertical line that displays on the anchor point bar when the indicator is highlighted.
By randomly simulating bar movements, a range is developed of potential price action which could be utilized to locate future price development as well as potential support/resistance levels.
Performing numerous simulations and taking the average at each step will converge toward the result highlighted by the "Average Line", and can point out where the price might develop, assuming the trend and amount of volatility persist.
Current closing price + Sum of changes in the calculation window
This constraint will cause the simulations always to display an endpoint consistent with the current lookback's slope.
While this may be helpful to some traders, this indicator includes an option to produce a less biased range, as seen below:
🔶 DETAILS
The Anchored Monte Carlo Shuffled Projection tool creates simulations based on prices within a user-set lookback window originating at the specified anchor point. Simulations are done as follows:
Collect each bar's price changes in the user-set window.
Randomize the order of each change in the window.
Project the cumulative sum of the shuffled changes from the current closing price.
Collect data on each point along the way.
This is the process for the Default calculation; for the 'Randomize Direction' calculation, when added onto the front for every other change, the value is inverted, creating the randomized endpoints for each simulation.
The script contains each simulation's data for that bar, with a maximum of 1000 simulations.
To get a glimpse behind the scenes, each simulation (up to 99) can be viewed using the 'Visualize Simulations' Options, as seen below.
Because the script holds the full simulation data, the script can also calculate this data, such as standard deviations.
In this script the Standard deviation lines are the average of all standard deviations across the vertical data groups, this provides a singular value that can be displayed a distance away from the simulation center line.
🔶 SETTINGS
Lookback: Sets the number of Bars to include in calculations.
Simulation Count: Sets the number of randomized simulations to calculate. (Max 1000)
Randomize Direction: See Details Above. Creates a more 'Normalized' Distribution
Visualize Simulations: See Details Above. Turns on Visualizations, and colors are randomly generated. Visualized max does not cap the calculated max. If 1000 simulations are used, the data will be from 1000 simulations, however, only the last 99 simulations will be visualized.
🔹 Standard Deviations
Standard Deviation Multiplier: Sets the multiplier to use for the Standard Deviation distance away from the center line.
🔹 Style
Extend Lines: Extends the Simulated Value Lines into the future for further reference and analysis.
[InvestorUnknown] Performance MetricsOverview
The Performance Metrics indicator is a tool designed to help traders and investors understand and utilize key performance metrics in their strategies. This indicator is inspired by the Rolling Risk-Adjusted Performance Ratios created by @EliCobra, but it offers enhanced usability and additional features to provide a more user-friendly code for understanding the calculations.
Features
Rolling Lookback:
Dynamic Lookback Calculation: The indicator automatically calculates the number of bars from the start of the asset's price history, up to a maximum of 5000 bars due to TradingView platform restrictions.
Adjustable Lookback Period: Users can manually set a lookback period or choose to use the rolling lookback feature for dynamic calculations.
RollingLookback() =>
x = bar_index + 1
y = x > 4999 ? 5000 : x > 1 ? (x - 1) : x
y
Trend Analysis
The Trend Analysis section in this indicator helps traders identify the direction of the market trend based on the balance of positive and negative returns over time. This is achieved by calculating the sums of positive and negative returns and optionally smoothing these values to provide a clearer trend signal.
Configuration: Enable smoothing if you want to reduce noise in the trend analysis. Choose between EMA and SMA for smoothing. Set the length for smoothing according to your preference for sensitivity (shorter lengths are more sensitive to changes, longer lengths provide smoother signals).
Interpretation:
- A positive trend difference (filled with green) indicates a bullish trend, suggesting more positive returns.
- A negative trend difference (filled with red) indicates a bearish trend, suggesting more negative returns.
- Colored bars provide a quick visual cue on the trend direction, helping to make timely trading decisions.
// The Trend Analysis section calculates and optionally smooths the sums of positive and negative returns.
// This helps identify the trend direction based on the balance of positive and negative returns over time.
Ps = Smooth ? Smooth_type == "EMA" ? ta.ema(pos_sum, Smooth_len) : ta.sma(pos_sum, Smooth_len) : pos_sum
Ns = Smooth ? Smooth_type == "EMA" ? ta.ema(neg_sum, Smooth_len) : ta.sma(neg_sum, Smooth_len) : neg_sum
// Calculate the difference between smoothed positive and negative sums
dif = Ps + Ns
Performance Metrics Table
Visual Table Display: Option to display a table on the chart with calculated performance metrics. This table includes comprehensive metrics like Mean Return, Positive and Negative Mean Return, Standard Deviation, Sharpe Ratio, Sortino Ratio, and Omega Ratio.
Performance Metrics Calculated
Mean Return:
Description: The average return over the lookback period.
Purpose: Helps in understanding the overall performance of the asset by providing a simple average of returns.
Positive Mean Return:
Description: The average of all positive returns over the lookback period.
Purpose: Highlights the average gain during profitable periods, giving insight into the asset's potential upside.
Negative Mean Return:
Description: The average of all negative returns over the lookback period.
Purpose: Focuses on the average loss during unprofitable periods, helping to assess the downside risk.
Standard Deviation (STDEV):
Description: A measure of volatility that calculates the dispersion of returns from the mean.
Purpose: Indicates the risk associated with the asset. Higher standard deviation means higher volatility and risk.
Sharpe Ratio:
Description: A risk-adjusted return metric that divides the mean return by the standard deviation of returns. It can be annualized if selected.
Purpose: Provides a standardized way to compare the performance of different assets by considering both return and risk. A higher Sharpe Ratio indicates better risk-adjusted performance.
sharpe_ratio = mean_all / stddev_all * (Annualize ? math.sqrt(Lookback) : 1)
Sortino Ratio:
Description: Similar to the Sharpe Ratio but focuses only on downside volatility. It divides the mean return by the standard deviation of negative returns. It can be annualized if selected.
Purpose: Offers a better assessment of downside risk by ignoring upside volatility. A higher Sortino Ratio indicates a higher return per unit of downside risk.
sortino_ratio = mean_all / stddev_neg * (Annualize ? math.sqrt(Lookback) : 1)
Omega Ratio:
Description: The ratio of the probability-weighted average of positive returns to the probability-weighted average of negative returns.
Purpose: Measures the overall likelihood of positive returns compared to negative returns. An Omega Ratio greater than 1 indicates more frequent and/or larger positive returns compared to negative returns.
omega_ratio = (prob_pos * mean_pos) / (prob_neg * -mean_neg)
By calculating and displaying these metrics, the indicator provides a comprehensive view of the asset's performance, enabling traders and investors to make informed decisions based on both returns and risk-adjusted metrics.
Use Cases:
Performance Evaluation: Assesses an asset's performance by analyzing both returns and risk factors, giving a clear picture of profitability and volatility.
Risk Comparison: Compares the risk-adjusted returns of different assets or portfolios, aiding in identifying investments with superior risk-reward trade-offs.
Risk Management: Helps manage risk exposure by evaluating downside risks and overall volatility, enabling more informed and strategic investment decisions.
Dynamic Adaptive Regression BandsThis script provides a dynamic adaptive regression band indicator that adjusts based on recent market volatility. The regression bands are calculated using a length parameter adapted to the ATR (Average True Range) to ensure responsiveness to market conditions.
Key Features:
Dynamic Length Adjustment: The length of the regression calculation is adjusted based on the ATR to reflect current market volatility.
Multiple Bands: The script plots upper and lower bands at different ratios (1.618, 2.618, and 4.236) to provide comprehensive support and resistance levels.
Detailed Fillings: The areas between bands are filled with different colors to visualize different levels of volatility and trend strength.
Usage:
Regression Line: The main regression line follows the general trend of the price.
Upper/Lower Bands: These bands represent volatility-adjusted support and resistance levels.
Extended Bands: Additional bands at different ratios provide extended support and resistance zones for further trend analysis.
Original Script Credit:
This script is inspired by the original "Regr Linear Bands" script by MarcoValente, published on Jan 15, 2017. The original script starts from a linear regression and uses Fibonacci parameters to add bands above and below. The original work incorporates range and volatility, making the price move between bands of the same color. The middle line (linear regression) serves as a good signal; after a break occurs, the price typically moves to the last or second last band.
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.
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.