Swing DistanceHello fellas,
This simple indicator helps to visualize the distance between swings. It consists of two lines, the highest and the lowest line, which show the highest and lowest value of the set lookback, respectively. Additionally, it plots labels with the distance (in %) between the highest and the lowest line when there is a change in either the highest or the lowest value.
Use Case:
This tool helps you get a feel for which trades you might want to take and which timeframe you might want to use.
Side Note: This indicator is not intended to be used as a signal emitter or filter!
Best regards,
simwai
Marketstructure
Market Structures SMC [TradingFinder] BOS/CHoCH Major & Minor🟣Introduction
Understanding market structure involves analyzing market behavior. In other words, market structure encompasses how the market forms and evolves within trends.
Market structures are typically fractal and nested, so we categorize them into internal (minor) and external (major) structures. There are various definitions of market structure, with different approaches such as Smart Money and ICT providing their own interpretations.
🟣How to Use
The first step in identifying market structure is to analyze key highs and lows. An uptrend is formed when highs and lows are successively higher than previous ones. Similarly, in a downtrend, lows and highs are successively lower than previous ones.
Market trends consist of two types of movements :
•Impulsive movements
•Corrective movements
Impulsive movements align with the main trend and possess high strength and momentum. Conversely, corrective movements go against the main trend and have lower strength and momentum. The following example illustrates these concepts.
🔵 Identifying Break of Structure (BOS)
In a specific trend, for example in a downtrend, when the price breaks below the previous low and forms a new low (LL), a Break of Structure occurs. In an uptrend, a BOS (Market Structure Break or MSB) happens when the price rises and surpasses the last high.
We need at least one BOS to confirm a trend. Breaking above or below the previous high or low must be confirmed by closing at least one candle after that level.
🔵 Identifying Change of Character (CHOCH)
Change of Character (CHOCH) is a key concept in market structure analysis. A change in structure signals a trend change. In other words, a trend ends with a CHOCH (Market Structure Shift or MSS). For instance, in a downtrend, the price declines with BOS.
BOS indicates the strength of the trend, but when the price increases and surpasses the last high, a CHOCH occurs, signaling a shift from a downtrend to an uptrend.
This does not mean entering a buy trade; instead, we should wait for a BOS in the upward direction to confirm the uptrend. Unlike BOS, confirming a CHOCH does not require a candle to close; simply breaking above or below the previous high or low with the candle's wick is sufficient. The following examples show bearish and bullish CHOCH.
🔵 Range Market Structure
Besides uptrends and downtrends, a third structure often found in the market is the range or sideways structure. In this state, the power of buyers and sellers is almost equal, and the market lacks a clear trend.
Many traders believe that the Forex market ranges 80% of the time. Therefore, it requires a lot of patience to wait for a new trend to start.
🟣 Settings
Through the settings, you can customize the display, visibility, and color of each line as desired.
MTF OB Supply Demand ZonesHello everyone,
This exceptional indicator provides you with visual representations of bullish and bearish order blocks or supply and demand zones across multiple timeframes. In simple terms, bullish order blocks are represented by a small red candle followed by a large red candle, while bearish order blocks are depicted as a small green candle followed by a large red candle. Supply and demand zones are drawn by using order blocks.
Features:
Display order blocks from up to three different timeframes.
Customize the maximum number of boxes shown and the colors of the zones.
Choose from three different modes: OB (Order Block), Extended OB, and Supply/Demand.
Mode Descriptions:
OB: Includes the body of the candle.
Extended OB: Encompasses the body and wick of the candle.
Supply/Demand: Covers the body, wick, and half the body of the large candle.
Usage:
Ensure that charts 2 and 3 are set to a higher timeframe. For modes 2 and 3, it’s recommended to reduce the maximum number of boxes shown. The zones or boxes are transparent, allowing for overlap. This feature aids in identifying reversal zones or confirmed zones. The more intense the color, the stronger the confirmation. If a green zone overlaps a red zone (or vice versa), it signifies a reversal zone.
Thank you for checking out this indicator!
---
Additional Information:
Order blocks refer to specific price areas where large market participants, such as institutional traders, have previously placed significant buy or sell orders. These clusters of orders can impact price movement, liquidity, and market sentiment.
Order blocks are a strategic approach to identifying key levels of support and resistance based on the behavior of institutional traders. These key levels are then utilized as entry or exit points for trades.
An order block is an area where there has been a large concentration of limit orders awaiting execution. These blocks are identified on a chart by observing previous price action and pinpointing areas where the price experienced significant movement or abrupt changes in direction.
Order blocks are used in the following popular trading philosophies:
Smart Money Concepts (SMC)
Inner Circle Trading (ICT)
Price Action
---
Credits to: @AGFXTRADING
Market Structure Volume Distribution [LuxAlgo]The Market Structure Volume Distribution tool allows traders to identify the strength behind breaks of market structure at defined price ranges to measure de correlation of forces between bulls and bears visually and easily.
🔶 USAGE
This tool has three main features: market structure highlighting, grid levels, and volume profile. Each feature is covered more in depth below:
🔹 Market Structure
The basic unit of market structure is a swing point, the period of the swing point is user-defined, so traders can identify longer-term market structures. Price breaking a prior swing point will confirm the occurrence of a market structure.
The tool will plot a line after a market structure is confirmed, by default the lines on bullish MS will be green (indicative of an uptrend), and red in case of bearish MS (indicative of a downtrend).
🔹 Grid Levels
The Grid visually divides the price range contained inside the tool execution window, into equal size rows, the number of rows is user-defined so users can divide the full price range up to 100 rows.
The main objective of this feature is to help identify the execution window and the limits of each row in the volume profile so traders can know in a simple look what BoMS belongs to each row.
There is however another use for the grid, by dividing the range into equal-sized parts, this feature provides automatic support and resistance levels as good as any other.
Grid provides a visual help to know what our execution window is and to associate MS with their rows in the profile. It can provide S/R levels too.
🔹 Volume Profile
The volume profile feature shows in a visually easy way the volume behind each MS aggregated by rows and divided into buy and sell volume to spot the differences in a simple look.
This tool allows users to spot the liquidity associated with the event of a market structure in a specific price range, allowing users to know which price areas where associated with the most trading activity during the occurrence of a market structutre.
🔶 SETTINGS
🔹 Data Gathering
Execute on all visible range: Activate this to use all visible bars on the calculations. This disables the use of the next parameter "Execute on the last N bars". Default false.
Execute on the last N bars: Use last N bars on the calculations. To use this parameter "Execute on all visible range" must be disabled. Values from 20 to 5000, default 500.
Pivot Length: How many bars will be used to confirm a pivot. The bigger this parameter is the fewer breaks of structure will detect. Values from 1, default 2
🔹 Profile
Profile Rows: Number of rows in the volume profile. Values from 2 to 100, default 10.
Profile Width: Maximum width of the volume profile. Values from 25 to 500, default 200.
Profile Mode: How the volume will be displayed on each row. "TOTAL VOLUME" will aggregate buy & sell volume per row, "BUY&SELL VOLUME" will separate the buy volume from the sell volume on each row. Default BUY&SELL VOLUME.
🔹 Style
Buy Color: This is the color for the buy volume on the profile when the "BUY&SELL VOLUME" mode is activated. Default green.
Sell Color: This is the color for the sell volume on the profile when the "BUY&SELL VOLUME" mode is activated. Default red.
Show dotted grid levels: Show dotted inner grid levels. Default true.
Smart Money Setup 03 [TradingFinder] Minor OB & Trend Proof🔵 Introduction
The "Smart Money Concept" transcends mere technical trading strategies; it embodies a comprehensive philosophy elucidating market dynamics. Central to this concept is the acknowledgment that influential market participants manipulate price actions, presenting challenges for retail traders.
As a "retail trader", aligning your strategy with the behavior of "Smart Money," primarily market makers, is paramount. Understanding their trading patterns, which revolve around supply, demand, and market structure, forms the cornerstone of your approach. Consequently, decisions to enter trades should be informed by these considerations.
🟣 Important Note
In this setup, pattern formation revolves around the robustness of the "Stop Hunt" targeting retail traders.
When this stop hunt occurs, if the price tests below the minor pivot or above the minor pivot, a "Minor Order Block" is formed.
Similarly, if the price tests below the major pivot or above the major pivot, a "Major Order Block" is formed.
Since the price hasn't successfully broken the major pivots before breaking the Top or Bottom, it can be inferred that the minor pivots formed within a leg of price movement exhibit a "Range" structure.
For a deeper comprehension of this setup, refer to the accompanying visual aids below.
Bullish Setup Details :
Bearish Setup Details :
🔵 How to Use
Upon integrating the indicator into your chart, exercise patience as you await the evolution of the trading setup.
Experiment with different trading positions by adjusting both the "Time Frame" and "Pivot Period". Typically, setups materializing over longer "Time Frames" and "Pivot Periods" carry heightened validity.
Bullish Setup Details on Chart :
Bearish Setup Details on Chart :
Within the settings, you possess the flexibility to modify the "Pivot Period" input to tailor the indicator to your preferences.
Market Structure (Intrabar) [LuxAlgo]The Market Structure (Intrabar) indicator is designed to automatically detect and highlight real-time intrabar market structures, a core component of the Smart Money Concepts methodology.
🔶 USAGE
The proposed indicator gives a detailed picture of the most recent candle lower timeframe trends, highlighting market structures within them.
This can be particularly useful to assess the price dynamic within the most recent candle. For example, we can see how pronounced a trend is by the number of opposite bullish/bearish market structures formed within the candle.
Users can select the intrabar timeframe of interest from the "Intrabar Timeframe" setting, using a timeframe significantly lower than the chart timeframe will return more intrabar candles and potentially more market structures.
🔹 Dashboard
Users have access to a dashboard returning useful statistics such as the number of formed CHoCH's and BOS's from the intrabar prices. These can be indicative of how predominant a trend is within the intrabar data or if there exist multiple trends.
🔶 DETAILS
Market structures allow determining trend continuations as well as trend reversals in the market through two distinct structures:
🔹 Change of Character (CHoCH)
A change of character (CHoCH) refers to a shift in the market behavior of a security that is driven by changes in the underlying supply and demand dynamics. CHoCH's are indicative of confirmed reversals.
🔹 Break of Structure (BoS)
The break of structure (BoS) refers to the point at which a key level of support or resistance is broken. BOS's are indicative of confirmed trend continuations.
🔶 SETTINGS
🔹Inside the Bar Market Structure
Intrabar Timeframe: Lower timeframe setting option, if set to 'Auto' the script will determine the lower timeframe based on the chart timeframe.
Intrabar Market Structure, Length: Toggles the visibility of the break of structures and change of characters. Length defines the detection length of the swing levels.
Intrabar Swing Levels: Toggles the visibility of the swing levels, including a color customization option for highs and lows.
Intrabar Statistics: Toggles the visibility of the dashboard. Some further statistical details are presented in the tooltips of the table cells
🔹 General
Market Structure Colors: Color customization option for the break of structure and change of character lines and labels.
Intrabar Candle Colors: Color customization option for intrabar candles.
Intrabar Candles Horizontal Offset: Adjusting the intrabar candles horizontal position
Dashboard: Dashboard position and size customization option
🔶 LIMITATIONS
Please note that seconds-based intervals are available for premium and professional plan holders, which implies that the seconds-based intervals usage of the indicator may not be available for all users depending on their subscription plan.
🔶 RELATED SCRIPTS
Smart-Money-Concepts
ICT-Concepts
Smart Money Setup 02 [TradingFinder] Mitigated Major OB Proof🔵 Introduction
"Smart money" is money invested by knowledgeable individuals at the right time, and this investment can yield the highest returns.
The concept we focus on in this indicator is whether the market is in an uptrend or downtrend. The market briefly takes a weak and reversal trend with "Minor BoS" without being able to break the major pivot.
In the next step, it returns to its main trend with a strong bullish move and continues its trend with a "Major BoS". The "order block" behind this rapid and powerful movement can be a valid order block for trading.
To better understand this setup, please refer to the explanations in the two images below.
Bullish Setup Details :
Bearish Setup Details :
🔵 How to Use
After adding the indicator to the chart, you should wait for trading opportunities to form. By changing the "Time Frame" and "Period Pivot", you can see different trading positions. In general, the lower the "Time Frame" and "Period Pivot", the higher the likelihood of forming trading opportunities.
Bullish Setup Details on Chart :
Bearish Setup Details on Chart :
You can access "Period Pivot" via settings as an input.
Inversion Fair Value Gap Screener | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Inverse Fair Value Gap Screener! This screener can provide information about the latest Inverse Fair Value Gaps in up to 5 tickers. You can also customize the algorithm that finds the Inverse Fair Value Gaps and the styling of the screener.
Features of the new Inverse Fair Value Gap (IFVG) Screener :
Find Latest Inverse Fair Value Gaps Across 5 Tickers
Shows Their Information Of :
Latest Status
Number Of Retests
Consumption Percent
Volume
Customizable Algorithm / Styling
📌 HOW DOES IT WORK ?
A Fair Value Gap generally occur when there is an imbalance in the market. They can be detected by specific formations within the chart. An Inverse Fair Value Gap is when a FVG becomes invalidated, thus reversing the direction of the FVG.
IFVGs get consumed when a Close / Wick enters the IFVG zone. Check this example:
This screener then finds Fair Value Gaps across 5 different tickers, and shows the latest information about them.
Status ->
Far -> The current price is far away from the IFVG.
Approaching ⬆️/⬇️ -> The current price is approaching the IFVG, and the direction it's approaching from.
Inside -> The price is currently inside the IFVG.
Retests -> Retest means the price tried to invalidate the IFVG, but failed to do so. Here you can see how many times the price retested the IFVG.
Consumed -> IFVGs get consumed when a Close / Wick enters the IFVG zone. For example, if the price hits the middle of the IFVG zone, the zone is considered 50% consumed.
Volume -> Volume of a IFVG is essentially the volume of the bar that broke the original FVG that formed it.
🚩UNIQUENESS
This screener can detect latest Inverse Fair Value Gaps and give information about them for up to 5 tickers. This saves the user time by showing them all in a dashboard at the same time. The screener also uniquely shows information about the number of retests and the consumed percent of the IFVG, as well as it's volume. We believe that this extra information will help you spot reliable IFVGs easier.
⚙️SETTINGS
1. Tickers
You can set up to 5 tickers for the screener to scan Fair Value Gaps here. You can also enable / disable them and set their individual timeframes.
2. General Configuration
FVG Zone Invalidation -> Select between Wick & Close price for FVG Zone Invalidation.
IFVG Zone Invalidation -> Select between Wick & Close price for IFVG Zone Invalidation. This setting also switches the type for IFVG consumption.
Zone Filtering -> With "Average Range" selected, algorithm will find FVG zones in comparison with average range of last bars in the chart. With the "Volume Threshold" option, you may select a Volume Threshold % to spot FVGs with a larger total volume than average.
FVG Detection -> With the "Same Type" option, all 3 bars that formed the FVG should be the same type. (Bullish / Bearish). If the "All" option is selected, bar types may vary between Bullish / Bearish.
Detection Sensitivity -> You may select between Low, Normal or High FVG detection sensitivity. This will essentially determine the size of the spotted FVGs, with lower sensitivities resulting in spotting bigger FVGs, and higher sensitivities resulting in spotting all sizes of FVGs.
Market Structures Screener | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Market Structures Screener! This screener can provide information about the latest market structures in up to 5 tickers. You can also customize the styling of the screener.
Features of the new Market Structures Screener :
Find Latest Market Structures Across 5 Tickers
Break Of Structure (BOS)
Change of Character (CHoCH)
Change of Character+ (CHoCH+)
Customizable Algoritm / Styling
📌 HOW DOES IT WORK ?
Sometimes specific market structures form and break as the market fills buy & sell orders. Formed Change of Character (CHoCH) and Break of Structure (BOS) often mean that market will change direction, and they can be spotted by inspecting low & high pivot points of the chart.
This screener then finds market structures across 5 different tickers, and shows the latest information about them.
🚩UNIQUENESS
Formed market structures can be strong hints about the current direction and the state of the market, and our screener has the ability to detect Change Of Character structures of the market with higher sensitivity (CHoCH+), so you will miss less hints. This screener will then show the elapsed time of the found BOS, CHoCH and CHoCH+ structures.
⚙️SETTINGS
1. Tickers
You can set up to 5 tickers for the screener to scan market structures here. You can also enable / disable them and set their individual timeframes.
ICT Concept [TradingFinder] Order Block | FVG | Liquidity Sweeps🔵 Introduction
The "ICT" style is one of the subsets of "Price Action" technical analysis. ICT is a method created by "Michael Huddleston", a professional forex trader and experienced mentor. The acronym ICT stands for "Inner Circle Trader".
The main objective of the ICT trading strategy is to combine "Price Action" and the concept of "Smart Money" to identify optimal entry points into trades. However, finding suitable entry points is not the only strength of this approach. With the ICT style, traders can better understand price behavior and adapt their trading approach to market structure accordingly.
Numerous concepts are discussed in this style, but the key practical concepts for trading in financial markets include "Order Block," "Liquidity," and "FVG".
🔵 How to Use
🟣Order Block
Order blocks are a specific type of "Supply and Demand" zones formed when a series of orders are placed in a block. These orders could be created by banks or other major players. Banks typically execute large orders in blocks during their trading sessions. If they were to enter the market directly with a small quantity, significant price movements would occur before the orders are fully executed, resulting in less profit. To avoid this, they divide their orders into smaller, manageable positions. Traders should look for "buy" opportunities in "demand order blocks" areas and "sell" opportunities in "supply order blocks".
🟣Liquidity
These levels are where traders aim to exit their trades. "Market Makers" or smart money usually collects or distributes their trading positions near levels where many retail traders have placed their "Stop Loss" orders. When the liquidity resulting from these losses is collected, the price often reverses direction.
A "Stop Hunt" is a move designed to neutralize liquidity generated by triggered stop losses. Banks often use significant news events to trigger stop hunts and acquire the liquidity released in the market. If, for example, they intend to execute heavy buy orders, they encourage others to sell through stop hunts.
As a result, if there is liquidity in the market before reaching the order block region, the credibility of that order block is higher. Conversely, if liquidity is near the order block, meaning the price reaches the order block before reaching the liquidity area, the credibility of that order block is lower.
🟣FVG (Fair Value Gap)
To identify the "Fair Value Gap" on the chart, one must analyze candle by candle. Focus on candles with large bodies, examining one candle and the one before it. The candles before and after this central candle should have long shadows, and their bodies should not overlap with the body of the central candle. The distance between the shadows of the first and third candles is called the FVG range.
These zone function in two ways :
•Supply and Demand zone: In this case, the price reacts to these zone, and its trend reverses.
•Liquidity zone: In this scenario, the price "fills" the zone and then reaches the order block.
Important Note: In most cases, FVG zone with very small width act as supply and demand zone, while zone with a significant width act as liquidity zone, absorbing the price.
🔵 Setting
🟣Order Block
Refine Order Block : When the option for refining order blocks is Off, the supply and demand zones encompass the entire length of the order block (from Low to High) in their standard state and remain unaltered. On the option for refining order blocks triggers the improvement of supply and demand zones using the error correction algorithm.
Refine Type : The enhancement of order blocks via the error correction algorithm can be executed through two methods: Defensive and Aggressive. In the Aggressive approach, the widest possible range is taken into account for order blocks.
Show High Levels : If major high levels are to be displayed, set the option for showing high level to Yes.
Show Low Levels : If major low levels are to be displayed, set the option for showing low level to Yes.
Show Last Support : If showing the last support is desired, set the option for showing last support to Yes.
Show Last Resistance : If showing the last resistance is desired, set the option for showing last resistance to Yes.
🟣 FVG
FVG Filter : When FVG filtering is activated, the number of FVG areas undergoes filtration based on the specified algorithm.
FVG Filter Types :
1. Very Aggressive : Apart from the initial condition, an additional condition is introduced. For an upward FVG, the maximum price of the last candle should exceed the maximum price of the middle candle. Similarly, for a downward FVG, the minimum price of the last candle should be lower than the minimum price of the middle candle. This mode eliminates a minimal number of FVGs.
2. Aggressive : In addition to the conditions of the Very Aggressive mode, this mode considers the size of the middle candle; it should not be small. Consequently, a larger number of FVGs are eliminated in this mode.
3. Defensive : Alongside the conditions of the Very Aggressive mode, this mode takes into account the size of the middle candle, which should be relatively large with the majority of it comprising the body. Furthermore, to identify upward FVGs, the second and third candles must be positive, whereas for downward FVGs, the second and third candles must be negative. This mode filters out a considerable number of FVGs, retaining only those of suitable quality.
4. Very Defensive : In addition to the conditions of the Defensive mode, the first and third candles should not be very small-bodied doji candles. This mode filters out the majority of FVGs, leaving only the highest quality ones. Show Demand FVG: Enables the display of demand-related boxes, which can be toggled between off and on. Show Supply FVG: Enables the display of supply-related boxes along the path, which can also be toggled between off and on.
🟣 Liquidity
Statics Liquidity Line Sensitivity : A value ranging from 0 to 0.4. Increasing this value reduces the sensitivity of the "Statics Liquidity Line Detection" function and increases the number of identified lines. The default value is 0.3.
Dynamics Liquidity Line Sensitivity : A value ranging from 0.4 to 1.95. Increasing this value enhances the sensitivity of the "Dynamics Liquidity Line Detection" function and decreases the number of identified lines. The default value is 1.
Statics Period Pivot : Default value is set to 8. By adjusting this value, you can specify the period for static liquidity line pivots.
Dynamics Period Pivot : Default value is set to 3. By adjusting this value, you can specify the period for dynamic liquidity line pivots.
You can activate or deactivate liquidity lines as necessary using the buttons labeled "Show Statics High Liquidity Line," "Show Statics Low Liquidity Line," "Show Dynamics High Liquidity Line," and "Show Dynamics Low Liquidity Line".
Market Structure with Inducements & Sweeps [LuxAlgo]The Market Structure with Inducements & Sweeps indicator is a unique take on Smart Money Concepts related market structure labels that aims to give traders a more precise interpretation considering various factors.
Compared to traditional market structure scripts that include Change of Character (CHoCH) & Break of Structures (BOS) -- this script also includes the detection of Inducements (IDM) & Sweeps which are major components of determining other structures labeled on the chart.
SMC & price action traders have historically considered this a more accurate representation of market structure by including these components.
🔶 USAGE
Below we can see a diagram for how market structure is displayed within the Market Structure with Inducements & Liquidity indicator.
Change of Characters (CHoCH) are based on swing points detection, while Break of Structures (BOS) are based on trailing maximum & minimums from the detected Change of Characters. We do this for a more dynamic & timely display of market structure.
🔹 Inducements (IDM)
Traders that consider inducements as a part of their analysis of Change of Characters & Break of Structures can more easily avoid fakeouts within trends as shown below.
In this script IDM's are always required between each market structures.
🔹 Sweeps of Liquidity (x)
SMC traders looking to properly analyze market structure need to look for sweeps of liquidity to ensure levels that are wicked are noted as sweeps, while levels that are fully closed above / below are labeled as confirmed market structures.
In the chart below we can see a Sweep of Liquidity which typically can occur on the longer term price action and indicate a potential reversal.
Notably, since labels such as CHoCH or BOS's can occur at the same level as a Sweep of liquidity, we have allowed the indicator to display the market structure label at the current bar in the event this happens.
The Sweeps of Liquidity are also based on trailing maximum / minimum, which allows for a continuous evaluation of areas for liquidity sweeps to occur.
This can be helpful for traders looking for longer term & shorter term sweeps.
🔶 SETTINGS
CHoCH Detection Period: Detection period for CHoCH's, higher values will return longer term CHoCH's.
IDM Detection Period: Detection period for IDM's, higher values will return longer term IDM's.
Thank you all for 500k followers on TradingView! Enjoy!
Enhanced Candle Sticks [AlgoAlpha]🚀🌟 Introducing the Enhanced Candle Sticks by AlgoAlpha, a Pine Script tool designed to provide traders with an enhanced view of market dynamics through candlestick analysis. This script aims to visualise if price has hit the high or low of the candle first, aiding in back-testing, and to identify smaller trends using market structure.📊🔍
Key Features:
Timeframe Flexibility: Users can select their desired timeframe for analysis, offering a range of options from M15 to H12. This flexibility allows for detailed and specific timeframe analysis.
Micro Trend Identification: The script includes an option to enable 'MicroTrends', giving traders insights into smaller movements and trends within the larger market context.
Customizable Visuals: Traders can customize the colors of bullish and bearish candlesticks, enhancing visual clarity and personalizing the chart to their preferences.
State Tracking: The script tracks the 'state' of the market on lower timeframes to detect if the high or the low was formed first.
Warning System: When the selected timeframe does not match the chart timeframe, the script generates a warning, ensuring accurate analysis and preventing potential misinterpretations.
Usages:
Enhanced Back-testing: Users can now get a more accurate interpretation of the candlesticks by know if the high or the low came first (denoted with ⩚ or ⩛), especially in scenarios where the high and the low of the larger timeframe candle is touching both the take-profit and stop-loss levels.
Squeeze Analysis: Users can identify squeezes in price when the microtrend shows both an uptrend and a downtrend, possibly giving more insight into the market.
Lower Timeframe Market Structure Analysis: Microtrends form when the low of the candle is consecutively increasing and the high is consecutively falling, which means on a lower timeframe, price is forming higher lows or lower highs.
Basic Logic Explanation:
- The script starts by setting up the necessary parameters and importing the required library. Users can customize the timeframe, colors, and whether to enable micro trends and candlestick plotting.
- It then calculates the lower timeframe (1/12th of the current timeframe) for more detailed analysis. The `minutes` function helps in converting the selected timeframe into minutes.
- The script tracks new bars and calculates the highest and lowest values within an hour, using `ta.highestSince` and `ta.lowestSince`.
- It determines the market 'state' by checking if the current high is breaking the previous high and if the current low is breaking the previous low on lower timeframes to determine if the high or the low was formed first.
- The script uses the `plotchar` and `plotcandle` functions to visually represent these trends and states on the chart. This visual representation is key for quick and effective analysis.
Alerts:
Alerts can be set for microtrend formations:
This script is a valuable tool for traders looking to deepen their market analysis with enhanced candlestick visualization and micro trend tracking. 📈🔶💡
Protected Highs & Lows [TFO]This indicator presents an alternative approach to identify Market Structure. The logic used is derived from learning material created by @DaveTeaches
When quantifying Market Structure, it is common to use fractal highs and lows to identify "significant" swing pivots. When price closes through these pivots, we may identify a Market Structure Shift (MSS) for reversals or a Break of Structure (BOS) for continuations. The main difference with this "protected" logic is in how we determine the pivots/levels that are utilized to determine a valid MSS or BOS.
Nonetheless, the significance of our swing pivots is still governed by the input Pivot Strength parameter, which requires valid swing pivots to be compared to this many bars to the left and right of them. This is an optional parameter as it is traditionally set to 1 by default.
When identifying a BOS: When price closes below a valid swing low, we look back from the current bar to find the highest high that was made in that range. This becomes our protected high; similarly, when price closes above a valid swing high, we look back from the current bar to find the lowest low that was made in that range, which then becomes our protected low.
Note these valid highs and lows are the first swing pivots created after a MSS/BOS. For example, when price makes a bullish BOS/MSS and then trades away, a swing high is formed. This first swing high is what needs to be traded through to see a valid BOS.
When identifying a MSS: If the current trend is bearish and we're looking for a bullish reversal, we would need price to close above the most recent protected high. When this happens, we still look back to find the lowest low that was created in that range, and make that our new protected low. Likewise when looking for a bearish reversal, price would need to close below the most recent protected low, which would then give us a new protected high as a result (the highest point in that range).
The Trend Candles option allows users to easily visualize the current state of Market Structure with bullish and bearish colors. Users may also show BOS and MSS labels if desired.
Show Protected Highs & Lows will annotate the protected highs and lows, just note that the labels themselves are plotted in the past due to the lookback function required to identify them.
Lastly, the Show Protected Trail option will draw a line to essentially indicate a trailing stop-like line to denote the most recent protected low (if bullish) or protected high (if bearish).
I am simply a student of Dave's concepts, so please feel free to leave feedback if you are familiar with his concepts and have suggestions/improvements.
Market Pivot Levels [Past & Live]Market Levels provide a robust view of daily pivot points of markets such as high/low/close with both past and live values shown at the same time using the recently updated system of polylines of pinescript.
The main need for this script arose from not being able to use plots for daily points because plots are inherently once drawn can't be erased and because we can't plot stuff for previous bars after values are determined we can't use them reliably. And while we can use traditional lines, because we would have extremely high amount of lines and we would have to keep removing the previous ones it wouldn't be that effective way for us. So we try to do it with the new method of polylines .
Features of this script:
- Daily High/Low Points
- Yesterday High/Low/Close Points
- Pre-Market High-Low points.
Now let's preview some of the important points of code and see how we achieve this:
With the code below we make sure no matter which chart we are using we are getting the extended hours version of sessions so our calculations are made safely for viewing pre-market conditions.
// Let's get ticker extended no matter what the current chart is
tc = ticker.new(syminfo.prefix, syminfo.ticker, session.extended)
Coding our own function to calculate high's and low's because inbuilt pinescript function cannot take series and we send this function to retrieve our high's and lows.
// On the fly function to calculate daily highlows instead of tv inbuilt because tv's length cannot take series
f_highlow(int last) =>
bardiff = last
float _low = low, float _high = high
for i = bardiff to 0 by 1
if high > _high
_high := high
if low < _low
_low := low
With doing calculations at the bars of day ending points we can retrieve the correct points and values and push them for our polylines array so it can be used in best way possible.
// Daily change points
changeD = timeframe.change("D")
// When new day starts fill polyline arrays with previous day values for polylines to draw on chart
// We also update prevtime values with current ones after we pushed to the arrays
if changeD
f_arrFill(cpArrHigh, cpArrLow, prevArrh, prevArrl, prevArrc, prevMarh, prevMarl)
valHolder.unshift(valueHold.new(_high, _low, _high, _close, _low, time, pr_h, pr_l))
The rest of the code is annotated and commented. You can let me know in comments if you have any questions. Happy trading.
ICT HTF MSS & Liquidity (fadi)ICT HTF MSS & Liquidity provides higher timeframe view of where the liquidity may reside and when higher timeframe market structure shift has occurred.
In his 2022 mentorship, ICT has advocated used the 15m chart to watch for liquidity and looking for lower timeframes for entry (5m,4m,3m,2m,1m).
Liquidity will reside above pivot points and ICT pivot points are based on 3 candle formation for the short term, three short term formation for intermediate, and three intermediate formation for the long terms.
Options
Timeframe Timeframe to monitor
Use the Short, Intermediate, or Long Term highs and lows
Liquidity Styles
Open liquidity line style, size, and color
Claimed liquidity line style, size, and color
Extend the open liquidity line beyond the current candle
Number of lines to display, this includes claimed and open
Market Structure (Breakers) [LuxAlgo]The Market Structure (Breakers) indicator aims to detect "Breaker Market Structures", an original concept inspired by breaker blocks, and extend on the original concept of market structures by extending existing MS levels, providing supports/resistances as a result.
Various graphical elements are included that highlight the interactions between price and Breaker structures.
🔶 USAGE
Breaker structures occur when a market structure is confirmed (price breaking a previous swing level). The broken swing point is extended by a dotted line which can be used as potential support or resistance.
After a market structure, the price can eventually reverse and break one or multiple breaker structures at the same time, allowing for the detection of new trends in the price.
A market structure closer to the top/bottom of a trend can return Breaker structures breakouts more indicative of potential reversals.
Breakers MS breakouts can also be useful as exits for entries done using market market structures.
The script additionally highlights support/resistance events by highlighting candle borders, with a border using a green color indicating support events while a red color is indicative of a resistance event.
🔹 Breaker Structure Lifespan
The "lifespan" of Breaker structures, that is the amount of time the script will extend/evaluate them is determined by various user settings.
The Maximum Breaks setting determines the maximum amount of breaks a breaker structure can withstand before it is broken.
For example, a maximum amount of breaks of 3 for a bearish breaker structure would require the price to cross under that precise breaker structure level three times. Using higher values of this setting will also highlight more Breakers MS.
The Breaker Maximum Duration setting on the other hand determines how many bars a breaker structure can be evaluated without being broken. If a breaker structure is not broken after this amount of bars then it will stop being evaluated and will be removed.
🔶 SETTINGS
Swings Period: Period used for the swing detection, with higher values returning longer term markter structures.
Maximum Breaks: Amount of break required for a breaker block to be considered broken.
Breaker Maximum Duration: Maximum duration of a breaker block (in bars).
Market Structure [TFO]The purpose of this indicator is to provide a simple approach to Market Structure. When price is closing over swing highs, we may categorize that as bullish structure; and when price is closing below swing lows, we may categorize that as bearish structure.
We can easily find swing highs and lows via the following built-in Pine Script functions:
ta.pivothigh()
ta.pivotlow()
We can pass in our Pivot Strength parameter to determine the size/significance of these pivots. The lowest value of 1 will validate a swing high when a given high is larger than that of 1 bar to the left and right of it. A pivot strength of 3, for example, would validate a swing high only when a high is larger than that of the 3 bars to the left and right of it, making it much more selective.
In any case, we can simply track the most recent swing highs and lows and check for when price through them. Enabling the Show Pivots option will mark all the swing highs and lows that are being considered for future structure breaks.
If the trend is bearish and we begin closing over swing highs, that would mark a Market Structure Shift (MSS). If the trend is already bullish and we are closing over swing highs, that would mark a Break of Structure (BOS), and vice versa for bearish conditions. MSS essentially signifies reversals in Market Structure while BOS signifies continuations.
Users may also create alerts for Any/Bull/Bear BOS or MSS. Simply create a new alert, select this indicator, and select the desired BOS or MSS criteria.
Hull WavesThe Hull Waves indicator is based on the Hull Moving Averages (HMA), which are special moving averages that stand out for their ability to filter out market noise and offer a clearer view of price trends. Compared to traditional moving averages, HMAs are more responsive yet smoother, allowing traders to capture significant price movements without getting overwhelmed by short-term fluctuations.
The HMAs integrated into Hull Waves provide two distinct perspectives on the price trend:
8-period HMA: This short-term HMA is extremely reactive and closely follows price changes. It is ideal for capturing short-term trading signals while the medium-term 21-period HMA offers a more balanced view of price trends and identifies medium-term trends.
By crossing HMAs, traders can efficiently identify trend reversal points or strong market continuations.
Another feature of the indicator is the “fan” of dynamic lines, which acts as a visual float for price candles, allowing traders to quickly evaluate trading opportunities.
The "fan" or float of dynamic lines represents a visual representation of the candle's price movements. These lines extend from the start point to the end point, like an open fan. This visual approach makes the market dynamics immediately evident.
Strategy:
Long Entry Signal (Buy):
When the Hull Waves range shows a series of upward sloping lines and the Hull Moving Averages (e.g. 8-period HMA) crosses the 21-period HMA upwards, it is a long entry signal.
Confirmation of the signal can come from an increase in trader volume or other supporting indicators.
Place a buy order at the next closing price.
Short Entry Signal (Sell):
When the Hull Waves range shows a series of downward sloping lines and the Hull Moving Averages (e.g. 8-period HMA) crosses the 21-period HMA downward, it is a short entry signal.
Confirm the signal with an increase in trader volume or other relevant indicators.
Place a sell order at the next closing price.
Exit Signal (Closing a Position):
To close a long position, wait for a signal reversal, such as the Hull Moving Averages crossing downwards or a change in the Hull Waves range.
To close a short position, wait for a signal reversal, such as the Hull Moving Averages crossing higher or a change in the Hull Waves range.
MTF Fair Value Gap [BigBeluga]The MTF Fair Value Gap (FVG) indicator provides multi-timeframe options to observe lower or higher gaps in different timeframes within your current one. This can enhance the confluence in your trading decisions.
🔶 USAGE
An FVG is formed when a candle has an 'empty' body, leaving a gap. These areas are often filled before the market continues to trend in its original direction.
In practical terms, FVGs serve to highlight support areas (bullish FVGs) and resistance zones (bearish FVGs). As a gap is filled, signaling the end of the existing imbalance, it tends to foreshadow an impending price reversal.
While this approach is inherently contrarian, individuals seeking a more trend-following strategy can opt to use FVG identification as straightforward signals. This entails taking a long position upon detecting a bullish FVG and adopting a short position in the presence of a bearish FVG.
🔹 Mitigation
The mitigation point is where the user selects when the FVG is considered filled or no longer usable.
Source => Choose the candle's low/high or close as the mitigation point.
Point => Choose the FVG's mitigation point to trigger after the candle's Source has filled it. Users can choose between the middle point or the top/bottom of the FVG.
ccc
🔹 MTF
This script can display MTF FVGs from different timeframes while showing the current one. This is extremely useful as it avoids the need to switch timeframes frequently and can add significant confluence with the current FVG.
🔹 Threshold
The Threshold is an input to remove insignificant FVGs that are too small to be truly useful. Users can choose between:
Auto => Automatically remove unusable FVGs.
Manual => Set an automatic Threshold.
🔶 TIPS
Users can choose how many FVGs to display on the current chart for better visualization.
Users can choose which FVGs to display: only the current one, only MTF ones, or both.
OrderBlock [kyleAlgo]The principle of this indicator
ATR (Average True Range) Setting: The code uses ATR to help calculate the Supertrend indicator.
Supertrend Trend Direction: Identify bullish and bearish trends with the Supertrend method.
Order Block Recognition: This part of the code recognizes and creates order blocks, visualizing them as boxes on the chart. If the number of blocks exceeds the maximum limit, old blocks will be deleted.
Function to prevent overlapping: check whether the new order block overlaps with the existing order block through the isOverlapping function.
Order block color setting: The code sets the color according to whether the block is bullish or bearish, and whether it breaks above or below. Afterwards the color of the existing order blocks will be updated.
Sensitivity settings: Through the input settings of factor and atrPeriod, the sensitivity of Supertrend and the detection of order blocks can be affected.
Visualization: Use TradingView's box.new function to draw and visualize order blocks on the chart.
Practicality:
Support and Resistance Levels: Order blocks may represent areas of support and resistance in the market. By visualizing these areas, traders can better understand when price reversals are likely to occur.
Trading Signals: Traders may be able to identify trading signals based on the color changes of blocks and price breakouts. For example, if the price breaks above a bullish block, this could be a signal to buy.
Risk Management: By using ATR to adjust the sensitivity of Supertrend, the symbol helps traders to adjust their strategies according to market volatility. This can be used as a risk management tool to help identify stop loss and take profit points.
Multi-timeframe analysis: Although the code itself does not implement multi-timeframe analysis directly, it can be done by applying this indicator on different timeframes. This helps to analyze the market from different angles.
Flexibility and Customization: Through sensitivity settings, traders can customize the indicator according to their needs and trading style.
Reduced screen clutter: By removing overlapping order blocks and limiting the maximum number of order blocks, this code helps reduce clutter on charts, allowing traders to analyze the market more clearly.
Overall, this "Pine Script" can be a powerful analytical tool for trend traders and those looking to improve their trading decisions by visualizing key market areas. It can be used alone or combined with other indicators and trading systems for enhanced functionality.
ICT Institutional Order Flow (fadi)ICT Institutional Order Flow indicator is intended to provide wholistic view to better analyze order flow and where price may go to next. The concept follows ICT principles.
ICT Market Structure
ICT breaks down Pivot points into three categories:
Short Term High/Low (STH/STL) is a 3 candle pattern with a low with higher low on each side (STL), or a high with lower high on each side (STH)
Intermediate Term High/Low (ITH/ITL) uses the calculated STH/STL and marks any STH that has lower or STH on each side, and STL that has higher STL on each side
Long Term High/Low (LTH/LTL) uses the calculated ITH/ITL and marks any ITH that has lower or ITH on each side, and ITL that has higher ITL on each side
Note: ICT also states that if a STH wicks into and closes (almost?) a FVG, he marks it as ITH even if it does not have STH on reach side. This scenario is not covered by this indicator
Liquidity
liquidity is usually present under pivot points. The more prominent the pivot point, the more likely higher values liquidity pools reside under/above it. Liquidity under ITL and LTL as an example, will have better indication of which liquidity the price may seek next.
Displacement
Displacement registers above average move in the price resulting in strong visible move. If requiring a FVG is enabled (in settings), then the displacement could possibly (but never guaranteed) be used to visually recognize a move as it develops.
Full Credit: The calculation for Displacement is derived from TFO's Visualizing Displacement
Imbalances
Imbalances can come in different forms. This indicator identifies three type of imbalances:
1. FVG
2. Volume Imbalance
3. Open Gaps
Imbalances completes the picture by help visualize strong moves, where possible pivot points may develop, and how to enter or manage a trade.
Developing Market Profile / TPO [Honestcowboy]The Developing Market Profile Indicator aims to broaden the horizon of Market Profile / TPO research and trading. While standard Market Profiles aim is to show where PRICE is in relation to TIME on a previous session (usually a day). Developing Market Profile will change bar by bar and display PRICE in relation to TIME for a user specified number of past bars.
What is a market profile?
"Market Profile is an intra-day charting technique (price vertical, time/activity horizontal) devised by J. Peter Steidlmayer. Steidlmayer was seeking a way to determine and to evaluate market value as it developed in the day time frame. The concept was to display price on a vertical axis against time on the horizontal, and the ensuing graphic generally is a bell shape--fatter at the middle prices, with activity trailing off and volume diminished at the extreme higher and lower prices."
For education on market profiles I recommend you search the net and study some profitable traders who use it.
Key Differences
Does not have a value area but distinguishes each column in relation to the biggest column in percentage terms.
Updates bar by bar
Does not take sessions into account
Shows historical values for each bar
While there is an entire education system build around Market Profiles they usually focus on a daily profile and in some cases how the value area develops during the day (there are indicators showing the developing value area).
The idea of trading based on a developing value area is what inspired me to build the Developing Market Profile.
🟦 CALCULATION
Think of this Developing Market Profile the same way as you would think of a moving average. On each bar it will lookback 200 bars (or as user specified) and calculate a Market Profile from those bars (range).
🔹Market Profile gets calculated using these steps:
Get the highest high and lowest low of the price range.
Separate that range into user specified amount of price zones (all spaced evenly)
Loop through the ranges bars and on each bar check in which price zones price was, then add +1 to the zones price was in (we do this using the OccurenceArray)
After it looped through all bars in the range it will draw columns for each price zone (using boxes) and make them as wide as the OccurenceArray dictates in number of bars
🔹Coloring each column:
The script will find the biggest column in the Profile and use that as a reference for all other columns. It will then decide for each column individually how big it is in % compared to the biggest column. It will use that percentage to decide which color to give it, top 20% will be red, top 40% purple, top 60% blue, top 80% green and all the rest yellow. The user is able to adjust these numbers for further customisation.
The historical display of the profiles uses plotchar() and will not only use the color of the column at that time but the % rating will also decide transparancy for further detail when analysing how the profiles developed over time. Each of those historical profiles is calculated using its own 200 past bars. This makes the script very heavy and that is why it includes optimisation settings, more info below.
🟦 USAGE
My general idea of the markets is that they are ever changing and that in studying that changing behaviour a good trader is able to distinguish new behaviour from old behaviour and adapt his approach before losing traders "weak hands" do.
A Market Profile can visually show a trader what kind of market environment we currently are in. In training this visual feedback helps traders remember past market environments and how the market behaved during these times.
Use the history shown using plotchars in colors to get an idea of how the Market Profile looked at each bar of the chart.
This history will help in studying how price moves at different stages of the Market Profile development.
I'm in no way an expert in trading Market Profiles so take this information with a grain of salt. Below an idea of how I would trade using this indicator:
🟦 SETTINGS
🔹MARKET PROFILING
Lookback: The amount of bars the Market Profile will look in the past to calculate where price has been the most in that range
Resolution: This is the amount of columns the Market Profile will have. These columns are calculated using the highest and lowest point price has been for the lookback period
Resolution is limited to a maximum of 32 because of pinescript plotting limits (64). Each plotchar() because of using variable colors takes up 2 of these slots
🔹VISUAL SETTINGS
Profile Distance From Chart: The amount of bars the market profile will be offset from the current bar
Border width (MP): The line thickness of the Market Profile column borders
Character: This is the character the history will use to show past profiles, default is a square.
Color theme: You can pick 5 colors from biggest column of the Profile to smallest column of the profile.
Numbers: these are for % to decide column color. So on default top 20% will be red, top 40% purple... Always use these in descending order
Show Market Profile: This setting will enable/disable the current Market Profile (columns on right side of current bar)
Show Profile History: This setting will enable/disable the Profile History which are the colored characters you see on each bar
🔹OPTIMISATION AND DEBUGGING
Calculate from here: The Market Profile will only start to calculate bar by bar from this point. Setting is needed to optimise loading time and quite frankly without it the script would probably exceed tradingview loading time limits.
Min Size: This setting is there to avoid visual bugs in the script. Scaling the chart there can be issues where the Market Profile extends all the way to 0. To avoid this use a minimum size bigger than the bugged bottom box
Market Structure CHoCH/BOS (Fractal) [LuxAlgo]The Market Structure CHoCH/BOS (Fractal) indicator is an experimental take on classical market structure, whereas fractal patterns are used for their construction instead of swing points.
Compared to utilizing swing points for highlighting market structure like our Smart Money Concepts indicator , fractal-based market structure can appear as more adaptive, however, it can also be more restrictive when it comes to returning swing points which can cause the indicator to miss reversals in some cases.
If enabled from within the settings, users can see support and resistance levels returned from the detected market structure with breakouts highlighted on the chart. Alongside this feature, an additional dashboard showing the structure to fractal structure percentage is also provided.
🔶 SETTINGS
Length: Length of the fractal patterns to detect.
🔹 Style
Bullish Structures: Show bullish structures.
Bearish Structures: Show bullish structures.
Support: Show support levels.
Resistance: Show resistance levels.
🔹 Dashboard
Show Dashboard: Show structure to fractal percentage dashboard on the chart.
Location: Location of the dashboard on the chart.
Size: Dashboard size.
🔶 USAGE
Market structure is commonly used to determine trend direction by using price positions relative to prior swing points. Using fractal patterns to determine market structure can allow users to obtain shorter, more frequent structure labels.
Market structure is commonly classified as follows:
Change of Character (CHoCH), also referred to as Market Structure Shift (MSS)
Break of Structure (BOS), also referred to as Market Structure Break (MSB)
Change of Characters indicate a shift in the market trend, confirming trend reversals. Break of Structures on the other hand occur once a trend is already determined, confirming new higher highs/lower lows.
Using higher length values allow users to detect longer-term fractals, thus highlighting longer-term market structures. The image above detects fractal patterns made of 7 candles, even if the increment is only of 2 bars this significantly reduces the amount of detected market structure labels.
The result obtained by utilizing fractals and higher settings can be a more dynamic view of market structure, however, as seen in the image above this can introduce very significant delay compared to utilizing pure swing points.
🔹 Support/Resistance
The indicator also returns support/resistance levels constructed from the market structure, these levels are obtained similarly to order blocks, finding the minimum on the interval of a bullish market structure and the maximum of a bearish market structure.
Price reaching a support/resistance level can be expected to bounce from it. Once a level is broken, the support/resistance level will no longer extend, and a circle will be displayed highlighting the break.
While utilizing this script for fractal-based market structure, these levels can be useful to ensure all swing points are still considered by the user with the possibility of the indicator missing reversals due to its calculation not being based on swing points themselves.
🔹 Dashboard
The dashboard reports the structure to fractal percentage, that is the amount of bullish/bearish market structures relative to the total amount of detected bullish/bearish fractal patterns.
This allows us to see how often a detected fractal pattern is used to display a market structure.
🔶 DETAILS
🔹 Fractals
In the context of technical analysis, Fractals refer to specific patterns that exhibit self-similarity at different scales or timeframes.
The most commonly known fractal pattern consists of a consecutive sequence of candles (more commonly 5), with the central candle being the lowest (in case of a bullish fractal) or highest (in case of a bearish fractal).
A bullish fractal has candles on the right side of the central candle with increasing lows, while candles on the left side have decreasing lows.
A bearish fractal has candles on the right side of the central candle with decreasing highs, while candles on the left side have increasing highs.
🔶 RELATED SCRIPTS
🔹 Smart Money Concepts
🔹 Market Structure Trailing Stop
🔹 ICT Concepts