Order Blocks & Breaker Blocks [LuxAlgo]The Order Blocks & Breaker Blocks indicator detects order blocks that can be turned into breaker blocks on the chart automatically once mitigated.
Users can determine the amount of bullish and bearish order/breaker blocks that display on their chart from within the settings menu.
🔶 SETTINGS
Swing Lookback: Lookback period used for the detection of the swing points used to create order blocks.
Show Last Bullish OB: Number of the most recent bullish order/breaker blocks to display on the chart.
Show Last Bearish OB: Number of the most recent bearish order/breaker blocks to display on the chart.
Use Candle Body: Allows users to use candle bodies as order block areas instead of the full candle range.
🔹 Style
Show Historical Polarity Changes: Allows users to see labels indicating where a swing high/low previously occurred within a breaker block.
🔶 USAGE
We have published several scripts covering the detection of order blocks previously, however, the concept of breaker blocks was not yet introduced.
When price mitigates an order block, a breaker block is confirmed. We can eventually expect price to trade back to this breaker block offering a new trade opportunity.
We can see that this is similar to a change in polarity, where a support becomes a resistance after a breakout and vice versa.
This script highlights regular order blocks as solid extended areas on the chart and breaker blocks as dashed lines with dual-colored areas. The color change and dashed line starts at the location where the order block was mitigated.
Using a higher "Swing Lookback" setting will return longer term order/breaker blocks on the chart.
Users can optionally enable "Historical Polarity Changes" labels within the settings menu to see where breaker blocks might have provided an effective trade setup previously.
The "Historical Polarity Changes" setting is disabled by default & is most effective using replay mode as the labels are backpainted.
The order blocks & breaker blocks themselves can be used in real-time as they are detected based on the swing length & previous breaker blocks being mitigated.
Luxalgo
The Strat [LuxAlgo]The Strat indicator is a full toolkit regarding most of the concepts within "The Strat" methodology with features such as candle numbering, pivot machine gun (PMG) highlighting, custom combo highlighting, and various statistics included.
Alerts are also included for the detection of specific candle numbers, custom combos, and PMGs.
🔶 SETTINGS
Show Numbers on Chart: Shows candle numbering on the chart.
Style Candles: Style candles based on the detected number. Only effective on non-line charts and if the script is brought to the front.
🔹 Custom Combo Search
Combo: User defined combo to be searched by the script. Combos can be composed of any series of numbers including (1, 2, -2, 3), e.g : 2-21. No spaces or other characters should be used.
🔹 Pivot Machine Gun
Show Labels: Highlight detected PMGs with a label.
Min Sequence Length: Minimum sequence length of consecutive higher lows/lower highs required to detect a PMG.
Min Breaks: Minimum amount of broken previous highs/lows required to detect a PMG.
Show Levels: Show levels of the broken highs/lows.
🔹 Pivot Combos
Pivot Lookback: Lookback period used for detecting pivot points.
Right Bars Scan: Number of bars scanned to the right side of a detected pivot.
Left Bars Scan: Number of bars scanned to the left side of a detected pivot.
🔹 Dashboard
Show Dashboard: Displays statistics dashboard on chart.
Numbers Counter: Displays the numbers counter section on the dashboard.
Pivot Combos: Displays pivots combo section on the dashboard.
%: Display the percentage of detected pivot combos on the dashboard instead of absolute numbers.
Pivot Combos Rows: Number of rows displayed by the "Pivots Combo" dashboard section.
Show MTF: Showa MTF candle numbering on the dashboard.
Location: Location of the dashboard on the chart.
Size: Size of the displayed dashboard.
🔶 USAGE
This script allows users with an understanding of The Strat to quickly highlight elements such as candle numbers, pivot machine guns, and custom combos. The usage for these concepts is given in the sub-sections below.
🔹 Candle Numbers
The Strat assigns a number to individual candles, this number is determined by the current candle position relative to the precedent candle, these include:
Number 1 - Inside bar, occurs when the previous candle range engulfs the current one.
Number 2 Up - Upside Directional Bar, occurs when the current price high breaks the previous high while the current low is lower than the previous high.
Number 2 Down - Downside Directional Bar, occurs when the current price low breaks the previous low while the current high is higher than the previous low.
Number 3 - Outside bar, occurs when the current candle range engulfs the previous one.
The script can highlight the number of a candle by using labels but can also style candles by depending on the candle number. Inside bars (1) only have their candle wick highlighted, directional bars (2) (-2) only have their candle body highlighted. Outside bars have their candle range highlighted.
Note that downside directional bars are highlighted with the number -2.
Users can see the total amount of times a specific candle number is detected on the historical data on the dashboard available within the settings, as well as the number of times a candle number is detected relative to the total amount of detected candle numbers expressed as a percentage.
It is also possible to see the current candle numbers returned by multiple timeframes on the dashboard.
🔹 Searching For Custom Combos
Combos are made of a sequence of two or more candle numbers. These combos can highlight multiple reversals/continuation scenarios. Various common combos are documented by The Strat community.
This script allows users to search for custom combos by entering them on the Combo user setting field.
When a user combo is found, it is highlighted on the chart as a box highlighting the combo range.
🔹 Pivot Combos
It can be of interest to a user to display the combo associated with a pivot high/low. This script will highlight the location of pivot points on the chart and display its associated combo by default. These are based on the Pivot Combo lookback and not displayed in real-time.
Users can see on the dashboard the combos associated with a pivot high/low, these are ranked by frequency.
🔹 Pivot Machine Gun (PMG)
Pivot Machine Guns (PMG)s describe the scenario where a single price variation breaks the value of multiple past successive higher lows/lower highs. This can highlight a self-exciting behavior, where even more past successive higher lows/lower highs get broken.
Users can select the minimum sequence length of successive higher lows/lower highs required for a PMG to be detected, as well the amount of these successive higher lows/lower highs that must be broken.
Currency Strength [LuxAlgo]The Currency Strength indicator displays the historical relative strength of 5 user selected currencies over a user selected period of time. Users can also display relative strength of currencies as a scatter plot, further informing on the evolution of currency strength.
🔶 SETTINGS
Display: Determines the type of data displayed by the indicator. By default, the trailing relative strength of currencies is displayed, with the other option displaying the scatter plot.
Timeframe: Timeframe period used to calculate currency relative strength.
🔹 Meter
Show Strength Meter: Displays the currency strength meter on the indicator panel.
Strength Meter Resolution: Resolution of the currency strength meter, higher resolutions allow to observe smaller difference in strength.
Location: Location of the currency strength meter on the indicator pane.
Size: Size of the currency strength meter.
🔹 Relative Strength Scatter Graph
Scatter Graph Resolution: Horizontal and vertical width of the scatter plot (in bars). Higher values allow a more precise position on the X axis.
🔶 USAGE
Measuring the relative strength of a currency allows users to assess the relative performance of a currency against a basket of other currencies.
The term "strength" can convey various interpretations depending on the indicator. Here "strength" is interpreted as an indicator of performance, with stronger currencies having greater performances over the selected period (positive changes of higher magnitude).
The Currency Strength indicator allows users to analyze the relative strength of currencies over a user selected period - the returned results will reset periodically and will accumulate afterward.
The above chart shows the hourly relative strength of various currencies on the 1min TF.
🔹 Scatter Graph
The scatter graph displays the relative strength of a currency over its value during the previous period. This not only allows users to see if a currency is strong... but also if it's getting stronger compared to the previous period.
In order to quickly interpret results, the graph is divided into four areas. A currency (displayed as a point) being in a specific area returns the following information:
Strong(Green): Currency has a positive relative strength (bullish) and is greater than its value over the previous period.
Improving (Yellow): Currency has a negative relative strength (bearish) and is greater than its value over the previous period.
Weakening (Aqua): Currency has a positive relative strength (bullish) and is lower than its value over the previous period.
Weak (Red): Currency has a negative relative strength (bearish) and is lower than its value over the previous period.
🔶 DETAILS
There is a wide variety of methods for the calculation of a currency's relative strength. The primary focus of the indicator is on the meter as well as the relative strength scatter graph. The currency strength calculation can be considered more basic.
Given two currencies, B (base) and Q (quote), the proposed indicator calculation process is as follows:
Exchange rate BQ(t) over time t is obtained, a rising value of BQ(t) means that a unit of B is now worth a higher amount of Q , highlighting strength of B over Q on that precise variation.
The individual relative strength over time IRS(t) is obtained as the percentage relatively close to the open difference of BQ(t) , that is:
IRS(t) = / open(t) * 100
Normalizing the close to open difference allows for the various currencies' relative strengths to approximately share the same scale.
The above operation is performed n times over a space of n currencies O( n ) . The obtained individual relative strengths for one specific currency are then added together, forming the final composite relative strength ( CRS ) of that currency:
CRS (t) = IRS (t) + IRS (t) + ... + IRS (t)
The cumulative sum of CRS(t) over the user selected period is then obtained.
Liquidity Swings [LuxAlgo]The liquidity swings indicator highlights swing areas with existent trading activity. The number of times price revisited a swing area is highlighted by a zone delimiting the swing areas. Additionally, the accumulated volume within swing areas is highlighted by labels on the chart. An option to filter out swing areas with volume/counts not reaching a user-set threshold is also included.
This indicator by its very nature is not real-time and is meant for descriptive analysis alongside other components of the script. This is normal behavior for scripts detecting pivots as a part of a system and it is important you are aware the pivot labels are not designed to be traded in real-time themselves.
🔶 USAGE
The indicator can be used to highlight significant swing areas, these can be accumulation/distribution zones on lower timeframes and might play a role as future support or resistance.
Swing levels are also highlighted, when a swing level is broken it is displayed as a dashed line. A broken swing high is a bullish indication, while a broken swing low is a bearish indication.
Filtering swing areas by volume allows to only show significant swing areas with an higher degree of liquidity. These swing areas can be wider, highlighting higher volatility, or might have been visited by the price more frequently.
🔶 SETTINGS
Pivot Lookback : Lookback period used for the calculation of pivot points.
Swing Area : Determine how the swing area is calculated, "Wick Extremity" will use the range from price high to the maximum between price close/open in case of a swing high, and the range from price low to the minimum between price close/open in case of a swing low. "Full Range" will use the full candle range as swing area.
Intrabar Precision : Use intrabar data to calculate the accumulated volume within a swing area, this allows obtaining more precise results.
Filter Areas By : Determine how swing areas are filtered out, "Count" will filter out swing areas where price visited the area a number of time inferior to the user set threshold. "Volume" will filter out swing areas where the accumulated volume within the area is inferior to the user set threshold.
🔹 Style
Swing High : Show swing highs.
Swing Low : Show swing lows.
Label Size : Size of the labels on the chart.
Note that swing points are confirmed after Pivot Lookback bars, as such all elements are displayed retrospectively.
DR/IDR Candles [LuxAlgo]This indicator displays defining ranges (DR) and implied defining ranges (IDR) constructed from two user set sessions (RDR/ODR) as graphical candles on the chart. The script introduces additional graphical elements to the original DR/IDR concept and as such can be thought as a graphical method in addition to a technical indicator.
Additionally, this script can display various Fibonacci retracements from the constructed DR/IDR if enabled within the settings.
Settings
Regular Session: Enable/disable regular session's DR/IDR alongside setting the session time. By default, 09:30 - 10:30 am.
Overnight Session: Enable/disable overnight session's DR/IDR alongside setting the session time. By default, 03:00 - 04:00 am.
UTC Offset: UTC offset for the time zone, by default -5 (EST)
Retracements
Reverse: Inverts source range upper/lower value for constructing the retracements.
From: Source range used to construct the retracements, by default DR is used.
By default, the 0.5 retracement (average line) is displayed.
Usage
The used sessions are highlighted by a gray background. DRs are highlighted by dashed lines while IDRs are highlighted by solid ones. The maximum/minimum price between each user set session is highlighted by solid wicks.
The color of the DRs/IDRs/wicks are determined by the price position relative to the DR; if price is above the DR maximum, then a blue color is used. If price is below, then an orange color is used, and if price is within the DR range, then a gray color is used.
Additionally, the area of the DR range is used to highlight the number of time price is located within the DR, with a longer background highlighting a higher number of occurrences. This can help highlight if the DR levels were potentially useful as support/resistance.
When price is outside the IDR range, the area between the price and IDR is highlighted, in blue if price is above the IDR, and orange if it is under.
The original author of the DR/IDR concept describes 3 rules using the price position relative to the DR/IDR levels:
1.) If price on the 5-minute timeframe closes above the DR high after 10:30 AM or 04:00 AM then the DR low will likely be the low of the trading session.
2.) If price on the 5-minute timeframe closes below the DR low after 10:30 AM or 04:00 AM then the DR high will likely be the high of the trading session.
3.) If price closes above the IDR high after 10:30 AM or 04:00 AM it is an early indication that the low of the DR will be the low of the day and vice versa.
We can see that the above rules are cases of conditional probabilities.
There is no significant data supporting or regarding any statistical probability of the above rules to be true, which are more than uncertain given the stochastic nature of prices. The lack of precision of these rules is also a concern (time zone dependance, applicable markets, etc...).
Credits
Credits to trader TheMas7er who originally created the DR/IDR concept in November of 2022. This script was derived from his proposed session times & rules for trading.
ICT Killzones [LuxAlgo]This script highlights ICT Killzones on the chart along with Fibonacci retracements constructed from each Killzone's price range, allowing traders to find more optimal entries.
Settings
Killzone Retracements
Show Retracements: Determines whether Fibonacci retracements are displayed on the chart.
Extend: Determines if the retracements are extended outside the Killzone.
Reverse: Switches the maximum and minimum levels for the calculation of the retracements.
Other settings allow disabling as well as changing the retracement value and color.
Usage
Killzones are introduced by forex trader ICT and represent different time intervals that aims at offering optimal trade entries. Killzones include:
New York Killzone (7:9 ET)
London Open Killzone (2:5 ET)
London Close Killzone (10:12 ET)
Asian Killzone (20:00 ET)
Note that using timeframes superior to 1h can highlight incorrect intervals
Fibonacci retracements on an active Killzone are subject to changes, if no Killzones are active then the associated Fibonacci retracements will stay at their current level.
Disabling specific Killzones while having extended retracements will allow them to extend further. In the image above the New York and Asian Killzones are disabled.
Imbalance Detector [LuxAlgo]This indicator detects and highlights market imbalances alongside a dashboard returning information about their frequency of occurrence and their fill percentage. Imbalances included in this script are Fair Value Gaps (FVG), Opening Gaps (OG) and Volume Imbalances (VI).
Alerts are available for the occurrences of all market imbalances.
Settings
Imbalances
Each imbalance has the same settings layout:
Imbalance: Enable/disable the detection of the specific imbalance.
Min Width: If enabled, requires the imbalance area width to be greater than the specified value. This minimum width can be expressed in points, percentages or ATR multiples.
Extend: Extend imbalances by a specified number of bars.
Dashboard
Show Dashboard: Enable/disable the dashboard on the chart.
Dashboard Location: Location of the dashboard on the chart.
Dashboard Size: Size of the dashboard.
Usage
Market imbalances are part of the many concepts available to price action traders and highlight areas where there is a disparity between supply and demand.
It is common to see price come back to these areas and traders often use them as supports and resistances but also as targets.
Details
The script can detect three distinct types of imbalances described below.
Fair Value Gaps
Fair Value Gaps (FVG) are three candle formations characterized by a gap between the wicks of the non-adjacent candles in the formation.
A bullish FVG is characterized by a gap between the current price low and the 2 bars anterior price high, and a bearish FVG is characterized by a gap between the current price high and the 2 bars anterior price low.
Opening Gaps
Opening Gaps (OG) are imbalances characterized by non-existent activity within a specific price range.
A bullish OG occurs when the current price low is greater than the previous high, a bearish OG occurs when price high is lower than the previous price low.
Opening Gaps primarily occur in closing markets, as such they are less common in the cryptocurrency market.
Most of the time an Opening Gap will also be accompanied by a Fair Value Gap, in order to avoid clutter the indicator will not detect Fair Value Gaps if Opening Gaps are enabled and if an Opening Gap has been detected
Volume Imbalances
Volume Imbalances (VI) are characterized by a price discontinuity between the opening price and previous close, but unlike Opening Gaps we do not see nonexistent activity within a certain price range.
A bullish VI occur when both the opening and closing prices are superior to the previous closing price, with the current price low overlapping the previous price high. A bearish VI occur when both the opening and closing prices are inferior to the previous closing price, with the current price high overlapping the previous price low.
Because Volume Imbalances can occur excessively on markets with frequent gaps, we make use of an additional condition for filtering out less significant imbalances. Bullish VI's will require the previous price high to be lower than the opening price, while bullish VI's will require the previous price low to be higher than the opening price.
Sessions [LuxAlgo]This indicator shows when user set sessions are active and returns various tools + metrics using the closing price within active sessions as an input. Users have the option to change up to 4 session times.
The indicator will increasingly lack accuracy when the chart timeframe is higher than 1 hour.
Settings
Sessions
Enable Session: Allows to enable or disable all associated elements with a specific user set session.
Session Time: Opening and closing times of the user set session in the hh:mm format.
Range: Highlights the associated session range on the chart.
Trendline: Returns the associated session trendline on the chart.
Mean: Returns the associated session mean average on the chart.
VWAP: Returns the associated session volume weighted average price on the chart.
Ranges Settings
Range Area Transparency: Transparency of the area highlighting sessions ranges.
Range Outline: Highlights the borders of the session range area.
Range Label: Shows the session label at the mid-point of the session interval.
Dashboard
Show Dashboard: Enables sessions dashboard on the chart.
Advanced Dashboard: Returns more information regarding user set sessions on the dashboard.
Dividers
Show Session Divider: Highlights active sessions using intervals on the bottom of the chart (this can lead to less responsive charts)
Show Daily Divider: Highlights days on the chart.
Usage
This tool is versatile and allows the user to perform a wide variety of tasks all focusing on highlighting and analyzing price movements within a specific user set session in a periodic fashion.
Significant forex trading sessions are used by default, but the users are free to choose the opening and closing time of their choices.
Using ranges can indicate which sessions returned the most volatile price movements.
Trendlines can be useful to estimate the underlying trend of a specific session, but they can also offer a quick way to see which session started a trend reversal.
The session Mean highlights the equilibrium level within a session, extrapolating these levels can provide potential support and resistances levels of interest.
Finally, users can use the sessions VWAP's for real time applications, using them as trailing supports and resistances.
Using The Advanced Dashboard
The advanced dashboard returns useful information regarding the user set sessions. Each dashboard elements are described below:
Status: Highlights whether the user set session is active (open) of inactive (closed).
Trend: Shows correlation coefficient between the session prices and a linear sequence of values. Values above 0 indicates an up-trending session, while values under 0 indicates a down-trending session. Values closer to (1, -1) indicates a more trending session.
Volume: Shows accumulated volume within the session
σ (Standard Deviation): Shows standard deviation of the session, while this value is not bounded it can be useful to compare it with the other ones to see which session was the most volatile.
Note that when a session becomes inactive the value on the dashboard will hold until the specific session becomes active again.
Order Block Detector [LuxAlgo]This script makes use of high-volume activity as an indicator of the presence of market participants accumulating orders in specific areas on a lower timeframe by detecting volume peaks to form order blocks.
Mitigated order blocks are automatically hidden from the chart, also allowing users to be able to select two different mitigation methods "wick" and "close".
Additionally, users can be alerted for the creation and mitigation of bullish/bearish order blocks.
Settings
Volume Pivot Length: Lookback of the pivot function used to detect volume peaks, lower values will detect order blocks more frequently.
Bullish OB: Determines the number of most recent unmitigated bullish order blocks to display on the chart.
Bearish OB: Determines the number of most recent unmitigated bullish order blocks to display on the chart.
Bearish OB: Determines the number of most recent unmitigated bullish order blocks to display on the chart.
Average Line Style: Line style of the average order block level.
Average Line Width: Line width of the average order block level.
Mitigation Methods: Method used to determine how an order block is mitigated. "Wick" will mitigate order blocks if the candle wick goes outside of the order block and "Close" will mitigate order blocks if the closing price goes outside of the order block.
Usage
It is common for more significant market participants to execute orders incrementally in order to avoid overwhelming the market and cause significant price movements. This practice allows the orders to be executed more efficiently and effectively, reducing the impact on the market and minimizing the potential for price volatility.
Order blocks are price areas where these orders are executed incrementally and are commonly used as areas of support/resistance for traders.
Bearish order blocks occur during a downtrend, while bullish order blocks occur in an uptrend. Bullish order blocks range from the price low to the median price, while bearish order blocks range from the median price to the price high. The median price is used as an equilibrium point.
Users can highlight the bars where an order block was detected from the style settings by toggling on the 'Bull OB' or 'Bear OB' selections.
Note that in order to confirm a peak Volume Pivot Length bars are needed, as such note that order blocks are shown retrospectively.
LuxAlgo - Backtester (S&O)The S&O Backtester is an innovative strategy script that encompasses features + optimization methods from our Signals & Overlays™ toolkit and combines them into one easy-to-use script for backtesting the most detailed trading strategies possible.
Our Signals & Overlays™ toolkit is notorious for its signal optimization methods such as the 'Optimal Sensitivity' displayed in its dashboard which provides optimization backtesting of the Sensitivity parameter for the Confirmation & Contrarian Signals.
This strategy script allows even more detailed & precise backtests than anything available previously in the Signals & Overlays™ toolkit; including External Source inputs allowing users to use any indicator including our other paid toolkits for take profit & stop loss customization to develop strategies, along with 10+ pre-built filters directly Signals & Overlays™' features.
🔶 Features
Full Sensitivity optimization within the dashboard to find the Best Win rates or Best Profits.
Counter Trade Mode to reverse signals in undesirable market conditions (may introduce higher drawdowns)
Built-in filters for Confirmation Signals w/ Indicator Overlays from Signals & Overlays™.
Built-in Confirmation exit points are available within the settings & on by default.
External Source Input to filter signals or set custom Take Profits & Stop Losses.
Optimization Matrix dashboard option showing all possible permutations of Sensitivity.
Option to Maximize for Winrate or Best Profit.
🔶 Settings
Sensitivity signal optimizations for the Confirmation Signals algorithm
Buy & Sell conditions filters with Indicator Overlays & External Source
Take Profit exit signals option
External Source for Take Profit & Stop Loss
Sensitivity ranges
Backtest window default at 2,000 bars
External source
Dashboard locations
🔶 Usage
Backtests are not necessarily indicative of future results, although a trader may want to use a strategy script to have a deeper understanding of how their strategy responds to varying market conditions, or to use as a tool for identifying possible flaws in a strategy that could potentially be indicative of good or bad performance in the future.
A strategy script can also be useful in terms of it's ability to generate more complete & configurable alerts, giving users the option to integrate with external processes.
In the chart below we are using default settings and built-in optimization parameters to generate the highest win rate.
Results like the above will vary & finding a strategy with a high win rate does not necessarily mean it will persist into the future, however, some indications of a well-optimized strategy are:
A high number of closed trades (100+) with a consistently green equity curve
An equity curve that outperforms buy & hold
A low % max drawdown compared to the Net Profit %.
Profit factor around 1.5 or above
In the chart below we are using the Trend Catcher feature from Signals & Overlays™ as a filter for standard Confirmation Signals + exits on a higher timeframe.
By filtering bullish signals only when the Trend Catcher is bullish, as well as bearish signals for when the Trend Catcher is bearish, we have a highly profitable strategy created directly from our flagship features.
While the Signals & Overlays features being used as built-in filters can generate interesting backtests, the provided External Sources can allow for even more creativity when creating strategies. This feature allows you to use many indicators from TradingView as filters or to trigger take-profit/stop-loss events, even if they aren't from LuxAlgo.
The chart below shows the HyperWave Oscillator from our Oscillator Matrix™ being used for take-profit exit conditions, exiting a long position on a profit when crossing 80, and exiting a short position when crossing 20.
🔶 Counter Trade Mode
Our thesis has always firmly remained to use Confirmation Signals within Signals & Overlays™ as a supportive tool to find trends & use as extra confirmation within strategies.
We included the counter-trade mode as a logical way to use the Confirmation signals as direct entries for longs & shorts within more contrarian trading strategies. Many traders can relate to using a trend-following indicator and having the market not respect its conditions for entries.
This mode directly benefits a trader who is aware that market conditions are generally not-so-perfect trends all the time. Acknowledging this, allows the user to use this to their advantage by introducing countertrend following conditions as direct entries, which tend to perform very well in ranging markets.
The big downfall of using counter-trade mode is the potential for very large max-drawdowns during trending market conditions. We suggest for making a strategy to consider introducing stop-loss conditions that can efficiently minimize max-drawdowns during the process of backtesting your creations.
Sensitivity Optimization
Within the Signals & Overlays™ toolkit, we allow users to adjust the Confirmation Signals with a Sensitivity parameter.
We believe the Sensitivity paramter is the most realistic way to generate the most actionable Confirmation Signals that can navigate various market conditions, and the Confirmation Signals algorithm was designed specifically with this in mind.
This script takes this parameter and backtests it internally to generate the most profitable value to display on the dashboard located in the top right of the chart, as well as an optimization table if users enable it to visualize it's backtesting.
In the image below, we can see the optimization table showing permutations of settings within the user-selected Sensitivity range.
The suggested best setting is given at the current time for the backtesting window that's customizable within the indicator. Optimized settings for technical indicators are not indicative of future results and the best settings are highly likely / guaranteed to change over time.
Optimizing signal settings has become a popular activity amongst technical analysts, however, the real-time beneficial applications of optimizing settings are limited & best described as complicated (even with forward testing).
🔶 Strategy Properties (Important)
We strongly recommend all users to ensure they adjust the Properties within the script settings to be in line with their accounts & trading platforms of choice to ensure results from strategies built are realistic.
🔶 How to access
You can see the Author's Instructions below to learn how to get access on our website.
Nadaraya-Watson non repainting [LPWN]// ENGLISH
The problem of the wonderfuls Nadaraya-Watson indicators is that they repainting, @jdehorty made an aproximation of the Nadaraya-Watson Estimator using raational Quadratic Kernel so i used this indicator as inspiration i just added the Upper and lower band using ATR with this we get an aproximation of Nadaraya-Watson Envelope without repainting
Settings:
Bandwidth. This is the number of bars that the indicator will use as a lookback window.
Relative Weighting Parameter. The alpha parameter for the Rational Quadratic Kernel function. This is a hyperparameter that controls the smoothness of the curve. A lower value of alpha will result in a smoother, more stretched-out curve, while a lower value will result in a more wiggly curve with a tighter fit to the data. As this parameter approaches 0, the longer time frames will exert more influence on the estimation, and as it approaches infinity, the curve will become identical to the one produced by the Gaussian Kernel.
Color Smoothing. Toggles the mechanism for coloring the estimation plot between rate of change and cross over modes.
ATR Period. Period to calculate the ATR (upper and lower bands)
Multiplier. Separation of the bands
// SPANISH
El problema de los maravillosos indicadores de Nadaraya-Watson es que repintan, @jdehorty hizo una aproximación delNadaraya-Watson Estimator usando un Kernel cuadrático racional, así que usé este indicador como inspiración y solo agregamos la banda superior e inferior usando ATR con esto obtenemos una aproximación de Nadaraya-Watson Envelope sin volver a pintar
Configuración:
Banda ancha. Este es el número de barras que el indicador utilizará como ventana retrospectiva.
Parámetro de ponderación relativa. El parámetro alfa para la función Rational Quadratic Kernel. Este es un hiperparámetro que controla la suavidad de la curva. Un valor más bajo de alfa dará como resultado una curva más suave y estirada, mientras que un valor más bajo dará como resultado una curva más ondulada con un ajuste más ajustado a los datos. A medida que este parámetro se acerque a 0, los marcos de tiempo más largos ejercerán más influencia en la estimación y, a medida que se acerque al infinito, la curva será idéntica a la que produce el Gaussian Kernel.
Suavizado de color. Alterna el mecanismo para colorear el gráfico de estimación entre la tasa de cambio y los modos cruzados.
Período ATR. Periodo para calcular el ATR (bandas superior e inferior)
Multiplicador. Separación de las bandas
Smart Money Concepts (SMC) [LuxAlgo]This all-in-one indicator displays real-time market structure (internal & swing BOS / CHoCH), order blocks, premium & discount zones, equal highs & lows, and much more...allowing traders to automatically mark up their charts with widely used price action methodologies. Following the release of our Fair Value Gap script, we received numerous requests from our community to release more features in the same category.
"Smart Money Concepts" (SMC) is a fairly new yet widely used term amongst price action traders looking to more accurately navigate liquidity & find more optimal points of interest in the market. Trying to determine where institutional market participants have orders placed (buy or sell side liquidity) can be a very reasonable approach to finding more practical entries & exits based on price action.
The indicator includes alerts for the presence of swing structures and many other relevant conditions.
Features
This indicator includes many features relevant to SMC, these are highlighted below:
Full internal & swing market structure labeling in real-time
Break of Structure (BOS)
Change of Character (CHoCH)
Order Blocks (bullish & bearish)
Equal Highs & Lows
Fair Value Gap Detection
Previous Highs & Lows
Premium & Discount Zones as a range
Options to style the indicator to more easily display these concepts
Settings
Mode: Allows the user to select Historical (default) or Present, which displays only recent data on the chart.
Style: Allows the user to select different styling for the entire indicator between Colored (default) and Monochrome.
Color Candles: Plots candles based on the internal & swing structures from within the indicator on the chart.
Internal Structure: Displays the internal structure labels & dashed lines to represent them. (BOS & CHoCH).
Confluence Filter: Filter non-significant internal structure breakouts.
Swing Structure: Displays the swing structure labels & solid lines on the chart (larger BOS & CHoCH labels).
Swing Points: Displays swing points labels on chart such as HH, HL, LH, LL.
Internal Order Blocks: Enables Internal Order Blocks & allows the user to select how many most recent Internal Order Blocks appear on the chart.
Swing Order Blocks: Enables Swing Order Blocks & allows the user to select how many most recent Swing Order Blocks appear on the chart.
Equal Highs & Lows: Displays EQH/EQL labels on chart for detecting equal highs & lows.
Bars Confirmation: Allows the user to select how many bars are needed to confirm an EQH/EQL symbol on chart.
Fair Value Gaps: Displays boxes to highlight imbalance areas on the chart.
Auto Threshold: Filter out non-significant fair value gaps.
Timeframe: Allows the user to select the timeframe for the Fair Value Gap detection.
Extend FVG: Allows the user to choose how many bars to extend the Fair Value Gap boxes on the chart.
Highs & Lows MTF: Allows the user to display previous highs & lows from daily, weekly, & monthly timeframes as significant levels.
Premium/Discount Zones: Allows the user to display Premium, Discount, and Equilibrium zones on the chart
Usage
Users can see automatic CHoCH and BOS labels to highlight breakouts of market structure, which allows to determine the market trend. In the chart below we can see the internal structure which displays more frequent labels within larger structures. We can also see equal highs & lows (EQH/EQL) labels plotted alongside the internal structure to frequently give indications of potential reversals.
In the chart below we can see the swing market structure labels. These are also labeled as BOS and CHoCH but with a solid line & larger text to show larger market structure breakouts & trend reversals. Users can be mindful of these larger structure labels while trading internal structures as displayed in the previous chart.
Order blocks highlight areas where institutional market participants open positions, one can use order blocks to determine confirmation entries or potential targets as we can expect there is a large amount of liquidity at these order blocks. In the chart below we can see 2 potential trade setups with confirmation entries. The path outlined in red would be a potential short entry targeting the blue order block below, and the path outlined in green would be a potential long entry, targeting the red order blocks above.
As we can see in the chart below, the bullish confirmation entry played out in this scenario with the green path outlined in hindsight. As price breaks though the order blocks above, the indicator will consider them mitigated causing them to disappear, and as per the logic of these order blocks they will always display 5 (by default) on the chart so we can now see more actionable levels.
The Smart Money Concepts indicator has many other features and here we can see how they can also help a user find potential levels for price action trading. In the screenshot below we can see a trade setup using the Previous Monthly High, Strong High, and a Swing Order Block as a stop loss. Accompanied by the Premium from the Discount/Premium zones feature being used as a potential entry. A potential take profit level for this trade setup that a user could easily identify would be the 50% mark labeled with the Fair Value Gap & the Equilibrium all displayed automatically by the indicator.
Conclusion
This indicator highlights all relevant components of Smart Money Concepts which can be a very useful interpretation of market structure, liquidity, & more simply put, price action. The term was coined & popularized primarily within the forex community & by ICT while making its way to become a part of many traders' analysis. These concepts, with or without this indicator do not guarantee a trader to be trading within the presence of institutional or "bank-level" liquidity, there is no supporting data regarding the validity of these teachings.
Hull Butterfly Oscillator [LuxAlgo]The Hull Butterfly Oscillator (HBO) is an oscillator constructed from the difference between a regular Hull Moving Average (HMA) and another with coefficients flipped horizontally.
Levels are obtained from cumulative means of the absolute value of the oscillator. These are used to return dots indicating potential reversal points.
Settings
Length: Number of past price inputs processed by the oscillator.
Levels Multiplier: Determine how far the levels are from 0.
Src: Input source of the indicator.
Usage
The oscillator can be used like most available oscillators. The sign of the HBO allows determining the current trend direction, while divergences with price might indicate potential reversals.
The displayed levels can additionally indicate whether the market is overbought or oversold. When the direction of the oscillator changes while being above the upper or lower level a red dot (if above upper level) or green dot (if under lower level) will be displayed, indicating a potential reversal.
Details
The name of the indicator is directly derived behind the coefficients used for its calculation. Displaying regular Hull coefficients alongside those flipped horizontally slightly resemble a butterfly, the difference between these sets of coefficients allows obtaining the HBO.
This operation allows to obtain a more structured impulse response, potentially giving less undesired performances on the frequency domain compared to simpler operation involving subtracting the HMA to a SMA, EMA or WMA.
Squeeze Index [LuxAlgo]The Squeeze Index aims to measure the action of price being squeezed, and is expressed as a percentage, with higher values suggesting prices are subject to a higher degree of compression.
Settings
Convergence Factor: Convergence factor of exponential envelopes.
Length: Period of the indicator.
Src: Source input of the indicator.
Usage
Prices being squeezed refer to the action of price being compressed within a tightening area. Prices in a tight area logically indicate a period of stationarity, price breaking out of this area will generally indicate the trader whether to buy or sell depending on the breakout direction.
The convergence factor and length settings both play an important role in the returned indicator values. A convergence factor greater than the period value will detect more squeezed prices area, while a period greater than the convergence will return fewer detected squeezed areas.
We recommend using a convergence factor equal to the period setting or a convergence factor twice as high.
The above chart makes use of a convergence factor of 100 and a period of 10.
Due to the calculation method, it is possible to see retracements being interpreted as price squeezing. This effect can be emphasized with higher convergence factor values.
Details
In order to measure the effect of price being squeezed in a tighter area we refer to damping, where the oscillations amplitude of a system decrease over time. If the envelopes of a damped system can be estimated, then getting the difference between the upper and lower extremity of these envelopes would return a decreasing series of values.
This approach is used here. First the difference between the exponential envelopes extremities is obtained, the logarithm of this difference if obtained due to the extremities converging exponentially toward their input.
We then use the correlation oscillator to get a scaled measurement.
Signal Moving Average [LuxAlgo]The following script returns a moving average designed to be used as a signal line in a moving average crossover system. The moving average will diverge from the price during ranging markets and reach the value of a regular moving average during trending markets.
Settings
Length: Moving average period
Src: Source input of the indicator
Usage
Moving average crossover strategies often rely on a "signal" line, a slower moving average used to determine a general trend. This signal line is paired with a faster moving average to filter out potential whipsaw trades that would have been given from crosses between the regular price and the signal line.
The proposed indicator will avoid crossing the price by diverging from it during more ranging periods, thus effectively reducing the number of crosses produced between the price and the signal line.
The color of the area between the price and the signal line is determined by the position of the price relative to the signal line, with a green color indicator a price superior to the signal line.
The color of the signal line, however, is taking into account whether market is trending or ranging, only changing once the market is trending.
The chart above shows the cumulated number of crosses between the price and the signal line (green) and a regular simple moving average of the same period (red) on AMD 15m, a lowered number of crosses can effectively reduce the impact of frictional costs introduced by whipsaw trades.
Candlestick Channels [LuxAlgo]Candlestick Channels return channels whose extremities converge towards the price when a corresponding candlestick pattern is detected. This allows for us to obtain more reactive extremities in the presence of a cluster of candlestick patterns.
The detected candlestick patterns are also highlighted with labels on your chart automatically.
Settings
Trend Length: Period of the stochastic oscillator used to determine trend sentiment; this sentiment is used to detect certain candlestick patterns.
Convergence: Convergence percentage of the channel extremities used during the occurrence of a candlestick pattern. A lower value will return extremities converging more slowly toward the price.
Smooth: Determines the degree of smoothness of the channel extremities.
Patterns
This category determines which patterns are detected by the indicator. Patterns toggled off will not be detected and won't affect the channels.
Usage
Candlesticks patterns are commonly used by traders to detect potential reversals or continuation periods in the price. It can be of interest to use them as core elements in the calculation of more classical indicators, this can allow us to filter out potential false signals returned by candlestick patterns by shifting the source of interpretation towards the channel extremities instead.
In this indicator extremities converge towards the price when a corresponding pattern is detected. As such bullish patterns will make the upper extremity converge towards the price, facilitating a cross with price. Using a lower convergence percentage will require a greater number of patterns to make the extremity converge closer towards the price.
Users can use the channel like most indicators returning extremities, with an uptrend being detected when price cross over the upper extremity and a downtrend being detected when price cross under the lower extremity.
An approach solely making use of crosses between the price and the average line can be used but the user should expect further whipsaws signals.
Users can eventually use the candlestick patterns as entries and use the extremities for confirmation. For example, users can follow a candlestick pattern return an indication in accordance with the detected trend by the channels.
This approach would lead to the following of bullish patterns when they occur in an uptrend, that is when the price is above the average line (in orange). The same logic applies to bearish patterns.
The chart above highlights the candlesticks patterns in accordance with a detected trend.
Notes
- Bullish/Bearish engulfing patterns are turned off by default due their more frequent appearance.
- Candlestick patterns relying on gaps were not included, since they would be more uncommon in cryptocurrencies, thus leading to a disparity between the indicator performance on the cryptocurrency and stock market.
Fair Value Gap [LuxAlgo]Fair value gaps (FVG) highlight imbalances areas between market participants and have become popular amongst technical analysts. The following script aims to display fair value gaps alongside the percentage of filled gaps and the average duration (in bars) before gaps are filled.
Users can be alerted when an FVG is filled using the alerts built into this script.
🔶 USAGE
In practice, FVG's highlight areas of support (bullish FVG) and resistances (bearish FVG). Once a gap is filled, suggesting the end of the imbalance, we can expect the price to reverse.
This approach is more contrarian in nature, users wishing to use a more trend-following approach can use the identification of FVG as direct signals, going long with the identification of a bullish FVG, and short with a bearish FVG.
🔹 Mitigation
By default, the script highlights the areas of only unmitigated FVG's. Users can however highlight the mitigation level of mitigated FVG's, that is the lower extremity of bullish FVG's and the upper extremity of bearish FVG's.
The user can track the evolution of a mitigated FVG's using the "Dynamic" setting.
🔹 Threshold
The gap height can be used to determine the degree of imbalance between buying and selling market participants. Users can filter fair value gaps based on the gap height using the "Threshold %" setting. Using the "Auto" will make use of an automatic threshold, only keeping more volatile FVG's.
🔶 DETAILS
We use the following rules for detecting FVG's in this script:
Bullish FVG
low > high(t-2)
close(t-1) > high(t-2)
(low - high(t-2)) / high(t-2) > threshold
Upper Bullish FVG = low
Lower Bullish FVG = high(t-2)
Bearish FVG
high < low(t-2)
close(t-1) < low(t-2)
(low(t-2) - high) / high < -threshold
Upper Bearish FVG = low(t-2)
Lower Bearish FVG = high
🔶 SETTINGS
Threshold %: Threshold percentage used to filter our FVG's based on their height.
Auto Threshold: Use the cumulative mean of relative FVG heights as threshold.
Unmitigatted Levels: Extent the mitigation level of the number of unmitigated FVG's set by the user.
Mitigation Levels: Show the mitigation levels of mitigated FVG's.
Timeframe : Timeframe of the price data used to detect FVG's.
Moving Averages Proximity Oscillator [LuxAlgo]This indicator returns the percentage or count of prices greater than simple moving averages with periods in a user set range, as well as the moving average period that is the closest to price values.
Settings
Minimum Length: Minimum SMA period
Maximum Length: Maximum SMA period
Smooth: Control the degree of smoothness of the indicator outputs
Normalized: Normalize the indicator outputs in a range (0, 100)
Src: Input source of the indicator
Usage
The indicator returns two outputs.
The "Price Above MA's" output returns for a current price value the number of times this one is greater than simple moving averages with periods ranging from Minimum Length to Maximum Length . This oscillator can be expressed as a percentage if Normalized is selected.
This oscillator allows identifying the direction of an underlying trend in the price. Higher Minimum Length and Maximum Length settings will return indications regarding longer term price variations, while shorter ranges will return less detailed outputs. This can be seen in the chart above where Minimum Length = 80 to Maximum Length = 100 .
The "Proximity Index" output on the other end does not return information regarding the direction of an underlying trend but the period of the simple moving average with periods ranging from Minimum Length to Maximum Length that is the closest to the current price value.
For various simple moving averages of differing periods, we can see that SMA's with shorter periods will tend to stay closer to the price, when price start reverting it will reach higher periods moving averages.
As such, this second indicator output can help identify the start of new trends, with higher values indicating price is reverting toward longer-term moving averages, suggesting a new trend forming.
TF Segmented Polynomial Regression [LuxAlgo]This indicator displays polynomial regression channels fitted using data within a user selected time interval.
The model is fitted using the same method described in our previous script:
Settings
Degree: Degree of the fitted polynomial
Width: Multiplicative factor of the model RMSE. Controls the width of the polynomial regression's channels
Timeframe: Fits the polynomial regression using data within the selected timeframe interval
Show fit for new bars: If selected, will fit the regression model for newly generated bars, else the previous fitted value is displayed.
Src: Input source
Usage
Segmented (or piecewise) models yield multiple fits by first partitioning the data into multiple intervals from specific partitioning conditions. In this script this partitioning condition is for a user selected timeframe to change.
Segmented models can be particularly pertinent for market prices, which often describes a series of local trends.
Segmented polynomial regressions can describe the nature of underlying trends in the price from their fit, such as if an underlying trend is more linear (trending) or constant (ranging), and if a trend is monotonic.
The above chart shows a monthly partitioning on SPX 15m, using a polynomial regression of degree 3. Channel extremities allows highlighting local tops/bottoms.
For real time applications users can choose to fit a current model to incoming price data using the Show fit for new bars settings.
Details
The script does not make use of line.new to display the segmented linear regressions, which allows showing a higher number of historical fits. Each channel extremity as well as the model fit is displayed from the plot function, as such user can more easily set alerts on them.
It is important to note that achieving this requires accessing future price data, as such this script is subject to lookahead bias, historical results differ from the results one could have obtained in real-time.
Moving Average Converging [LuxAlgo]This indicator returns a moving average converging toward the price the more a trend makes new higher-highs or lower-lows depending on the detected trend.
Settings
Length: Controls the initial moving average smoothing factor ( 2 / (Length + 1) ), as well as the period of rolling maximums/minimums.
Increment: Smoothing factor increment ( 2 / (Increment+ 1) ) for new higher-high/lower-low, lower values would return a faster converging moving average.
Fast: Fast moving average smoothing factor.
Usage
The proposed moving average can be used like most slow moving averages.
Having a moving average able to converge closer to the price the longer a trend lasts allows users to obtain more timely crosses. This practice can remind us of the Parabolic SAR or our TRAMA indicator:
Notice on the chart above how the moving average converges at an increasing rate with the occurrence of new high-highs/lower-lows.
Visible Range Mean Deviation Histogram [LuxAlgo]This script displays a histogram from the mean and standard deviation of the visible price values on the chart. Bin counting is done relative to high/low prices instead of counting the price values within each bin, returning a smoother histogram as a result.
Settings
Bins Per Side: Number of bins computed above and below the price mean
Deviation Multiplier: Standard deviation multiplier
Style
Relative: Determines whether the bins length is relative to the maximum bin count, with a length controlled with the width settings to the left.
Bin Colors: Bin/POC Lines colors
Show POCs: Shows point of controls
Usage
Histograms are generally used to estimate the underlying distribution of a series of observations, their construction is generally done taking into account the overall price range.
The proposed histogram construct N intervals above*below the mean of the visible price, with each interval having a size of: σ × Mult / N , where σ is the standard deviation and N the number of Bins per side and is determined by the user. The standard deviation multipliers are highlighted at the left side of each bin.
A high bin count reflects a higher series of observations laying within that specific interval, this can be useful to highlight ranging price areas.
POCs highlight the most significant bins and can be used as potential support/resistances.
Parabolic SAR Oscillator [LuxAlgo]This indicator is a detrended price series using the Parabolic Stop and Reverse (SAR) trailing stop, resulting in a bounded oscillator in the range (-100, 100). The SAR output is also normalized to obtain a noiseless oscillator which can complement the detrended price.
Settings
Start: Initial value of the convergence factor used when a new trend is detected by the SAR
Increment: Increment value of the convergence factor
Maximum: Maximum value of the convergence factor
Usage
The price is detrended by subtracting the closing price to the SAR, this result is then normalized.
An up-trending market is indicated once the normalized SAR reaches -100, while a value of 100 indicates a down-trending market. One can anticipate trends when the normalized SAR crosses above/under 0.
The converging nature of the SAR trailing stop allows for the trader to obtain a very apparent leading oscillator.
Polynomial Regression Extrapolation [LuxAlgo]This indicator fits a polynomial with a user set degree to the price using least squares and then extrapolates the result.
Settings
Length: Number of most recent price observations used to fit the model.
Extrapolate: Extrapolation horizon
Degree: Degree of the fitted polynomial
Src: Input source
Lock Fit: By default the fit and extrapolated result will readjust to any new price observation, enabling this setting allow the model to ignore new price observations, and extend the extrapolation to the most recent bar.
Usage
Polynomial regression is commonly used when a relationship between two variables can be described by a polynomial.
In technical analysis polynomial regression is commonly used to estimate underlying trends in the price as well as obtaining support/resistances. One common example being the linear regression which can be described as polynomial regression of degree 1.
Using polynomial regression for extrapolation can be considered when we assume that the underlying trend of a certain asset follows polynomial of a certain degree and that this assumption hold true for time t+1...,t+n . This is rarely the case but it can be of interest to certain users performing longer term analysis of assets such as Bitcoin.
The selection of the polynomial degree can be done considering the underlying trend of the observations we are trying to fit. In practice, it is rare to go over a degree of 3, as higher degree would tend to highlight more noisy variations.
Using a polynomial of degree 1 will return a line, and as such can be considered when the underlying trend is linear, but one could improve the fit by using an higher degree.
The chart above fits a polynomial of degree 2, this can be used to model more parabolic observations. We can see in the chart above that this improves the fit.
In the chart above a polynomial of degree 6 is used, we can see how more variations are highlighted. The extrapolation of higher degree polynomials can eventually highlight future turning points due to the nature of the polynomial, however there are no guarantee that these will reflect exact future reversals.
Details
A polynomial regression model y(t) of degree p is described by:
y(t) = β(0) + β(1)x(t) + β(2)x(t)^2 + ... + β(p)x(t)^p
The vector coefficients β are obtained such that the sum of squared error between the observations and y(t) is minimized. This can be achieved through specific iterative algorithms or directly by solving the system of equations:
β(0) + β(1)x(0) + β(2)x(0)^2 + ... + β(p)x(0)^p = y(0)
β(0) + β(1)x(1) + β(2)x(1)^2 + ... + β(p)x(1)^p = y(1)
...
β(0) + β(1)x(t-1) + β(2)x(t-1)^2 + ... + β(p)x(t-1)^p = y(t-1)
Note that solving this system of equations for higher degrees p with high x values can drastically affect the accuracy of the results. One method to circumvent this can be to subtract x by its mean.