Consecutive count backtester / quantifytools- Overview
Consecutive counting is a simple method to mechanically define trending states to the upside and downside. Consecutive counts are calculated by taking reference price level (e.g. close 4 candles ago) and count closes above/below it up to a maximum count that resets the consecutive count back to 1. This tool provides the means to backtest each count by measuring % change in price after each count (e.g. % gain 2 candles after a given count).
Users can define reference source that starts the consecutive count (e.g. close 4 candles ago), maximum count where counter resets (e.g. after 9th count) and backtesting period (e.g. price change 2 candles after count).
Filters add extra conditions that must be met on the consecutive count to qualify as valid, which are also reflected on the backtest metrics. The counts can be refined using the following filters:
- RSI above/below X
- Price above/below/at moving average of choice
- Relative volume above/below X
Average gain corresponding to each count as they occur can be toggled off for less clutter. Average price change can also be visualized using candle color. Colors, gradient and table/label sizes are fully customizable.
- Practical guide
Example #1: Identify reversal potential
Consecutive counting is a simple yet effective method to for detecting reversals, for which 7-9 counts are traditionally used. Whether that holds true or not can now be put through a test with different variations of the method as well as using additional filters to improve the probability of a turn.
Example #2: Identify trend following potential
Consecutive counts can also have utility value for trend following. When historical short term change is to the downside, expect downside, when to the upside, expect upside.
Corak carta
Enhanced Forex IndicatorDescription of the "Enhanced Forex Indicator"
The "Enhanced Forex Indicator" is designed for traders who want a comprehensive technical analysis tool on the TradingView platform. This script integrates Exponential Moving Averages (EMAs), support and resistance zones, and candlestick pattern recognition to provide actionable trading signals, particularly useful for Forex and other financial markets. The script is suitable for intraday trading and swing trading.
Components of the Indicator
Exponential Moving Averages (EMAs):
Short EMA (Blue Line): Faster responding average, good for identifying recent trend changes.
Long EMA (Red Line): Slower moving average, helps in confirming longer-term trends.
Support and Resistance Zones:
Resistance Zone (Red): Area where potential selling pressure could overcome buying pressure, halting price increases temporarily or reversing them.
Support Zone (Green): Area where potential buying pressure could overcome selling pressure, supporting prices and preventing them from falling further.
Candlestick Patterns:
Bullish Engulfing Pattern (Green Triangle Up 'BE'): Suggests a potential upward reversal or start of a bullish trend.
Bearish Engulfing Pattern (Red Triangle Down 'BE'): Indicates a potential downward reversal or start of a bearish trend.
Buy/Sell Signals:
Buy Signal (Green Label 'BUY'): Triggered when the price is above both EMAs and a bullish engulfing pattern is detected.
Sell Signal (Red Label 'SELL'): Triggered when the price is below both EMAs and a bearish engulfing pattern is detected.
Trading Setup:
Entry: Consider entering a buy position when the 'BUY' signal appears, indicating bullish conditions. Enter a sell position when the 'SELL' signal appears, indicating bearish conditions.
Exit: Look for closing signals opposite your entry or use predefined take profit and stop loss levels. For instance, exit a buy position on a 'SELL' signal or when the price drops below the support zone.
Risk Management:
Set stop losses just below the support zone for buy orders and above the resistance zone for sell orders to protect against significant losses.
Adjust position sizes according to your risk tolerance and account balance.
Considerations:
Use this indicator in conjunction with other analysis tools and fundamental data to confirm signals and strengthen your trading strategy.
Periodically backtest the strategy based on this indicator to ensure its effectiveness in current market conditions.
Optimization:
Adjust the lengths of the EMAs and the buffer size of the support and resistance zones to better fit the asset's volatility and your trading timeframe.
Smart Money Setup 06 [TradingFinder] Liquidity Sweeps + OB Swing🔵 Introduction
Smart Money, managed by large investors, injects significant capital into financial markets by entering real capital markets.
Capital entering the market by this group of individuals is called smart money. Traders can profit from financial markets by following such individuals.
Therefore, smart money can be considered one of the effective methods for analyzing financial markets.
Sometimes, before a market movement, fluctuation movements that create price movement cause many traders' "Stop Loss" to be triggered. These movements are created in various patterns.
One of these patterns is similar to an "Expanding Triangle", which touches the stop loss of individuals who have placed their stop loss in the cash area in the form of 5 consecutive openings.
To better understand this setup, pay attention to the images below.
Bullish Setup Details :
Bearish Setup Details :
🔵 How to Use
After adding the indicator to the chart, wait for trading opportunities to appear. By changing the "Time Frame" and "Pivot Period", you can see different trading positions.
In general, the smaller the "Time Frame" and "Pivot Period", the more likely trading opportunities will appear.
Bullish Setup Details on Chart :
Bearish Setup Details on Chart :
🔵 Settings
You have access to "Pivot Period", "Order Block Refine", and "Refine Mode" through settings.
By changing the "Pivot Period", you can change the range of zigzag that identifies the setup.
Through "Order Block Refine", you can specify whether you want to refine the width of the order blocks or not. It is set to "On" by default.
Through "Refine Mode", you can specify how to improve order blocks.
If you are "risk-averse", you should set it to "Defensive" mode because in this mode, the width of the order blocks decreases, the number of your trades decreases, and the "reward-to-risk ratio "increases.
If you are on the opposite side and are "risk-taker", you can set it to "Aggressive" mode. In this mode, the width of the order blocks increases, and the likelihood of losing positions decreases.
ICT Immediate Rebalance [LuxAlgo]The ICT Immediate Rebalance aims at detecting and highlighting immediate rebalances, a concept taught by Inner Circle Trader. The ICT Immediate Rebalance, although frequently overlooked, emerges as one of ICT's most influential concepts, particularly when considered within a specific context.
🔶 USAGE
Immediate rebalances, a concept taught by ICT, hold significant importance in decision-making. To comprehend the concept of immediate rebalance, it's essential to grasp the notion of the fair value gap. A fair value gap arises from market inefficiencies or imbalances, whereas an immediate rebalance leaves no gap, no inefficiencies, or no imbalances that the price would need to return to.
Following an immediate rebalance, the typical expectation is for two extension candles to ensue; failing this, the immediate rebalance is deemed unsuccessful. It's important to note that both failed and successful immediate rebalances hold significance in trading when analyzed within a contextual framework.
Immediate rebalances can manifest across various locations and timeframes. It's recommended to analyze them in conjunction with other ICT tools or technical indicators to gain a more comprehensive understanding of market dynamics.
🔹 Multi Timeframe
The script facilitates multi-timeframe analysis, enabling users to display immediate rebalances from higher timeframes.
Enabling the display of higher timeframe candles helps visualize the detected immediate rebalance patterns.
🔹 Dashboard
The dashboard offers statistical insights into immediate rebalances.
🔶 SETTINGS
🔹 Immediate Rebalances
Timeframe: this option is to identify immediate rebalances from higher timeframes. If a timeframe lower than the chart's timeframe is selected, calculations will be based on the chart's timeframe.
Bullish, and Bearish Immediate Rebalances: color customization options.
Wicks 75%, %50, and %25: color customization options of the wick price levels for the detected immediate rebalances.
Immediate Rebalance Candles: toggles the visualization of higher timeframe candles where immediate rebalance is detected.
Confirmation (Bars): specifies the number of bars required to confirm the validation of the detected immediate rebalance.
Immediate Rebalance Icon: allows customization of the size of the icon used to represent the immediate rebalance.
🔹 Dashboard
Dashboard: toggles the visualization of the dashboard, sets its location, and customizes the size of the dashboard.
🔶 RELATED SCRIPTS
Fair-Value-Gap
Thanks to our community for recommending this script. For more conceptual scripts and related content, we welcome you to explore by visiting >>> LuxAlgo-Scripts .
FVG Breakaway/3rd Candle (Arjo) [MK]Simple script to identify FVGs (Fair Value Gaps) on the current chart timeframe. The script differs from other FVG indicators on the Tradingview platform by using Arjos 3rd candle rule to identify which gaps are 'Breakway Gaps' and which Gaps are likely to be returned to.
NOTE: As with all 'trading rules' this theory is not 100% accurate.
default settings:
Breakaway Gaps = YELLOW
Gaps that price may return to = GREEN
Mitigated Gaps = 100% TRANSPARENT
What is a FVG:
A FVG is a price area defined by a 3 candle pattern. For a bullish FVG, the low of the 3rd candle must be higher than the high of the 1st candle. This then leaves an area that is drawn as in the example below:
A bearish FVG is defined by the high of the 3rd candle being lower than the low of the 1st candle, as shown in the example below:
FVGs can act like magnets where price will either retrace to or reach for, therefore they can be used as entry points and also for take profit target levels.
If for example, a trader would like to use an FVG for an entry, it would be useful to know which FVGs are more likely for price to re-enter and which FVG will be left un-touched. FVGs that are likely to be left un-touched by price are called 'Breakaway Gaps'.
How do we define a 'Breakaway Gap':
First we identify FVGs using the rules stated above, then we look to see where the 3rd candle closed in relation to the 2nd candle. For a bullish 'Breakaway Gap' we want to see the 3rd candle close above the high of the 2nd candle. An example of a bullish Breakaway Gap is shown in the example below:
A bearish 'Breakaway Gap' is defined by the close of the 3rd candle being lower than the low of the 2nd candle. An example is shown below:
How do we define an FVG that price may return to:
Any gap that does not meet the above rules for a 'Breakway Gap' is therefore considered an FVG that price may return to. So for a bullish FVG that price may return to we would look to see if the close of the 3rd candle is above the high of the 2nd candle. If it is not above the high of the 2nd candle then it more likely that price will retrace into the FVG before continuing higher. An example is shown below:
A bearish gap that price may return to is defined by the close of the 3rd candle not being lower than the low of the 2nd candle. An example is shown below:
The indicator is based on the teachings of 'Arjo'. Note: breakaway gaps will only remain 'breakaway' until a liquidity level is reached. Breakaways therefore do not remain 'breakaway' forever. Users of the indicators must fully comprehend this theory before using the indicator with live markets.
Users of the script should be fully aware of this concept and also have conducted thorough backtesting using a large data set before using this indicator with live accounts.
Holding Zone Input Parameters
The script has three input parameters:
· length: an integer input with a default value of 20, likely used for calculating moving averages or other indicators.
· zoneSize: a decimal input with a default value of 1.5, likely used to define the size of the "holding zone".
· entryZone: an integer input with a default value of 50, likely used to define the entry point for the strategy.
Calculate Holding Zone
The script calculates two values:
· highs: the highest high over the last length bars.
· lows: the lowest low over the last length bars.
Then, it calculates the zoneHigh and zoneLow values by subtracting/adding a fraction of the difference between highs and lows from/to highs and lows, respectively. This creates a "holding zone" between zoneHigh and zoneLow.
Plot Holding Zone
Finally, the script plots two lines:
· zoneHigh with a blue color and a linewidth of 2.
· zoneLow with a blue color and a linewidth of 2.
________________________________________________________________
For the 15 min timeframe I use the parameters 10 for the length, 0.5 for the zone size and 20 for the entry zone. this makes it more sensitive to price
Profitable L 1800 Candle Highlight [Beta]
Certainly! Here's a user guide for the provided Pine Script code:
User Guide: 1800 Candle Highlight Indicator
Overview:
The "1800 Candle Highlight" indicator is designed to visually emphasize the 18:00 (6:00 PM) candle on the chart, providing clarity on its open and close prices, and highlighting its timeframe with a distinctive color.
Key Features:
Candle Highlighting: The indicator identifies the candle that opens at 18:00 and visually distinguishes it from other candles on the chart.
Open and Close Prices: The indicator plots the open and close prices of the 18:00 candle as step lines, making it easy to identify price movements during that timeframe.
Background Color: It colors the background within the 18:00 candle's timeframe with a transparent blue shade, providing further emphasis on that period.
Start Marker: A downward triangle shape marks the start of the 18:00 candle, aiding in identifying the beginning of the highlighted timeframe.
Usage:
Overlay: The indicator is designed to be overlaid on the price chart, allowing users to visualize the highlighted candle alongside price movements.
Interpretation: Traders can observe the open and close prices of the 18:00 candle relative to previous and subsequent candles, aiding in analysis and decision-making.
Timeframe Focus: The highlighted candle's timeframe can serve as a reference point for analyzing price action during specific hours, such as the end of a trading day.
Installation:
Access: Users can access the Pine Script editor within the TradingView platform to create a new indicator.
Copy and Paste: Copy the provided Pine Script code and paste it into the editor.
Save and Apply: Save the indicator and apply it to the desired chart, adjusting settings as needed.
Customization:
Color Scheme: Users can customize the colors used for highlighting, open/close prices, and background to suit their preferences and chart aesthetics.
Styling: Adjustments can be made to line styles, widths, and marker sizes to enhance visibility and clarity.
Compatibility:
The indicator is compatible with TradingView's Pine Script version 5 and can be applied to various financial instruments and timeframes supported by the platform.
Disclaimer:
The "1800 Candle Highlight" indicator is provided for informational purposes only and should not be considered as financial advice. Users are encouraged to conduct thorough analysis and consider multiple factors before making trading decisions.
Joesax Red to Green with Alert V2 Candle IndicatorThis indicator displays transitions of candles from red to green and from green to red on a chart, with the ability to set an adjustable percentage threshold. When a candle transitions from red to green and the percentage change exceeds the specified threshold, a red to green transition signal is issued. Similarly, when a candle transitions from green to red and the percentage change exceeds the specified threshold, a green to red transition signal is issued.
Parameters:
Percentage threshold %: Allows you to set the percentage threshold to determine when to consider the transition from one candle to another significant.
Description:
This indicator uses the absolute percentage change between the opening price and the closing price of a candle to determine whether the candle is red or green. When a candle transitions from red to green and the percentage change exceeds the set threshold, a red to green transition signal is issued. Similarly, when a candle transitions from green to red and the percentage change exceeds the set threshold, a green to red transition signal is issued. Alerts are triggered when such transitions occur.
This indicator helps traders identify significant directional changes on the chart, enabling them to make informed decisions during financial market analysis.
CUSUM Peaks & Troughs with DriftThis script implements an Improved CUSUM (Cumulative Sum) Peaks & Troughs with Drift indicator. Here's a breakdown of how it works:
Input Parameters:
cusumThreshold: Threshold value for detecting peaks and troughs.
cusumDrift: Drift value used to adjust the CUSUM calculation.
movingAverageLength: Length of the moving average used as a reference for deviation calculation.
Moving Average Calculation:
Calculates the simple moving average (SMA) of the closing prices over a specified length.
Price Deviation Calculation:
Computes the deviation of the closing price from the moving average.
CUSUM Calculation with Drift:
Utilises cumulative sum (CUSUM) calculations with drift adjustment.
Tracks positive and negative deviations from the moving average, considering the specified drift value.
Peak and Trough Detection:
Detects peaks and troughs based on the predefined thresholds (cusumThreshold).
Resets the CUSUM values when peaks or troughs are detected.
Plotting:
Plots shapes (triangles) above the bars for peaks and below the bars for troughs.
Optionally, you can uncomment the lines to visualise the CUSUM values and the zero line for reference.
This indicator helps identify potential turning points or reversals in the price action by detecting peaks (high points) and troughs (low points) in the cumulative sum of price deviations from the moving average, considering drift to adapt to underlying trends in the data.
Inside Bar + Bullish and Bearish candlestick [Tarun]
Inside Bar Detection:
The function isInsideBar() checks if a bar is an inside bar, meaning its high is lower than the previous bar's high and its low is higher than the previous bar's low.
Inside bars are highlighted with an orange color.
Bearish Candlestick Patterns:
Bearish Engulfing: When the current candlestick's body completely engulfs the previous candlestick's body.
Dark Cloud Cover: When a bullish candle is followed by a bearish candle that opens above the previous bullish candle's close but closes below its midpoint.
Bearish Harami: When a small bullish candlestick is engulfed by a larger bearish candlestick.
Evening Star: A three-candle pattern consisting of a large bullish candle, a small-bodied candle with a gap up or down, and a large bearish candle that closes below the midpoint of the first candle.
Shooting Star: A single candlestick pattern with a small real body near the bottom of the price range and a long upper shadow.
Bearish Marubozu: A candlestick with a long bearish body and little to no upper or lower shadows.
Bearish candlestick patterns are highlighted with a red color and labeled with abbreviated names.
Bullish Candlestick Patterns:
Bullish Engulfing: Opposite of bearish engulfing, where the current candlestick's body completely engulfs the previous candlestick's body.
Piercing Pattern: When a bearish candle is followed by a bullish candle that opens below the previous bearish candle's low but closes above its midpoint.
Bullish Harami: Similar to bearish harami but bullish, where a small bearish candlestick is engulfed by a larger bullish candlestick.
Morning Star: A three-candle pattern opposite to the evening star, signaling a potential reversal from downtrend to uptrend.
Bullish Hammer: A single candlestick pattern with a small real body near the top of the price range and a long lower shadow.
Bullish Marubozu: A candlestick with a long bullish body and little to no upper or lower shadows.
Bullish candlestick patterns are highlighted with a purple color and labeled with abbreviated names.
Mxwll Price Action Suite [Mxwll]Introducing the Mxwll Price Action Suite!
The Mxwll Price Action Suite is an all-in-one analysis indicator incorporating elements of SMC and also ideas extending beyond the trading methodology!
Features
Internal structures
External structures
Customizable Sensitivities
BoS/CHoCH
Order Blocks
HH/LH/LL/LH Areas
Rolling TF highs/lows
Rolling Volume Comparisons
Auto Fibs
And more!
The image above shows the indicator's market structure identification capabilities. Internal BoS and CHoCH structures in addition to overarching market structures are available with customizable sensitivities.
The image above shows the indicator identifying order blocks! Additionally, HH/LH/LL/LH areas are also identified.
The image above shows a rolling area of interest. These areas can be compared to supply/demand zones, where traders might consider a bargain long/short/sell area.
The indicator displays a rolling 4hr high/low and 1D high/low, alongside auto fibonacci levels with a customizable sensitivity.
Finally, the Mxwll Price Action Suite shows relevant session information.
Table information
Current Session
Countdown to session close
Next Session
Countdown to next session open
Rolling 4-Hr volume intensity
Rolling 24-Hr volume intensity
Introducing the Mxwll SMC Suite!
The Mxwll SMC Suite is an all-in-one analysis indicator incorporating elements of SMC and also ideas extending beyond the trading methodology!
Features
Internal structures
External structures
Customizable Sensitivities
BoS/CHoCH
Order Blocks
HH/LH/LL/LH Areas
Rolling TF highs/lows
Rolling Volume Comparisons
Auto Fibs
And more!
The image above shows the indicator's market structure identification capabilities. Internal BoS and CHoCH structures in addition to overarching market structures are available with customizable sensitivities.
The image above shows the indicator identifying order blocks! Additionally, HH/LH/LL/LH areas are also identified.
The image above shows a rolling area of interest. These areas can be compared to supply/demand zones, where traders might consider a bargain long/short/sell area.
The indicator displays a rolling 4hr high/low and 1D high/low, alongside auto fibonacci levels with a customizable sensitivity.
Finally, the Mxwll Price Action Suite shows relevant session information.
Table information
Current Session
Countdown to session close
Next Session
Countdown to next session open
Rolling 4-Hr volume intensity
Rolling 24-Hr volume intensity
Expanded Features of Mxwll Price Action Suite
Internal and External Structures
Internal Structures: These elements refer to the price formations and patterns that occur within a smaller scope or a specific trading session. The suite can detect intricate details like minor support/resistance levels or short-term trend reversals.
External Structures: These involve larger, more significant market patterns and trends spanning multiple sessions or time frames. This capability helps traders understand overarching market directions.
Customizable Sensitivities
Adjusting sensitivity settings allows users to tailor the indicator's responsiveness to market changes. Higher sensitivity can catch smaller fluctuations, while lower sensitivity might focus on more significant, reliable market moves.
Break of Structure (BoS) and Change of Character (CHoCH)
BoS: This feature identifies points where the price breaks a significant structure, potentially indicating a new trend or a trend reversal.
CHoCH: Detects subtle shifts in the market's behavior, which could suggest the early stages of a trend change before they become apparent to the broader market.
Order Blocks and Market Phases
Order Blocks: These are essentially price levels or zones where significant trading activities previously occurred, likely pointing to the positions of smart money.
HH/LH/LL/LH Areas: Identifying Higher Highs (HH), Lower Highs (LH), Lower Lows (LL), and Lower Highs (LH) helps in understanding the trend and market structure, aiding in predictive analysis.
Rolling Timeframe Highs/Lows and Volume Comparisons
Tracks highs and lows over specified rolling periods, providing dynamic support and resistance levels.
Compares volume data across different timeframes to assess the strength or weakness of the current price movements.
Auto Fibonacci Levels
Automatically calculates and plots Fibonacci retracement levels, a popular tool among traders to identify potential reversal points based on past movements.
Session Data and Volume Intensity
Session Information: Displays current and upcoming trading sessions along with countdown timers, which is crucial for day traders and those trading on session overlaps.
Volume Intensity: Measures and compares the volume within the last 4 hours and 24 hours to gauge market activity and potential breakout/breakdown movements.
Visualizations and Practical Use
Dynamic Visuals: The suite provides dynamic visual aids, such as real-time updating of high/low markers and Fibonacci levels, which adjust as new data comes in. This feature is critical in fast-paced markets.
Strategic Entry/Exit Points: By identifying order blocks and using Fibonacci levels, traders can pinpoint strategic entry and exit points, maximizing potential returns.
Risk Management: Enhanced features like session countdowns and volume intensity help in better risk management by providing traders with more data on market sentiment and potential volatility.
Phang Phập TrungTuTi 14EMAs
EMAs are typically used to give a view of bullish / bearish momentum. When the shorter EMA (calculated off more recent price action) crosses, or is above, the slower moving EMA (calculated off a longer period of price action), it suggests that the market is in an uptrend. This can be an indication to either go long on said asset, or that it is more preferable to take long setups over short setups. Invalidation on long setups is usually found via price action (e.g. previous lows) or simply waiting for an EMA cross in the opposite direction (i.e. shorter EMA crosses under longer term EMA).
This is not a perfect system for trade entry or exit, but it does give a good indication of market trends. The settings for the EMAs can be changed based on user inputs, and by default the candles are coloured based on the crosses to make it more visual
RSI
Stochastic RSI is a separate indicator that has been added to this script. RSI measures Relative Strength (RSI = Relative Strength Index). When RSI is <20 it is considered oversold, and when >80 it is overbought. These conditions suggests that momentum is very strong in the direction of the trend
Bilson Gann CountGann counting is a method for identifying swing points,trends, and overall market structure. It simplifies price action by drawing short trend lines that summarize moves.
There's essentially 4 types of bar/candle.
Up bar - Higher high and higher low than previous bar
Down bar - Lower high and lower low than previous bar
Inside bar - Lower high and higher low than previous bar
Outside bar - Higher high and lower low than previous bar
We use these determinations to decide how the trendline moves through the candles.
Up bars we join to the high, down bars we join to the low, inside bars are ignored.
There are other indicators that already exist which do this, the difference here is how we handle outside bars.
Other gann counting methods skip outside bars, this method determines how to handle the outside bar after the outside bar is broken.
examples
UP -> OUTSIDE -> UP = Outside bar treated as swing low
UP -> OUTSIDE -> DOWN = Outside bar treated as swing high
DOWN -> OUTSIDE -> UP = Outside bar treated as swing low
DOWN -> OUTSIDE -> DOWN = Outside bar treated as swing high
Volume NThe Volume Indicator provides a visual representation of trading volume, expressed in U.S. dollars, directly on your chart. It multiplies each candle's closing price by its volume to compute the volume in dollar terms, offering a clearer perspective on market activity relative to price movements.
Features:
Volume Calculation: The indicator calculates the volume in dollar terms by multiplying the closing price by the trading volume of each bar.
Color Coding: Bars are colored to highlight significant trading activity. Standard bars are displayed in blue, whereas bars representing the highest trading volume over the latest 10-bar period are colored red.
Dynamic Labels: Red bars, indicating peak volume within the specified period, feature dynamically positioned labels that display the dollar amount, formatted to three significant figures. Labels are appended with "M" for millions or "B" for billions as appropriate, followed by a dollar sign to denote currency.
Automatic Label Adjustment: To avoid label overlap and maintain chart clarity, labels adjust their vertical positioning automatically based on proximity to other labels.
Usage:
This indicator is particularly useful for traders who wish to assess the strength of price movements in conjunction with volume. By quantifying volume in dollar terms, it provides a more standardized measure of trading intensity, which can be beneficial for making informed trading decisions in both high and low volatility environments.
Symbol CorrelationThe "Symbol Correlation" indicator calculates and displays the correlation between the chosen symbol's price and another selected source over a specified period. It also includes a moving average (SMA) of this correlation to provide a smoothed view of the relationship.
Why SMA and Table Display ?
The inclusion of SMA (Simple Moving Average) with adjustable length (SMA Length) enhances the indicator's utility by smoothing out short-term fluctuations in correlation, allowing for clearer trend identification. The SMA helps to visualize the underlying trend in correlation, making it easier to spot changes and patterns over time.
The table display of the correlation SMA value offers a concise summary of this trend. By showcasing the current correlation SMA alongside its historical values, traders can quickly gauge the relationship's strength relative to previous periods.
Interpreting the Indicator:
1. Correlation Values: The primary plot shows the raw correlation values between the symbol's price and the specified source. A value of 1 indicates a perfect positive correlation, -1 signifies a perfect negative correlation, and 0 suggests no linear relationship.
2. Correlation SMA: The SMA line represents the average correlation over a defined period (SMA Length). Rising SMA values indicate strengthening correlation trends, while declining values suggest weakening correlations.
3. Choosing SMA Length: Traders can adjust the SMA Length parameter to tailor the moving average to their specific analysis horizon. Shorter SMA lengths react quickly to price changes but may be more volatile, while longer SMA lengths smooth out noise but respond slower to recent changes.
In summary, the "Symbol Correlation" indicator is a valuable tool for assessing the evolving relationship between a symbol's price and an external source. Its use of SMA and tabular presentation facilitates a nuanced understanding of correlation trends, aiding traders in making informed decisions based on market dynamics.
Three Thumbs IndicatorChecks following on daily chart:
current close above previous year close
5th close above previous year close
current close above SMA200
RSI and ATR Trend Reversal SL/TPQuick History:
I was frustrated with a standard fixed percent TP/SL as they often were not receptive to quick market rallies/reversals. I developed this TP/SL and eventually made it into a full fledge strategy and found it did well enough to publish. This strategy can be used as a standalone or tacked onto another strategy as a TP/SL. It does function as both with a single line. This strategy has been tested with TSLA , AAPL, NVDA, on the 15 minutes timeframe.
HOW IT WORKS:
Inputs:
Length: Simple enough, it determines the length of the RSI and ATR used.
Multiplier: This multiplies the RSI and ATR calculation, more on this later.
Delay to prevent Idealization: TradingView will use the open of the bar the strategy triggers on when calculating the backtest. This can produce unrealistic results depending on the source. If your source is open, set to 0, if anything else, set to 1.
Minimum Difference: This is essentially a traditional SL/TP, it is borderline unnecessary, but if the other parameters are wacky this can be used to ensure the SL/TP. It multiplies the source by the percent, so if it is set to 10, the SL/TP is initialized at src +- 10%.
Source input: Self Explanatory, be sure to update the Delay if you use open.
CALCULATION:
Parameters Initialization:
The strategy uses Heikinashi values for calculations, this is not toggleable in parameters, but can be easily changed by changing hclose to equal src.
FUNCTION INITIALIZATION:
highest_custom and lowest_custom do the same thing as ta.highest and ta.lowest, however the built in ta library does not allow for var int input, so I had to create my own functions to be used here. I actually developed these years ago and have used them in almost every strategy since. Feel especially free to use these in your own scripts.
The rsilev is where the magic happens.
SL/TP min/max are initially calculated to be used later.
Then we begin by establishing variables.
BullGuy is used to determine the length since the last crossup or crossdown, until one happens, it returns na, breaking the function. BearGuy is used in all the calculations, and is the same as BullGuy, unless BullGuy is na, where BearGuy counts up from 1 on each bar from 0.
We create our rsi and have to modify the second one to suit the function. In the case of the upper band, we mirror the lower one. So if the RSI is 80, we want it to be 20 on the upper band.
the upper band and lower band are calculated the exact same way, but mirrored. For the purpose of writing, I'm going to talk about the lower band. Assume everything is mirrored for the upper one. It finds the highest source since the last crossup or crossdown. It then multiplies from 1 / the RSI, this means that a rapid RSI increase will increase the band dramatically, so it is able to capture quick rally/reversals. We add this to the atr to source ratio, as the general volatility is a massive factor to be included. We then multiply this number by our chosen amount, and subtract it from the highest source, creating the band.
We do this same process but mirrored with both bands and compared it to the source. If the source is above the lower band, it suggests an uptrend, so the lower band is outputted, and vice versa for the upper one.
PLOTTING:
We also determine the line color in the same manner as we do the trend direction.
STRATEGY:
We then use the source again, and if it crosses up or down relative to the selected band, we enter a long or short respectively.
This may not be the most superb independent strategy, but it can be very useful as a TP/SL for your chosen entry conditions, especially in volatile markets or tickers.
Thank you for taking the time to read, and please enjoy.
Timeframe Continuity Oscillator [TFO]This indicator is used to visualize timeframe continuity - a core concept of "The Strat" - along with some added logic for potential range limiters.
When discussing timeframe continuity, typically we are evaluating several timeframes to see if price is trading above or below the current open of each respective timeframe. If we are concerned with the 15m, 4h, and 1D for example, and price is trading above the current open of each of those timeframes, we can say that we have full timeframe continuity (FTFC) up. Conversely, if price is trading below the current open of each of those timeframes, we can say that we have FTFC down.
We can visualize this with an oscillator of sorts, where the zero line is anchored to the open price of the highest timeframe that we're concerned with. Using the prior example, this would be the 1D timeframe. As long as price is above the current 1D open, it is impossible to have FTFC down; and as long as price is below the current 1D open, it is impossible to have FTFC up. This is why we base the oscillator's values off of the highest timeframe's open (the values are simply how far price has traded from this open) - any value greater than zero tells us that there is potential to have FTFC up, and any value less than zero tells us that there is potential to have FTFC down.
There are a few ways we chose to visualize this data. First, we can choose the "Binary" option which simply uses one solid bullish color above the zero line, and one solid bearish color below the zero line.
Second, we can choose the "Gradient" option to help describe whether we have FTFC up or down. Values above the zero line will be a mix of the bullish color and mid color, where the mid color indicates no timeframe continuity up and the bullish color indicates FTFC up - sort of like a color spectrum of timeframe continuity to describe how many timeframes are in agreement. Similarly, values below the zero line will be a mix of the bearish color and the mid color, where the mid color again indicates no timeframe continuity down and the bearish color indicates FTFC down.
Lastly, we can choose the "FTFC Only" option which will only color the histogram bars as bullish if there is FTFC up, or bearish if there is FTFC down.
One more feature that we added is these upper and lower bands that aim to help describe the potential upper and lower limits that price may travel, relative to the highest timeframe's open. This is done by taking the standard deviation of some defined lookback period, for example, 2 standard deviations of the previous 10 weeks, assuming 1W is the highest timeframe enabled.
The concept is similar to that of an ADR (average daily range) as it can be used to estimate maximum range extensions for the largest timeframe. The arrows you see are plotted once the value exceeds either band - alerts can be enabled for these events as well through any alert() function call.
ORB Heikin Ashi SPY 5min Correlation StrategyOverview:
The ORB (Opening Range Breakout) strategy combined with Heikin Ashi candles and Relative Volume (RVOL) indicator aims to capitalize on significant price movements that occur shortly after the market opens. This strategy identifies breakouts above or below the opening range, using Heikin Ashi candles for smoother price visualization and RVOL to gauge the strength of the breakout.
Components:
Opening Range Breakout (ORB): The strategy starts by defining the opening range, typically the first few minutes of the trading session. It then identifies breakouts above the high or below the low of this range as potential entry points.
Heikin Ashi Candles: Heikin Ashi candles are used to provide a smoother representation of price movements compared to traditional candlesticks. By averaging open, close, high, and low prices of the previous candle, Heikin Ashi candles reduce noise and highlight trends more effectively.
Relative Volume (RVOL): RVOL compares the current volume of a stock to its average volume over a specified period. It helps traders identify abnormal trading activity, which can signal potential price movements.
Candle for correlation : In this case we are using SPY candles. It can also use different asset
Strategy Execution:
Initialization: The strategy initializes by setting up variables and parameters, including the ORB period, session timings, and Heikin Ashi candle settings.
ORB Calculation: It calculates the opening range by identifying the high and low prices during the specified session time. These values serve as the initial reference points for potential breakouts. For this we are looking for the first 30 min of the US opening session.
After that we are going to use the next 2 hours to check for breakout opportunities.
Heikin Ashi Transformation: Optionally, the strategy transforms traditional candlestick data into Heikin Ashi format for smoother visualization and trend identification.
Breakout Identification: It continuously monitors price movements within the session and checks if the current high breaches the ORB high or if the current low breaches the ORB low. These events trigger potential long or short entry signals, respectively.
RVOL Analysis: Simultaneously, the strategy evaluates the relative volume of the asset to gauge the strength of the breakout. A surge in volume accompanying the breakout confirms the validity of the signal. In this case we are looking for at least a 1 value of the division between currentVolume and pastVolume
Entry and Exit Conditions: When a breakout occurs and is confirmed by RVOL and is within our session time, the strategy enters a long or short position accordingly. It does not have a stop loss or a takie profit level, instead it will always exit at the end of the trading session, 5 minutes before
Position Sizing and Commissions: For the purpose of this backtest, the strategy allocated 10% of the capital for each trade and assumes a trading commission of 0.01$ per share ( twice the IBKR broker values)
Session End: At the end of the trading session, the strategy closes all open positions to avoid overnight exposure.
Conclusion:
The combination of ORB breakout strategy, Heikin Ashi candles, and RVOL provides traders with a robust framework for identifying and capitalizing on early trends in the market. By leveraging these technical indicators together, traders can make more informed decisions and improve the overall performance of their trading strategies. However, like any trading strategy, it's essential to backtest thoroughly and adapt the strategy to different market conditions to ensure its effectiveness over time.
Inside and Outside BarsInside Bar:
An inside bar forms when the high and low range of a candlestick is within the high and low range of the previous candlestick.
In other words, the current candlestick's high is lower than the previous candlestick's high, and the current candlestick's low is higher than the previous candlestick's low.
Inside bars indicate a period of consolidation or indecision in the market. They often occur after a strong move in price and can signal a potential reversal or continuation of the trend, depending on the context.
Outside Bar:
An outside bar (or engulfing bar) forms when the high and low range of a candlestick completely engulfs the high and low range of the previous candlestick.
In bullish outside bars, the current candlestick's high is higher than the previous candlestick's high, and the low is lower than the previous candlestick's low.
In bearish outside bars, the current candlestick's high is lower than the previous candlestick's high, and the low is higher than the previous candlestick's low.
Outside bars often indicate a significant shift in market sentiment. Bullish outside bars suggest increased bullish momentum, while bearish outside bars suggest increased bearish momentum.
Volumetric Fair Value Gaps [AlgoAlpha]🎯 Introducing the Volumetric Fair Value Gaps by AlgoAlpha 🎯
Embrace the power of volume and price action with the Volumetric Fair Value Gaps (VFVG) indicator, designed meticulously by AlgoAlpha. This innovative tool enhances your charting capabilities by highlighting fair value gaps in real-time, facilitating superior market entry and exit decisions. 🚀📈
🔍 Key Features:
🔹 Fair Value Gap Detection: Utilizes price action and volume to identify significant fair value gaps, offering potential high-probability trading opportunities.
🔹 Adjustability: Customize the sensitivity with 'FVG Noise Reduction Length' and 'Noise Reduction Factor' to match the volatility and characteristics of the asset being traded.
🔹 Visual Appeal: Displays bullish gaps in a soothing Bullish Color and bearish gaps in a striking Bearish Color, making it easy to spot and analyze trends on the fly.
🔹 Overlay Feature: Plots directly on the price chart for seamless integration and analysis.
🌟 Quick Guide to Using the Volumetric Fair Value Gaps Indicator:
🛠 Add the Indicator: Add the indicator to favourites and set it up with your desired settings.
📊 Market Analysis: Watch for the appearance of colored boxes (blue for bearish, gray for bullish) which represent the fair value gaps. These are high-probability areas for reversals or continuations. FVGs with higher volume are implied to induce a stronger reaction on price.
🔔 Alerts: Set up alerts to notify you when new gaps are detected, ensuring you never miss out on potential trades!
🛠 How It Works:
The Volumetric Fair Value Gaps (VFVG) indicator identifies significant price gaps that are not just based on price action but are also substantiated by volume, which are often overlooked in typical analyses. It operates by comparing the current candle’s price range against historical averages and is calculated over a user-defined period, displayed with volume for further insights. For a gap to be recognized as significant (either bullish or bearish), it must exceed a certain size relative to these averages, which can be adjusted for sensitivity using the provided settings. Bullish gaps are identified when the current low is higher than the second previous high after surpassing the threshold, and bearish gaps are marked when the current high is below the second previous low, similarly surpassing the threshold. This dual-confirmation (volume and price deviation) approach minimizes false signals and enhances the reliability of identified gaps.
Maximize your trading strategy with the VFVG Indicator by AlgoAlpha and turn those gaps into opportunities! 🌈✨
Fair Value Gaps (FVG) [UAlgo]A fair value gap is especially popular among price action traders and occurs when there are inefficiencies or imbalances in the market, or when the buying and selling are not equal. Fair value gaps can become a magnet for the price before continuing in the same direction.
🔶 Key Features :
Fair Value Gap Identification:
Bullish fair value gaps occur when the current market price exceeds the previous high. The indicator identifies bullish gaps by comparing the low of the current candle with the high of the candle two candles ago . If the low of the current candle is higher than the high two candles ago and the closing price of the previous candle is also higher than the high two candles ago, a bullish fair value gap is detected.
Bearish fair value gaps occur when the current market price falls below the previous low. The indicator identifies bearish gaps by comparing the high of the current candle with the low of the candle two candles ago. If the high of the current candle is lower than the low two periods ago and the closing price of the previous candle is also lower than the low two candles ago, a bearish fair value gap is detected.
Fair Value Gap Filter :
ATR measures market volatility by analyzing the range of price movements over a specified period. It provides insights into the average price range that a security experiences within a given timeframe. After the ATR is calculated, a Simple Moving Average (SMA) is computed for the ATR values. This moving average smoothens out the ATR data, providing a clearer indication of the average volatility levels over time.
When the filter is active, fair value gaps are identified only if they occur during periods of relatively higher volatility, as indicated by the ATR being greater than the SMA. This helps in refining and obtaining the detection of stronger fair value gaps
An example with FVG filtering off:
An example with FVG filtering on:
Customizable Settings: Users have the flexibility to customize various parameters to suit their trading preferences. They can adjust settings such as the number of fair value gaps displayed, mitigation method (either based on closing prices or wicks), and apply filters based on Average True Range (ATR) to refine gap detection.
🔶 Disclaimer :
Use with Caution: Trading involves significant risk, and this indicator should be used with caution. While it can help identify potential trading opportunities, it does not guarantee profits and may sometimes provide false signals.
Not Financial Advice: The information provided by the Fair Value Gaps indicator is for educational and informational purposes only and should not be considered as financial advice. Traders should conduct their own research and consult with financial professionals before making any trading decisions.
Past Performance: Past performance is not indicative of future results. Historical price movements analyzed by the indicator may not accurately predict future market behavior.
Neutral State Stochastic Oscillator {DCAquant}Neutral State Stochastic Oscillator {DCAquant}
The Neutral State Stochastic Oscillator {DCAquant} is an enhanced version of the classic Stochastic Oscillator. This iteration aims to refine the detection of neutral market states — periods where the market is neither overbought nor oversold — potentially signaling a period of consolidation or equilibrium before the next significant price move.
Key Features:
Advanced Oscillator Analysis: It extends the traditional use of the Stochastic Oscillator by identifying a neutral zone, which may signal a pause in market momentum.
Customizable Sensitivity: Users can adjust parameters such as K and D periods, Smooth K, and neutral zone thresholds to tailor the indicator to their trading style.
Neutral Zone Detection: This tool is especially adept at pinpointing where the %K and %D lines converge within a specific threshold, marking a neutral state.
How it Works:
%K and %D Calculation: The indicator calculates the Stochastic %K and %D lines over user-defined periods, smoothing %K for clearer signals.
Neutral Zone Threshold: A threshold defines how close %K and %D lines should be to each other to qualify as a neutral state, offering a refined perspective on market momentum.
Visual Contrast: The indicator employs a distinct color scheme to distinguish between neutral (gray), bullish (%K>%D in aqua), and bearish (%K<%D in fuchsia) market conditions, directly on the price chart.
Visual Indicators and Interpretation:
Neutral Market Condition: A gray background indicates a neutral state where %K and %D are close, suggesting a balanced market awaiting new forces to define the trend.
Market Extremes: Aqua and fuchsia backgrounds highlight when the market is exiting the neutral zone, potentially signaling the start of an uptrend or downtrend.
Strategic Application:
Consolidation and Breakout Identification: This tool helps in identifying consolidation zones which could lead to potential breakouts or breakdowns, aiding in strategic entry and exit decisions.
Multifaceted Market Analysis: By revealing neutral market states, it serves as a vital component in a comprehensive trading strategy, augmenting the insights provided by other technical indicators.
Customization and Usage:
Flexible for Various Markets: The Neutral State Stochastic Oscillator {DCAquant} is adaptable for a variety of markets, whether you're trading cryptocurrencies, stocks, forex, or commodities.
Confirmatory Tool: It acts as an excellent confirmatory tool when used with price action analysis, other oscillators, or trend indicators, ensuring a well-rounded analytical approach.
Disclaimer and User Guidance:
The Neutral State Stochastic Oscillator {DCAquant} is a sophisticated trading tool designed for informative purposes. Traders are advised to use it in conjunction with a robust risk management strategy and not as a standalone decision-making tool. As with all trading indicators, success cannot be guaranteed, and it is recommended that traders perform their due diligence before executing trades based on signals from this or any other analytical tool.