VIX Near-Term Futures CurveThis indicator provides a 3 day smoothed histogram expressing whether the near term VIX futures curve is in a state of contango or backwardation. The solid red/green bars express the spot vs front-month vs next month curve with the value being the cumulative point spread between them. The shaded overlay bars express the spread between the VIX spot index and front-month futures contract only.
This indicator is to be used on a 1 DAY interval or higher.
"乌德勒支+VS+赫拉克勒斯" için komut dosyalarını ara
BTC Coinbase PremiumThis script is base on another script by oh 92.
It basically shows you where the price of Bitcoin (in USD) on Coinbase trades at a premium against an average of several futures exchanges.
Coinbase premium shows spot interest on bitcoin which happens either when futures are shorting heavily but spot holds the price up (often bullish especially when price is at a support level).
Negative premium shows that futures are leading price during an uptrend or spot is leading price during a downtrend.
Strong positive premium is often considered bullish.
Strong negative premium is often considered bearish even if price goes up.
The histogramm coinbase premium vs an average of several futures exchanges (Bitmex, Bitfinex, Binance, FTX, Phemex and Bitstamp).
The line diagramm shows coinbase premium vs Bybit.
In contrast to the script by oh92 this script uses different exchages (especially Bybit as a lot of former Bitmex traders changed to Bybit during september and october 2020).
All values are in percent because differences in USD only are not suitable for historic prices. This means if CB-premium is -0.1 then futures trade 0.1% lower than coinbase.
GBTC & BTCE Premium Indicator- This indicator illustrates the premium of GBTC and the European equivalent, BTCE. Relative to the spot price of Bitcoin
- It represents the premium investors are willing to pay to be able to gain exposure to Bitcoin . Whilst holding them in an investment vehicle such as a 401k or an ISA.
- The premiums can be plotted. GBTC vs BTCUSD and BTCE vs BTCEUR
OR
- The "real price" of BTCUSD , GBTC and BTCE (denominated in USD) can be plotted against each other
Probability: Bull/Bear Dominance | Ratio | Bar CountIntro
What's the probability of the next bar being red? How about green? Well, there are many ways to quantify the probability but I am presenting just one stupidly simple (but generally accurate) way to measure it.
Strangely... no one has done this before that I can find. I try to check if someone else has done it first (Pro Tip: Plz do this. We honestly don't need the 5 trillionth "MTF MAs" script.)
Indicator
Its a basic counting script, but the nice thing about this script is you choose the time range. It starts counting from a specified point of your choosing. It counts up the bull bars and bear bars separately.
Bull Bar = Close > Open
Bear Bar = Open > Close
You can look at them in sum or as a ratio of Green Bars : Red Bars
I know, it's almost too simple. But, here's some interesting food for thought from a layman to fellow laymen.
Analysis/Edge
Between the time of candle open and candle close, the price can do one of three things, close higher, close lower, or close equal to.
'Equal to' is rare on higher timeframes in liquid markets and it provides no useful information. Thus, we'll nix it for purposes of this conversation.
So boil it down. The next candle is going to be a red candle or a green candle.
It is popular to refer to the general probability of most candles as 50/50, with trader's mission in life being to seek an edge that tilts the probabilities slightly in their favor.
The truth is the odds are probably never actually 50/50, but knowing the precisely correct probability is unknowable, just like the accuracy of a weather forecast is inherently unknowable. What we're trying to do as traders is develop systems that give us predictive probabilistic outcomes that correspond with future realities based on various ways of measuring the market (most often heavily dependent on the past).
The reality is that the market can be measured in many, many different ways. The important thing is that you measure it in a way that is accurate, relevant, and universally applicable.
So look at this indicator here:
You start from a point in time on a chosen timeframe and you put red bars in the red column, green in the green column, and count them all up.
Then you make a ratio, in this case, Green : Red.
What the ratio shows you is the percentage of green bars compared to red bars . At the time of this screenshot, the 4h on the SPX starting from the 2020 bottom is showing a ratio of 1.2.
This means there have been 20% more green bars than there have been red bars.
Now there are 1,000 directions you can take this discussion. What is the overall volatility picture, the size of the red bars vs the green bars, what happens if you miss out on the 5 biggest green bars... so many more variables that you would need to take into account to develop a true edge from this idea. But, the bottom line fact (which is what I like about this) is that we can take this data and say with a certain level of confidence that on the SPX you have a 20% better shot at making money (otherwise stated there's a 60/40 chance) if you open a LONG trade at the beginning of a 4h candle than if you open a short.
That's useful information. One could argue that it's not a complete strategy in and of itself (although I bet it could be with a couple of additional parameters). But I can tell you, based on the 4h candles in the 2020 rally if you open a short, the deck is stacked against you from this perspective. And we can actually somewhat demonstrate this to be true for our dataset because we can look at the price history and see who likely made more money. The SPX is up 1000pts off the bottom. So, thus far, for this dataset, it rings true; Bulls have been doing way better in the latter part of 2020 than the bears.
Conclusion
Predictive systems with a small number of variables tend to be more robust than a system with many variables when applied to a complex system. I may keep updating this script if people like it and determine aspects like population vs sample size, confidence intervals, volatility, and exclusion of outliers. For now, this is just an opening foray into the basic idea of how we can establish an edge in the markets. It really can be this simple.
Thanks for Reading.
Bar Balance [LucF]Bar Balance extracts the number of up, down and neutral intrabars contained in each chart bar, revealing information on the strength of price movement. It can display stacked columns representing raw up/down/neutral intrabar counts, or an up/down balance line which can be calculated and visualized in many different ways.
WARNING: This is an analysis tool that works on historical bars only. It does not show any realtime information, and thus cannot be used to issue alerts or for automated trading. When realtime bars elapse, the indicator will require a browser refresh, a change to its Inputs or to the chart's timeframe/symbol to recalculate and display information on those elapsed bars. Once a trader understands this, the indicator can be used advantageously to make discretionary trading decisions.
Traders used to work with my Delta Volume Columns Pro will feel right at home in this indicator's Inputs . It has lots of options, allowing it to be used in many different ways. If you value the bar balance information this indicator mines, I hope you will find the time required to master the use of Bar Balance well worth the investment.
█ OVERVIEW
The indicator has two modes: Columns and Line .
Columns
• In Columns mode you can display stacked Up/Down/Neutral columns.
• The "Up" section represents the count of intrabars where `close > open`, "Down" where `close < open` and "Neutral" where `close = open`.
• The Up section always appears above the centerline, the Down section below. The Neutral section overlaps the centerline, split halfway above and below it.
The Up and Down sections start where the Neutral section ends, when there is one.
• The Up and Down sections can be colored independently using 7 different methods.
• The signal line plotted in Line mode can also be displayed in Columns mode.
Line
• Displays a single balance line using a zero centerline.
• A variable number of independent methods can be used to calculate the line (6), determine its color (5), and color the fill (5).
You can thus evaluate the state of 3 different components with this single line.
• A "Divergence Levels" feature will use the line to automatically draw expanding levels on divergence events.
Features available in both modes
• The color of all components can be selected from 15 base colors, with 16 gradient levels used for each base color in the indicator's gradients.
• A zero line can show a 6-state aggregate value of the three main volume balance modes.
• The background can be colored using any of 5 different methods.
• Chart bars can be colored using 5 different methods.
• Divergence and large neutral count ratio events can be shown in either Columns or Line mode, calculated in one of 4 different methods.
• Markers on 6 different conditions can be displayed.
█ CONCEPTS
Intrabar inspection
Intrabar inspection means the indicator looks at lower timeframe bars ( intrabars ) making up a given chart bar to gather its information. If your chart is on a 1-hour timeframe and the intrabar resolution determined by the indicator is 5 minutes, then 12 intrabars will be analyzed for each chart bar and the count of up/down/neutral intrabars among those will be tallied.
Bar Balances and calculation methods
The indicator uses a variety of methods to evaluate bar balance and to derive other calculations from them:
1. Balance on Bar : Uses the relative importance of instant Up and Down counts on the bar.
2. Balance Averages : Uses the difference between the EMAs of Up and Down counts.
3. Balance Momentum : Starts by calculating, separately for both Up and Down counts, the difference between the same EMAs used in Balance Averages and an SMA of double the period used for the EMAs. These differences are then aggregated and finally, a bounded momentum of that aggregate is calculated using RSI.
4. Markers Bias : It sums the bull/bear occurrences of the four previous markers over a user-defined period (the default is 14).
5. Combined Balances : This is the aggregate of the instant bull/bear bias of the three main bar balances.
6. Dual Up/Down Averages : This is a display mode showing the EMA calculated for each of the Up and Down counts.
Interpretation of neutral intrabars
What do neutral intrabars mean? When price does not change during a bar, it can be because there is simply no interest in the market, or because of a perfect balance between buyers and sellers. The latter being more improbable, Bar Balance assumes that neutral bars reveal a lack of interest, which entails uncertainty. That is the reason why the option is provided to interpret ratios of neutral intrabars greater than 50% as divergences. It is also the rationale behind the option to dampen signal lines on the inverse ratio of neutral intrabars, so that zero intrabars do not affect the signal, and progressively larger proportions of neutral intrabars will reduce the signal's amplitude, as the balance calcs using the up/down counts lose significance. The impact of the dampening will vary with markets. Weaker markets such as cryptos will often contain greater numbers of neutral intrabars, so dampening the Line in that sector will have a greater impact than in more liquid markets.
█ FEATURES
1 — Columns
• While the size of the Up/Down columns always represents their respective importance on the bar, their coloring mode is independent. The default setup uses a standard coloring mode where the Up/Down columns over/under the zero line are always in the bull/bear color with a higher intensity for the winning side. Six other coloring modes allow you to pack more information in the columns. When choosing to color the top columns using a bull/bear gradient on Balance Averages, for example, you will end up with bull/bear colored tops. In order for the color of the bottom columns to continue to show the instant bar balance, you can then choose the "Up/Down Ratio on Bar — Dual Solid Colors" coloring mode to make those bars the color of the winning side for that bar.
• Line mode shows only the line, but Columns mode allows displaying the line along with it. If the scale of the line is different than that of the scale of the columns, the line will often appear flat. Traders may find even a flat line useful as its bull/bear colors will be easily distinguishable.
2 — Line
• The default setup for Line mode uses a calculation on "Balance Momentum", with a fill on the longer-term "Balance Averages" and a line color based on the "Markers Bias". With the background set on "Line vs Divergence Levels" and the zero line on the hard-coded "Combined Bar Balances", you have access to five distinct sources of information at a glance, to which you can add divergences, divergences levels and chart bar coloring. This provides powerful potential in displaying bar balance information.
• When no columns are displayed, Line mode can show the full scale of whichever line you choose to calculate because the columns' scale no longer interferes with the line's scale.
• Note that when "Balance on Bar" is selected, the Neutral count is also displayed as a ratio of the balance line. This is the only instance where the Neutral count is displayed in Line mode.
• The "Dual Up/Down Averages" is an exception as it displays two lines: one average for the Up counts and another for the Down counts. This mode will be most useful when Columns are also displayed, as it provides a reference for the top and bottom columns.
3 — Zero Line
The zero line can be colored using two methods, both based on the Combined Balances, i.e., the aggregate of the instant bull/bear bias of the three main bar balances.
• In "Six-state Dual Color Gradient" mode, a dot appears on every bar. Its color reflects the bull/bear state of the Combined Balances, and the dot's brightness reflects the tally of balance biases.
• In "Dual Solid Colors (All Bull/All Bear Only)" a dot only appears when all three balances are either bullish or bearish. The resulting pattern is identical to that of Marker 1.
4 — Divergences
• Divergences are displayed as a small circle at the top of the scale. Four different types of divergence events can be detected. Divergences occur whenever the bull/bear bias of the method used diverges with the bar's price direction.
• An option allows you to include in divergence events instances where the count of neutral intrabars exceeds 50% of the total intrabar count.
• The divergence levels are dynamic levels that automatically build from the line's values on divergence events. On consecutive divergences, the levels will expand, creating a channel. This implementation of the divergence levels corresponds to my view that divergences indicate anomalies, hesitations, points of uncertainty if you will. It excludes any association of a pre-determined bullish/bearish bias to divergences. Accordingly, the levels merely take note of divergence events and mark those points in time with levels. Traders then have a reference point from which they can evaluate further movement. The bull/bear/neutral colors used to plot the levels are also congruent with this view in that they are determined by price's position relative to the levels, which is how I think divergences can be put to the most effective use.
5 — Background
• The background can show a bull/bear gradient on four different calculations. You can adjust its brightness to make its visual importance proportional to how you use it in your analysis.
6 — Chart bars
• Chart bars can be colored using five different methods.
• You have the option of emptying the body of bars where volume does not increase, as does my TLD indicator, the idea behind this being that movement on bars where volume does not increase is less relevant.
7 — Intrabar Resolution
You can choose between three modes. Two of them are automatic and one is manual:
a) Fast, Longer history, Auto-Steps (~12 intrabars) : Optimized for speed and deeper history. Uses an average minimum of 12 intrabars.
b) More Precise, Shorter History Auto-Steps (~24 intrabars) : Uses finer intrabar resolution. It is slower and provides less history. Uses an average minimum of 24 intrabars.
c) Fixed : Uses the fixed resolution of your choice.
Auto-Steps calculations vary for 24/7 and conventional markets in order to achieve the proper target of minimum intrabars.
You can choose to view the intrabar resolution currently used to calculate delta volume. It is the default.
The proper selection of the intrabar resolution is important. It must achieve maximal granularity to produce precise results while not unduly slowing down calculations, or worse, causing runtime errors.
8 — Markers
Six markers are available:
1. Combined Balances Agreement : All three Bar Balances are either bullish or bearish.
2. Up or Down % Agrees With Bar : An up marker will appear when the percentage of up intrabars in an up chart bar is greater than the specified percentage. Conditions mirror to down bars.
3. Divergence confirmations By Price : One of the four types of balance calculations can be used to detect divergences with price. Confirmations occur when the bar following the divergence confirms the balance bias. Note that the divergence events used here do not include neutral intrabar events.
4. Balance Transitions : Bull/bear transitions of the selected balance.
5. Markers Bias Transitions : Bull/bear transitions of the Markers Bias.
6. Divergence Confirmations By Line : Marks points where the line first breaches a divergence level.
Markers appear when the condition is detected, without delay. Since nothing is plotted in realtime, markers do not appear on the realtime bar.
9 — Settings
• Two modes can be selected to dampen the line on the ratio of neutral intrabars.
• A distinct weight can be attributed to the count of the latter half of intrabars, on the assumption that later intrabars may be more important in determining the outcome of chart bars.
• Allows control over the periods of the different moving averages used in calculations.
• The default periods used for the various calculations define the following hierarchy from slow to fast:
Balance Averages: 50,
Balance Momentum: 20,
Dual Up/Down Averages: 20,
Marker Bias: 10.
█ LIMITATIONS
• This script uses a special characteristic of the `security()` function allowing the inspection of intrabars—which is not officially supported by TradingView.
• The method used does not work on the realtime bar—only on historical bars.
• The indicator only works on some chart resolutions: 3, 5, 10, 15 and 30 minutes, 1, 2, 4, 6, and 12 hours, 1 day, 1 week and 1 month. The script’s code can be modified to run on other resolutions, but chart resolutions must be divisible by the lower resolution used for intrabars and the stepping mechanism could require adaptation.
• When using the "Line vs Divergence Levels — Dual Color Gradient" color mode to fill the line, background or chart bars, keep in mind that a line calculation mode must be defined for it to work, as it determines gradients on the movement of the line relative to divergence levels. If the line is hidden, it will not work.
• When the difference between the chart’s resolution and the intrabar resolution is too great, runtime errors will occur. The Auto-Steps selection mechanisms should avoid this.
• Alerts do not work reliably when `security()` is used at intrabar resolutions. Accordingly, no alerts are configured in the indicator.
• The color model used in the indicator provides for fancy visuals that come at a price; when you change values in Inputs , it can take 20 seconds for the changes to materialize. Luckily, once your color setup is complete, the color model does not have a large performance impact, as in normal operation the `security()` calls will become the most important factor in determining response time. Also, once in a while a runtime error will occur when you change inputs. Just making another change will usually bring the indicator back up.
█ RAMBLINGS
Is this thing useful?
I'll let you decide. Bar Balance acts somewhat like an X-Ray on bars. The intrabars it analyzes are no secret; one can simply change the chart's resolution to see the same intrabars the indicator uses. What the indicator brings to traders is the precise count of up/down/neutral intrabars and, more importantly, the calculations it derives from them to present the information in a way that can make it easier to use in trading decisions.
How reliable is Bar Balance information?
By the same token that an up bar does not guarantee that more up bars will follow, future price movements cannot be inferred from the mere count of up/down/neutral intrabars. Price movement during any chart bar for which, let's say, 12 intrabars are analyzed, could be due to only one of those intrabars. One can thus easily see how only relying on bar balance information could be very misleading. The rationale behind Bar Balance is that when the information mined for multiple chart bars is aggregated, it can provide insight into the history behind chart bars, and thus some bias as to the strength of movements. An up chart bar where 11/12 intrabars are also up is assumed to be stronger than the same up bar where only 2/12 intrabars are up. This logic is not bulletproof, and sometimes Bar Balance will stray. Also, keep in mind that balance lines do not represent price momentum as RSI would. Bar Balance calculations have no idea where price is. Their perspective, like that of any historian, is very limited, constrained that it is to the narrow universe of up/down/neutral intrabar counts. You will thus see instances where price is moving up while Balance Momentum, for example, is moving down. When Bar Balance performs as intended, this indicates that the rally is weakening, which does necessarily imply that price will reverse. Occasionally, price will merrily continue to advance on weakening strength.
Divergences
Most of the divergence detection methods used here rely on a difference between the bias of a calculation involving a multi-bar average and a given bar's price direction. When using "Bar Balance on Bar" however, only the bar's balance and price movement are used. This is the default mode.
As usual, divergences are points of interest because they reveal imbalances, which may or may not become turning points. I do not share the overwhelming enthusiasm traders have for the purported ability of bullish/bearish divergences to indicate imminent reversals.
Superfluity
In "The Bed of Procrustes", Nassim Nicholas Taleb writes: To bankrupt a fool, give him information . Bar Balance can display lots of information. While learning to use a new indicator inevitably requires an adaptation period where we put it through its paces and try out all its options, once you have become used to Bar Balance and decide to adopt it, rigorously eliminate the components you don't use and configure the remaining ones so their visual prominence reflects their relative importance in your analysis. I tried to provide flexible options for traders to control this indicator's visuals for that exact reason—not for window dressing.
█ NOTES
For traders
• To avoid misleading traders who don't read script descriptions, the indicator shows nothing in the realtime bar.
• The Data Window shows key values for the indicator.
• All gradients used in this indicator determine their brightness intensities using advances/declines in the signal—not their relative position in a fixed scale.
• Note that because of the way gradients are optimized internally, changing their brightness will sometimes require bringing down the value a few steps before you see an impact.
• Because this indicator does not use volume, it will work on all markets.
For coders
• For those interested in gradients, this script uses an advanced version of the Advance/Decline gradient function from the PineCoders Color Gradient (16 colors) Framework . It allows more precise control over the range, steps and min/max values of the gradients.
• I use the PineCoders Coding Conventions for Pine to write my scripts.
• I used functions modified from the PineCoders MTF Selection Framework for the selection of timeframes.
█ THANKS TO:
— alexgrover who helped me think through the dampening method used to attenuate signal lines on high ratios of neutral intrabars.
— A guy called Kuan who commented on a Backtest Rookies presentation of their Volume Profile indicator . The technique I use to inspect intrabars is derived from Kuan's code.
— theheirophant , my partner in the exploration of the sometimes weird abysses of `security()`’s behavior at intrabar resolutions.
— midtownsk8rguy , my brilliant companion in mining the depths of Pine graphics. He is also the co-author of the PineCoders Color Gradient Frameworks .
RedK_Directional Index / K xDMIHere's a modern take on the famous DMI/ADX. i first wrote this on another platform few years ago, so i'm happy to be able to share it on TradingView
quick refresher: what does DMI/ADX tell us:
------------------------------------------------------
in simple terms, at the core of this indicator, there are 3 main calculations / lines: the Plus Directional Index ( +DI ) which represents how much the bulls are able to push the high of a bar compared to previous one, the Minus Directional Index ( -DI ), showing how much the bears are able to push the low of a bar from previous one, then the Average Directional index ( ADX ) line, which creates an oscillator of the +DI and -DI to represent the strength of a trend -- usually the lines will be colored accordingly (bulls = green, bears = red, and any different color for the ADX )
Similar to my version of the RSI , we take a classic concept, then use the computing and visualization "super powers" available to us today, to extend and improve on what those masters created in the past. I guess they sort of expected us to do exactly that :)
this "extended" version of DMI/ADX provides couple of highly needed features (in my opinion) -- let's explore:
trying as much as possible to avoid jargon - pls forgive me if i failed in some places.
-------------------------------------------------------------------------------------------------
1 - the big change: the ability to visualize the ADX in a way that makes some more sense.
- the original calculation restricted the ADX to oscillate below zero - i'm sure they had a good reason to build it that way in the past - but to me, it becomes super hard to interpret what the ADX line means, especially when a negative trend (the bears) take over. by removing that restriction and allowing the ADX to oscillate up or down (and we're free to do that, so the indicator shows *us* what *we need* to see), we end up with an improved representation of the trend and the trend strength.
- also the original calculation applies a moving average (default 14 bars) of a moving average (another 14 of the Directional Indexes, which represent the strength of bulls vs bears) to calculate the ADX - that makes the ADX very "removed" from the base price values - i change that, and just smooth the initial +Di / -Di then calculate the ADX from there. again, this shows me the outcome of the (relatively) immediate moves.
2 - i use weighted average WMA () in all my averaging calculations .. i believe this type of average is the best to express the importance of recent days / bars vs the ones further in the past, compared to other averaging techniques
3 - ability to make the DMI volume-weighted .. but contrary to my RSI , this is not set by default.
4 - couple of options to view the unrestricted ADX (as an area or as histogram/columns .. which i call Vertical Bars) for improved visualization
other stuff:
5 - a "step" option for the ADX .. you can set the step option to an increment of, say 5 or 10. this is in case you prefer to see the trend more in "quality" terms - so the equivalent of weak, medium, strong, v. strong...etc -- since in reality, a number like 47.7683 doesn't really mean anything specific
6 - optional "strong trend" adjustable level
Settings & usage suggestion:
-----------------------------------
i prefer to use the defaults (length = 7, smoothing = 3, ..etc) -- i believe these are more suitable to the much faster trading that we have now. you can review the comparison chart and see if this works for you, and adjust as you need.
from a "signal" standpoint, you can use the xDMI as you use the classic DMI/ADX, bulls (or bears) are in control when the corresponding DI line crosses the other going up, *AND* moving above the "strong trend" level that you can set as an extra filter (usually a value between 20 to 30), while ADX will show the quality/strength of the trend.
i suggest you also utilize this indicator with other trend / momentum confirmation methods, and additional analysis and not in isolation - as well as inspecting the prevailing / longer time frame to ensure you're acting in the direction of the broader move / trend.
the above chart includes a side-by-side comparison between our new xDMI with the classic DMI/ADX using the same settings - then we add at the bottom panel also the xDMI, but with my default (faster) settings and showing other visualization options that can be utilized - the Moving Averages on the top / price panel is just to help put the price movement into perspective in terms of trend and trend strength.
The code is open and commented - please feel free to use, share, comment & provide feedback. if you're a DMI fan, and you find this useful in your trading, i would be more than happy to hear about it
Good luck!
BEST Engulfing + Breakout StrategyHello traders
This is a simple algorithm for a Tradingview strategy tracking a convergence of 2 unrelated indicators.
Convergence is the solution to my trading problems.
It's a puzzle with infinite possibilities and only a few working combinations.
Here's one that I like
- Engulfing pattern
- Price vs Moving average for detecting a breakout
Definition
Take out the notebooks :) and some coffee (good for focus). I'm bullish in coffee
The engulfing pattern is a two-candle reversal pattern.
The second candle completely ‘engulfs’ the real body of the first one, without regard to the length of the tail shadows.
The bullish Engulfing pattern appears in a downtrend and is a combination of one red candle followed by a larger green candle
The bearish Engulfing pattern appears in a downtrend and is a combination of one green candle followed by a larger red candle
Example: imgur.com
We're bored sir... what's the point of all this?
In summary, an engulfing is a pattern to track reversals. (the whole TradingView audience stands up now giving a standing ovation)
Adding the Price vs Moving average filters allows to track reversals with momentums (half of the audience collapsed because this is too awesome)
Ok sir... you picked up my interest
I included some cool backtest filters:
- date range filtering
- flexible take profit in USD value (plotted in blue)
- flexible stop loss in USD value (plotted in red)
All the best
Dave
BTC Volume absolute (fiat vs Tether vs futures)BTC volume split by fiat, Tether and futures in USD
fiat = COINBASE + BITFLYER + BITSTAMP + KRAKEN
Tether = BITFINEX + BINANCE + HUOBI + HITBTC
futures = BITMEX + BYBIT
Premium/Discount (Input)Used to show Contango or Backwardation in futures contracts vs spot price. You can input your own tickers so can technically can be used to compare anything.
* In this example I'm showing Okex Quarterly contract vs Okex spot index price because it showcases it better.
* If you are using this after 2019 the default setting will not work because I set it to Bitmex which does not currently have a "current contract in front" ticker available.
It should be fairly self explanatory, but just ask below if you have any questions.
Volume Profile Free Ultra SLI (100 Levels Value Area VWAP) - RRBVolume Profile Free Ultra SLI by RagingRocketBull 2019
Version 1.0
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 100 horizontal bars.
This is basically the MAX SLI version with +50 more Pinescript v4 line objects added as levels.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are several versions: Free Pro, Free MAX SLI, Free Ultra SLI, Free History. This is the Free Ultra SLI version. The Differences are listed below:
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX SLI: 50 levels, 2x SLI modes for Buy/Sell or even higher res 150 levels
- Free Ultra SLI: 100 levels, packed to the limit, 2x SLI modes for Buy/Sell or even higher res 300 levels
- Free History: auto highest/lowest, historic poc/va levels for each session
Features:
- High-Res Volume Profile with up to 100 levels (line implementation)
- 2x SLI modes for even higher res: 300 levels with 3x vertical SLI, 100 buy/sell levels with 2x horiz SLI
- Calculate Volume Profile on full history
- POC, Developing POC Levels
- Buy/Sell/Total volume modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels, Transparency for buy/sell levels
WARNING:
- Compilation Time: 1 min 20 sec
Usage:
- specify max_level/min_level/spacing (required)
- select range (start_bar, range length), confirm with range highlighting
- select volume type: Buy/Sell/Total
- select mode Value Area/VWAP to show corresponding levels
- flip/select anchor point to position the buy/sell levels
- use Horiz Buy/Sell SLI mode with 100 or Vertical SLI with 300 levels if needed
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
SLI:
use SLI modes to extend the functionality of the indicator:
- Horiz Buy/Sell 2x SLI lets you view 100 Buy/Sell Levels at the same time
- Vertical Max_Vol 3x SLI lets you increase the resolution to 300 levels
- you need at least 2 instances of the indicator attached to the same chart for SLI to work
1) Enable Horiz SLI:
- attach 2 indicator instances to the chart
- make sure all instances have the same min_level/max_level/range/spacing settings
- select volume type for each instance: you can have a buy/sell or buy/total or sell/total SLI. Make sure your buy volume instance is the last attached to be displayed on top of sell/total instances without overlapping.
- set buy_sell_sli_mode to true for indicator instances with volume_type = buy/sell, for type total this is optional.
- this basically tells the script to calculate % lengths based on total volume instead of individual buy/sell volumes and use ext offset for sell levels
- Sell Offset is calculated relative to Buy Offset to stack/extend sell after buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- there are no master/slave instances in this mode, all indicators are equal, poc/va levels are not affected and can work independently, i.e. one instance can show va levels, another - vwap.
2) Enable Vertical SLI:
- attach the first instance and evaluate the full range to roughly determine where is the highest max_vol/poc level i.e. 0..20000, poc is in the bottom half (third, middle etc) or
- add more instances and split the full vertical range between them, i.e. set min_level/max_level of each corresponding instance to 0..10000, 10000..20000 etc
- make sure all instances have the same range/spacing settings
- an instance with a subrange containing the poc level of the full range is now your master instance (bottom half). All other instances are slaves, their levels will be calculated based on the max_vol/poc of the master instance instead of local values
- set show_max_vol_sli to true for the master instance. for slave instances this is optional and can be used to check if master/slave max_vol values match and slave can read the master's value. This simply plots the max_vol value
- you can also attach all instances and set show_max_vol_sli to true in all of them - the instance with the largest max_vol should become the master
Auto/Manual Ext Max_Vol Modes:
- for auto vertical max_vol SLI mode set max_vol_sli_src in all slave instances to the max_vol of the master indicator: "VolumeProfileFree_MAX_RRB: Max Volume for Vertical SLI Mode". It can be tricky with 2+ instances
- in case auto SLI mode doesn't work - assign max_vol_sli_ext in all slave instances the max_vol value of the master indicator manually and repeat on each change
- manual override max_vol_sli_ext has higher priority than auto max_vol_sli_src when both values are assigned, when they are 0 and close respectively - SLI is disabled
- master/slave max_vol values must match on each bar at all times to maintain proper level scale, otherwise slave's levels will look larger than they should relative to the master's levels.
- Max_vol (red) is the last param in the long list of indicator outputs
- the only true max_vol/poc in this SLI mode is the master's max_vol/poc. All poc/va levels in slaves will be irrelevant and are disabled automatically. Slaves can only show VWAP levels.
- VA Levels of the master instance in this SLI mode are calculated based on the subrange, not the whole range and may be inaccurate. Cross check with the full range.
WARNING!
- auto mode max_vol_sli_src is experimental and may not work as expected
- you can only assign auto mode max_vol_sli_src = max_vol once due to some bug with unhandled exception/buffer overflow in Tradingview. Seems that you can clear the value only by removing the indicator instance
- sometimes you may see a "study in error state" error when attempting to set it back to close. Remove indicator/Reload chart and start from scratch
- volume profile may not finish to redraw and freeze in an ugly shape after an UI parameter change when max_vol_sli_src is assigned a max_vol value. Assign it to close - VP should redraw properly, but it may not clear the assigned max_vol value
- you can't seem to be able to assign a proper auto max_vol value to the 3rd slave instance
- 2x Vertical SLI works and tested in both auto/manual, 3x SLI - only manual seems to work (you can have a mixed mode: 2nd instance - auto, 3rd - manual)
Notes:
- This code uses Pinescript v3 compatibility framework
- This code is 20x-30x faster (main for cycle is removed) especially on lower tfs with long history - only 4-5 sec load/redraw time vs 30-60 sec of the old Pro versions
- Instead of repeatedly calculating the total sum of volumes for the whole range on each bar, vol sums are now increased on each bar and passed to the next in the range making it a per range vs per bar calculation that reduces time dramatically
- 100 levels consist of 50 main plot levels and 50 line objects used as alternate levels, differences are:
- line objects are always shown on top of other objects, such as plot levels, zero line and side cover, it's not possible to cover/move them below.
- all line objects have variable lengths, use actual x,y coords and don't need side cover, while all plot levels have a fixed length of 100 bars, use offset and require cover.
- all key properties of line objects, such as x,y coords, color can be modified, objects can be moved/deleted, while this is not possible for static plot levels.
- large width values cause line objects to expand only up/down from center while their length remains the same and stays within the level's start/end points similar to an area style.
- large width values make plot levels expand in all directions (both h/v), beyond level start/end points, sometimes overlapping zero line, making them an inaccurate % length representation, as opposed to line objects/plot levels with area style.
- large width values translate into different widths on screen for line objects and plot levels.
- you can't compensate for this unwanted horiz width expansion of plot levels because width uses its own units, that don't translate into bars/pixels.
- line objects are visible only when num_levels > 50, plot levels are used otherwise
- Since line objects are lines, plot levels also use style line because other style implementations will break the symmetry/spacing between levels.
- if you don't see a volume profile check range settings: min_level/max_level and spacing, set spacing to 0 (or adjust accordingly based on the symbol's precision, i.e. 0.00001)
- you can view either of Buy/Sell/Total volumes, but you can't display Buy/Sell levels at the same time using a single instance (this would 2x reduce the number of levels). Use 2 indicator instances in horiz buy/sell sli mode for that.
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed length. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Width - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors from input (only transparency) - this requires 2x plot outputs => 2x reduces the number of levels to fit the max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- You can change level transparency of line objects. Due to Pinescript limitations, only discrete values are supported.
- Inverse transp correlation creates the necessary illusion of "covered" line objects, although they are shown on top of the cover all the time
- If custom lines_transp is set the illusion will break because transp range can't be skewed easily (i.e. transp 0..100 is always mapped to 100..0 and can't be mapped to 50..0)
- transparency can applied to lines dynamically but nva top zone can't be completely removed because plot/mixed type of levels are still used when num_levels < 50 and require cover
- transparency can't be applied to plot levels dynamically from script this can be done only once from UI, and you can't change plot color for the past length bars
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input to change it
- Range selection/Anchoring is not accurate on charts with time gaps since you can only anchor from a point in the future and measure distance in time periods, not actual bars, and there's no way of knowing the number of future gaps in advance.
- Adjust Width for Log Scale mode now also works on high precision charts with small prices (i.e. 0.00001)
- in Adjust Width for Log Scale mode Level1 width extremes can be capped using max deviation (when level1 = 0, shift = 0 width becomes infinite)
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
P.S. I am your grandfather, Luke! Now, join the Dark Side in your father's steps or be destroyed! Once more the Sith will rule the Galaxy, and we shall have peace...
Hull MA and Candle crossHull MA vs price cossover . not 2 Hull MA's crossing, and also a price vs previous price crossover :
current price higher than previous = buy
current price lower than previous = sell
Price value set to OPEN to avoid repaint during candle
Volume Profile Free MAX SLI (50 Levels Value Area VWAP) by RRBVolume Profile Free MAX SLI by RagingRocketBull 2019
Version 1.0
All available Volume Profile Free MAX SLI versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: style columns implementation
ver 2.0: style histogram implementation
ver 3.0: style line implementation
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 50 horizontal bars.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are several versions: Free Pro, Free MAX SLI, Free History. This is the Free MAX SLI version. The Differences are listed below:
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX SLI: 50 levels, packed to the limit, 2x SLI modes for Buy/Sell or even higher res 150 levels
- Free History: auto highest/lowest, historic poc/va levels for each session
Features:
- High-Res Volume Profile with up to 50 levels (3 implementations)
- 20-30x faster than the old Pro versions especially on lower tfs with long history
- 2x SLI modes for even higher res: 150 levels with 3x vertical SLI, 50 buy/sell levels with 2x horiz SLI
- Calculate Volume Profile on full history
- POC, Developing POC Levels
- Buy/Sell/Total volume modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels and Transparency for buy/sell levels
Usage:
- specify max_level/min_level/spacing (required)
- select range (start_bar, range length), confirm with range highlighting
- select volume type: Buy/Sell/Total
- select mode Value Area/VWAP to show corresponding levels
- flip/select anchor point to position the buy/sell levels
- use Horiz SLI mode for 50 Buy/Sell or Vertical SLI for 150 levels if needed
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
SLI:
- use SLI modes to extend the functionality of the indicator:
- Horiz Buy/Sell 2x SLI lets you view 50 Buy/Sell Levels at the same time
- Vertical Max_Vol 3x SLI lets you increase the resolution to 150 levels
- you need at least 2 instances of the indicator attached to the same chart for SLI to work
1) Enable Horiz SLI:
- attach 2 indicator instances to the chart
- make sure all instances have the same min_level/max_level/range/spacing settings
- select volume type for each instance: you can have a buy/sell or buy/total or sell/total SLI. Make sure your buy volume instance is the last attached to be displayed on top of sell/total instances without overlapping.
- set buy_sell_sli_mode to true for indicator instances with volume_type = buy/sell, for type total this is optional.
- this basically tells the script to calculate % lengths based on total volume instead of individual buy/sell volumes and use ext offset for sell levels
- Sell Offset is calculated relative to Buy Offset to stack/extend sell after buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- there are no master/slave instances in this mode, all indicators are equal, poc/va levels are not affected and can work independently, i.e. one instance can show va levels, another - vwap.
2) Enable Vertical SLI:
- attach the first instance and evaluate the full range to roughly determine where is the highest max_vol/poc level i.e. 0..20000, poc is in the bottom half (third, middle etc) or
- add more instances and split the full vertical range between them, i.e. set min_level/max_level of each corresponding instance to 0..10000, 10000..20000 etc
- make sure all instances have the same range/spacing settings
- an instance with a subrange containing the poc level of the full range is now your master instance (bottom half). All other instances are slaves, their levels will be calculated based on the max_vol/poc of the master instance instead of local values
- set show_max_vol_sli to true for the master instance. for slave instances this is optional and can be used to check if master/slave max_vol values match and slave can read the master's value. This simply plots the max_vol value
- you can also attach all instances and set show_max_vol_sli to true in all of them - the instance with the largest max_vol should become the master
Auto/Manual Ext Max_Vol Modes:
- for auto vertical max_vol SLI mode set max_vol_sli_src in all slave instances to the max_vol of the master indicator: "VolumeProfileFree_MAX_RRB: Max Volume for Vertical SLI Mode". It can be tricky with 2+ instances
- in case auto SLI mode doesn't work - assign max_vol_sli_ext in all slave instances the max_vol value of the master indicator manually and repeat on each change
- manual override max_vol_sli_ext has higher priority than auto max_vol_sli_src when both values are assigned, when they are 0 and close respectively - SLI is disabled
- master/slave max_vol values must match on each bar at all times to maintain proper level scale, otherwise slave's levels will look larger than they should relative to the master's levels.
- Max_vol (red) is the last param in the long list of indicator outputs
- the only true max_vol/poc in this SLI mode is the master's max_vol/poc. All poc/va levels in slaves will be irrelevant and are disabled automatically. Slaves can only show VWAP levels.
- VA Levels of the master instance in this SLI mode are calculated based on the subrange, not the whole range. Cross check with the full range.
WARNING!
- auto mode max_vol_sli_src is experimental and may not work as expected
- you can only assign auto mode max_vol_sli_src = max_vol once due to some bug with unhandled exception/buffer overflow in Tradingview. Seems that you can clear the value only by removing the indicator instance
- sometimes you may see a "study in error state" error when attempting to set it back to close. Remove indicator/Reload chart and start from scratch
- volume profile may not finish to redraw and freeze in an ugly shape after an UI parameter change when max_vol_sli_src is assigned a max_vol value. Assign it to close - VP should redraw properly, but it may not clear the assigned max_vol value
- you can't seem to be able to assign a proper auto max_vol value to the 3rd slave instance
- 2x Vertical SLI works and tested in both auto/manual, 3x SLI - only manual seems to work
Notes:
- This code is 20x-30x faster (main for cycle is removed) especially on lower tfs with long history - only 2-3 sec load/redraw time vs 30-60 sec of the old Pro versions
- Instead of repeatedly calculating the total sum of volumes for the whole range on each bar, vol sums are now increased on each bar and passed to the next in the range making it a per range vs per bar calculation that reduces time dramatically
- hist_base for levels still results is ugly redraw
- if you don't see a volume profile check range settings: min_level/max_level and spacing, set spacing to 0 (or adjust accordingly based on the symbol's precision, i.e. 0.00001)
- you can view either of Buy/Sell/Total volumes, but you can't display Buy/Sell levels at the same time using a single instance (this would 2x reduce the number of levels). Use 2 indicator instances in horiz buy/sell sli mode for that.
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed length. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Width - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors from input (only plot transparency) - this requires 2x plot outputs => 2x reduces the number of levels to fit the max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input to change it
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
P.S. Gravitonium Levels Are Increasing. Unobtainium is nowhere to be found!
Links on Volume Profile and Value Area calculation and usage:
www.tradingview.com
stockcharts.com
onlinelibrary.wiley.com
Bitfinex Margin ComparisonDisplays the RSI of Longs vs Shorts from Bitfinex for most majors ( BTC , ETH, LTC, XRP, EOS, NEO).
Displays RSI of both longs and shorts to gauge the short term momentum of both while also showing the ratio of Longs vs Shorts as the background.
Premium ComparisonScript to display futures premium/discount vs basis; uses Bitmex XBTUSD 10.99% as basis vs XBTM18 and XBTU18 futures , but these are configurable.
ST_Trend_ReversalSTRONG TREND REVERSAL INDICATOR
The code is the percentage difference between the spot price of a given financial asset and its 200-day MA of that period. My standard setup is Daily, and I think it's got very good predictive power at that timeframe.
It can be read in two ways:
1. Values extremely above or below the 200-period MA present chances of buying/selling agains the prevailing trend.
2. Values closely above or below the 200-period MA are make-or-break market periods, where a medium-term trend becomes evident. Breaks above or below the MA are associated with strong chances of directional movements. But it's not fool-proof as false breaks have become commonplace nowadays.
Other way to use it is as confirmation of breakdowns: For example, an asset that loses its 200-day MA and then can't rally above it becomes exposed to steep losses afterwards.
It's also helpful to use in volatility trading: the closer the asset goes to its MA, the lower goes implied vol, and thus better opportiunities to be long volatility on those occasions where direction is hard to predict.
STRI = close/(200dMA)
Values over 100 indicate percentage premiums of spot vs its moving average.
Values below indicate percentage discounts of spot vs its moving average.
Ersoy-intersection(Kesisme)-Update-1website: www.ersoytoptas.com
Newspaper : tr.investing.com
hi , Friends
i wanna be someone who wants to help everyone
updated my script he published some time ago.
What happened?
* intersection When ever Bar Color Yellow Be
* Alarms to be more comprehensible
* Short and Long Days Choosing a Opportunities
* Source Opportunities
All Charts Usable( Example ;15,30,60 ... vs) and ALL MARKETS ( Stocks , forex , ... vs)
i strive to improve further
Easy to get
Multi-Timeframe EMA Trend Dashboard with Volume and RSI Filters═══════════════════════════════════════════════════════════
MULTI-TIMEFRAME EMA TREND DASHBOARD
═══════════════════════════════════════════════════════════
OVERVIEW
This indicator provides a comprehensive view of trend direction across multiple timeframes using the classic EMA 20/50 crossover methodology, enhanced with volume confirmation and RSI filtering. It aggregates trend information from six timeframes into a single dashboard for efficient market analysis.
The indicator is designed for educational purposes and to assist traders in identifying potential trend alignments across different time horizons.
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
MULTI-TIMEFRAME ANALYSIS
• Monitors 6 timeframes simultaneously: 1m, 5m, 15m, 1H, 4H, 1D
• Each timeframe analyzed independently using request.security()
• Non-repainting implementation with proper lookahead settings
• Calculates overall trend strength as percentage of bullish timeframes
EMA CROSSOVER SYSTEM
• Fast EMA (default: 20) and Slow EMA (default: 50)
• Bullish: Fast EMA > Slow EMA
• Bearish: Fast EMA < Slow EMA
• Neutral: Fast EMA = Slow EMA (rare condition)
• Visual EMA plots with optional fill area
VOLUME CONFIRMATION
• Optional volume filter for crossover signals
• Compares current volume against moving average (default: 20-period SMA)
• Categorizes volume as: High (>1.5x average), Normal (>average), Low (70), oversold (<30), and neutral zones
• Used in quality score calculation
• Optional display toggle
SUPPORT & RESISTANCE DETECTION
• Automatic detection using highest/lowest over lookback period (default: 50 bars)
• Plots resistance (red), support (green), and mid-level (gray)
• Step-line style for clear visualization
• Optional display toggle
QUALITY SCORING SYSTEM
• Rates trade setups from 1-5 stars
• Considers: MTF alignment, volume confirmation, RSI positioning
• 5 stars: 4+ timeframes aligned + volume confirmed + RSI 50-70
• 4 stars: 4+ timeframes aligned + volume confirmed
• 3 stars: 3+ timeframes aligned
• 2 stars: Exactly 3 timeframes aligned
• 1 star: Other conditions
VISUAL DASHBOARD
• Clean table display (position customizable)
• Color-coded trend indicators (green/red/yellow)
• Extended statistics panel (toggleable)
• Shows: Trends, Strength, Quality, RSI, Volume, Price Distance
═══════════════════════════════════════════════════════════
TECHNICAL SPECIFICATIONS
═══════════════════════════════════════════════════════════
CALCULATIONS
Trend Determination per Timeframe:
• request.security() fetches EMA values with gaps=off, lookahead=off
• Compares Fast EMA vs Slow EMA
• Returns: 1 (bullish), -1 (bearish), 0 (neutral)
Trend Strength:
• Counts number of bullish timeframes
• Formula: (bullish_count / 6) × 100
• Range: 0% (all bearish) to 100% (all bullish)
Price Distance from EMA:
• Formula: ((close - EMA) / EMA) × 100
• Positive: Price above EMA
• Negative: Price below EMA
• Warning when absolute distance > 5%
ANTI-REPAINTING MEASURES
• All request.security() calls use lookahead=barmerge.lookahead_off
• Dashboard updates only on barstate.islast
• Historical bars remain unchanged
• Crossover signals finalize on bar close
═══════════════════════════════════════════════════════════
USAGE GUIDE
═══════════════════════════════════════════════════════════
INTERPRETING THE DASHBOARD
Timeframe Rows:
• Each row shows individual timeframe trend status
• Look for alignment (multiple timeframes same direction)
• Higher timeframes generally more significant
Strength Indicator:
• >66.67%: Strong bullish (4+ timeframes bullish)
• 33.33-66.67%: Mixed/choppy conditions
• <33.33%: Strong bearish (4+ timeframes bearish)
Quality Score:
• Higher stars = better confluence of factors
• 5-star setups have strongest multi-factor confirmation
• Lower scores may indicate weaker or conflicting signals
SUGGESTED APPLICATIONS
Trend Confirmation:
• Check if multiple timeframes confirm current chart trend
• Higher agreement = stronger trend confidence
• Use for position sizing decisions
Entry Timing:
• Wait for EMA crossover on chart timeframe
• Confirm with higher timeframe alignment
• Volume above average preferred
• RSI not in extreme zones
Divergence Detection:
• When lower timeframes diverge from higher
• May indicate trend exhaustion or reversal
• Requires additional confirmation
CUSTOMIZATION
EMA Settings:
• Adjust Fast/Slow lengths for different sensitivities
• Shorter periods = more responsive, more signals
• Longer periods = smoother, fewer signals
• Common alternatives: 10/30, 12/26, 50/200
Volume Filter:
• Enable for higher-quality signals (fewer false positives)
• Disable in always-liquid markets or for more signals
• Adjust MA length based on typical volume patterns
Display Options:
• Toggle EMAs, S/R levels, extended stats as needed
• Choose dashboard position to avoid chart overlap
• Adjust colors for visibility preferences
═══════════════════════════════════════════════════════════
ALERTS
═══════════════════════════════════════════════════════════
AVAILABLE ALERT CONDITIONS
1. Bullish EMA Cross (Volume Confirmed)
2. Bearish EMA Cross (Volume Confirmed)
3. Strong Bullish Alignment (4+ timeframes)
4. Strong Bearish Alignment (4+ timeframes)
5. Trend Strength Increasing (>16.67% jump)
6. Trend Strength Decreasing (>16.67% drop)
7. Excellent Trade Setup (5-star rating)
Alert messages use standard placeholders:
• {{ticker}} - Symbol name
• {{close}} - Current close price
• {{time}} - Bar timestamp
═══════════════════════════════════════════════════════════
LIMITATIONS & CONSIDERATIONS
═══════════════════════════════════════════════════════════
KNOWN LIMITATIONS
• Lower timeframe data may not be available on all symbols
• 1-minute data typically limited to recent history
• request.security() subject to TradingView data limits
• Dashboard requires screen space (may overlap on small screens)
• More complex calculations may affect load time on slower devices
NOT SUITABLE FOR
• Highly volatile/illiquid instruments (many false signals)
• News-driven markets during announcements
• Automated trading without additional filters
• Markets where EMA strategies don't perform well
DOES NOT PROVIDE
• Exact entry/exit prices
• Stop-loss or take-profit levels
• Position sizing recommendations
• Guaranteed profit signals
• Market predictions
═══════════════════════════════════════════════════════════
BEST PRACTICES
═══════════════════════════════════════════════════════════
RECOMMENDED USAGE
✓ Combine with price action analysis
✓ Use appropriate risk management
✓ Backtest on historical data before live use
✓ Adjust settings for specific market characteristics
✓ Wait for higher-quality setups in important trades
✓ Consider overall market context and fundamentals
NOT RECOMMENDED
✗ Using as standalone trading system without confirmation
✗ Trading every signal without discretion
✗ Ignoring risk management principles
✗ Trading without understanding the methodology
✗ Applying to unsuitable markets/timeframes
═══════════════════════════════════════════════════════════
EDUCATIONAL BACKGROUND
═══════════════════════════════════════════════════════════
EMA CROSSOVER STRATEGY
The Exponential Moving Average crossover is a classical trend-following technique:
• Golden Cross: Fast EMA crosses above Slow EMA (bullish signal)
• Death Cross: Fast EMA crosses below Slow EMA (bearish signal)
• Widely used since the 1970s in various markets
• More responsive than SMA due to exponential weighting
MULTI-TIMEFRAME ANALYSIS
Analyzing multiple timeframes helps traders:
• Identify alignment between short and long-term trends
• Reduce false signals from single-timeframe noise
• Understand market context across different horizons
• Make informed decisions about trade duration
VOLUME ANALYSIS
Volume confirmation adds reliability:
• High volume suggests institutional participation
• Low volume signals may indicate false breakouts
• Volume precedes price in many market theories
• Helps distinguish genuine moves from noise
═══════════════════════════════════════════════════════════
TECHNICAL IMPLEMENTATION
═══════════════════════════════════════════════════════════
CODE STRUCTURE
• Organized in clear sections with proper commenting
• Uses explicit type declarations (int, float, bool, color, string)
• Constants defined at top (BULLISH=1, BEARISH=-1, etc.)
• Functions documented with @function, @param, @returns
• Follows PineCoders naming conventions (camelCase variables)
PERFORMANCE OPTIMIZATION
• var keyword for table (created once, not every bar)
• Calculations cached where possible
• Dashboard updates only on last bar
• Minimal redundant security() calls
SECURITY IMPLEMENTATION
• Proper gaps and lookahead parameters
• No future data leakage
• Signals finalize on bar close
• Historical bars remain static
═══════════════════════════════════════════════════════════
VERSION INFORMATION
═══════════════════════════════════════════════════════════
Current Version: 2.0
Pine Script Version: 5
Last Updated: 2024
Developed by: Zakaria Safri
═══════════════════════════════════════════════════════════
SETTINGS REFERENCE
═══════════════════════════════════════════════════════════
EMA SETTINGS
• Fast EMA Length: 1-500 (default: 20)
• Slow EMA Length: 1-500 (default: 50)
VOLUME & MOMENTUM
• Use Volume Confirmation: true/false (default: true)
• Volume MA Length: 1-500 (default: 20)
• Show RSI Levels: true/false (default: true)
• RSI Length: 1-500 (default: 14)
PRICE ACTION FEATURES
• Show Price Distance: true/false (default: true)
• Show Key Levels: true/false (default: true)
• S/R Lookback Period: 10-500 (default: 50)
DISPLAY SETTINGS
• Show EMAs on Chart: true/false (default: true)
• Fast EMA Color: customizable (default: cyan)
• Slow EMA Color: customizable (default: orange)
• EMA Line Width: 1-5 (default: 2)
• Show Fill Between EMAs: true/false (default: true)
• Show Crossover Signals: true/false (default: true)
DASHBOARD SETTINGS
• Position: Top Left/Right, Bottom Left/Right
• Show Extended Statistics: true/false (default: true)
ALERT SETTINGS
• Alert on Multi-TF Alignment: true/false (default: true)
• Alert on Trend Strength Change: true/false (default: true)
═══════════════════════════════════════════════════════════
RISK DISCLAIMER
═══════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes only. It should not be considered financial advice or a recommendation to buy or sell any security.
IMPORTANT NOTICES:
• Past performance does not indicate future results
• All trading involves risk of capital loss
• No indicator guarantees profitable trades
• Always conduct independent research and analysis
• Use proper risk management and position sizing
• Consult a qualified financial advisor before trading
• The developer assumes no liability for trading losses
By using this indicator, you acknowledge that you understand these risks and accept full responsibility for your trading decisions.
═══════════════════════════════════════════════════════════
SUPPORT & CONTRIBUTIONS
═══════════════════════════════════════════════════════════
FEEDBACK WELCOME
• Constructive comments appreciated
• Bug reports help improve the indicator
• Feature suggestions considered for future versions
• Share your experience to help other users
OPEN SOURCE
This code is published as open source for the TradingView community to:
• Learn from the implementation
• Modify for personal use
• Understand multi-timeframe analysis techniques
If you find this indicator useful, please consider:
• Leaving a thoughtful review
• Sharing with other traders who might benefit
• Following for future updates and releases
═══════════════════════════════════════════════════════════
ADDITIONAL RESOURCES
═══════════════════════════════════════════════════════════
RECOMMENDED READING
• TradingView Pine Script documentation
• PineCoders community resources
• Technical analysis textbooks on moving averages
• Multi-timeframe trading strategy guides
• Risk management principles
RELATED CONCEPTS
• Trend following strategies
• Moving average convergence/divergence
• Multiple timeframe analysis
• Volume-price relationships
• Momentum indicators
═══════════════════════════════════════════════════════════
Thank you for using this indicator. Trade responsibly and continue learning!
═══════════════════════════════════════════════════════════
Alerts v6The strategy includes:
✅ EMA-based trend direction (fast vs slow)
✅ RSI filtering for overbought/oversold control
✅ ADX confirmation for strong trend validation
✅ Pullback & BOS detection for precision entries
✅ Per-bar change logic for adaptive entry timing
✅ Session/day gating to control trading hours
✅ JSON alert integration for AI trading bots or webhooks
This script is Pine Script v6 compatible and optimized for automated alert-based trading setups such as AI trading bots, webhook systems, and VPS-linked executions.
Recommended Timeframes: 5m, 15m, 30m
Markets: XAUUSD, FX pairs, indices, and metals
IIR One-Pole Price Filter [BackQuant]IIR One-Pole Price Filter
A lightweight, mathematically grounded smoothing filter derived from signal processing theory, designed to denoise price data while maintaining minimal lag. It provides a refined alternative to the classic Exponential Moving Average (EMA) by directly controlling the filter’s responsiveness through three interchangeable alpha modes: EMA-Length , Half-Life , and Cutoff-Period .
Concept overview
An IIR (Infinite Impulse Response) filter is a type of recursive filter that blends current and past input values to produce a smooth, continuous output. The "one-pole" version is its simplest form, consisting of a single recursive feedback loop that exponentially decays older price information. This makes it both memory-efficient and responsive , ideal for traders seeking a precise balance between noise reduction and reaction speed.
Unlike standard moving averages, the IIR filter can be tuned in physically meaningful terms (such as half-life or cutoff frequency) rather than just arbitrary periods. This allows the trader to think about responsiveness in the same way an engineer or physicist would interpret signal smoothing.
Why use it
Filters out market noise without introducing heavy lag like higher-order smoothers.
Adapts to various trading speeds and time horizons by changing how alpha (responsiveness) is parameterized.
Provides consistent and mathematically interpretable control of smoothing, suitable for both discretionary and algorithmic systems.
Can serve as the core component in adaptive strategies, volatility normalization, or trend extraction pipelines.
Alpha Modes Explained
EMA-Length : Classic exponential decay with alpha = 2 / (L + 1). Equivalent to a standard EMA but exposed directly for fine control.
Half-Life : Defines the number of bars it takes for the influence of a price input to decay by half. More intuitive for time-domain analysis.
Cutoff-Period : Inspired by analog filter theory, defines the cutoff frequency (in bars) beyond which price oscillations are heavily attenuated. Lower periods = faster response.
Formula in plain terms
Each bar updates as:
yₜ = yₜ₋₁ + alpha × (priceₜ − yₜ₋₁)
Where alpha is the smoothing coefficient derived from your chosen mode.
Smaller alpha → smoother but slower response.
Larger alpha → faster but noisier response.
Practical application
Trend detection : When the filter line rises, momentum is positive; when it falls, momentum is negative.
Signal timing : Use the crossover of the filter vs its previous value (or price) as an entry/exit condition.
Noise suppression : Apply on volatile assets or lower timeframes to remove flicker from raw price data.
Foundation for advanced filters : The one-pole IIR serves as a building block for multi-pole cascades, adaptive smoothers, and spectral filters.
Customization options
Alpha Scale : Multiplies the final alpha to fine-tune aggressiveness without changing the mode’s core math.
Color Painting : Candles can be painted green/red by trend direction for visual clarity.
Line Width & Transparency : Adjust the visual intensity to integrate cleanly with your charting style.
Interpretation tips
A smooth yet reactive line implies optimal tuning — minimal delay with reduced false flips.
A sluggish line suggests alpha is too small (increase responsiveness).
A noisy, twitchy line means alpha is too large (increase smoothing).
Half-life tuning often feels more natural for aligning filter speed with price cycles or bar duration.
Summary
The IIR One-Pole Price Filter is a signal smoother that merges simplicity with mathematical rigor. Whether you’re filtering for entry signals, generating trend overlays, or constructing larger multi-stage systems, this filter delivers stability, clarity, and precision control over noise versus lag, an essential tool for any quantitative or systematic trading approach.
Arnaud Legoux Gaussian Flow | AlphaNattArnaud Legoux Gaussian Flow | AlphaNatt
A sophisticated trend-following and mean-reversion indicator that combines the power of the Arnaud Legoux Moving Average (ALMA) with advanced Gaussian distribution analysis to identify high-probability trading opportunities.
🎯 What Makes This Indicator Unique?
This indicator goes beyond traditional moving averages by incorporating Gaussian mathematics at multiple levels:
ALMA uses Gaussian distribution for superior price smoothing with minimal lag
Dynamic envelopes based on Gaussian probability zones
Multi-layer gradient visualization showing probability density
Adaptive envelope modes that respond to market conditions
📊 Core Components
1. Arnaud Legoux Moving Average (ALMA)
The ALMA is a highly responsive moving average that uses Gaussian distribution to weight price data. Unlike simple moving averages, ALMA can be fine-tuned to balance responsiveness and smoothness through three key parameters:
ALMA Period: Controls the lookback window (default: 21)
Gaussian Offset: Shifts the Gaussian curve to adjust lag vs. responsiveness (default: 0.85)
Gaussian Sigma: Controls the width of the Gaussian distribution (default: 6.0)
2. Gaussian Envelope System
The indicator features three envelope calculation modes:
Fixed Mode: Uses ATR-based fixed width for consistent envelope sizing
Adaptive Mode: Dynamically adjusts based on price acceleration and volatility
Hybrid Mode: Combines ATR and standard deviation for balanced adaptation
The envelopes represent statistical probability zones. Price moving beyond these zones suggests potential mean reversion opportunities.
3. Momentum-Adjusted Envelopes
The envelope width automatically expands during strong trends and contracts during consolidation, providing context-aware support and resistance levels.
⚡ Key Features
Multi-Layer Gradient Visualization
The indicator displays 10 gradient layers between the ALMA and envelope boundaries, creating a visual "heat map" of probability density. This helps traders quickly assess:
Distance from the mean
Potential support/resistance strength
Overbought/oversold conditions in context
Dynamic Color Coding
Cyan gradient: Price below ALMA (bullish zone)
Magenta gradient: Price above ALMA (bearish zone)
The ALMA line itself changes color based on price position
Trend Regime Detection
The indicator automatically identifies market regimes:
Strong Uptrend: Trend strength > 0.5% with price above ALMA
Strong Downtrend: Trend strength < -0.5% with price below ALMA
Weak trends and ranging conditions
📈 Trading Strategies
Mean Reversion Strategy
Look for price entering the extreme Gaussian zones (beyond 95% of envelope width) when trend strength is moderate. These represent statistical extremes where mean reversion is probable.
Signals:
Long: Price in lower Gaussian zone with trend strength > -0.5%
Short: Price in upper Gaussian zone with trend strength < 0.5%
Trend Continuation Strategy
Enter when price crosses the ALMA during confirmed strong trend conditions, riding momentum while using the envelope as a trailing stop reference.
Signals:
Long: Price crosses above ALMA during strong uptrend
Short: Price crosses below ALMA during strong downtrend
🎨 Visualization Guide
The gradient layers create a "probability cloud" around the ALMA:
Darker shades (near ALMA): High probability zone - price tends to stay here
Lighter shades (near envelope edges): Lower probability - potential reversal zones
Price at envelope extremes: Statistical outliers - strongest mean reversion setups
⚙️ Customization Options
ALMA Parameters
Adjust period for different timeframes (lower for day trading, higher for swing trading)
Modify offset to tune responsiveness vs. smoothness
Change sigma to control distribution width
Envelope Configuration
Choose envelope mode based on market characteristics
Adjust multiplier to match instrument volatility
Modify gradient depth for visual preference (5-15 layers)
Signal Enhancement
Momentum Length: Lookback for trend strength calculation
Signal Smoothing: Additional EMA smoothing to reduce noise
🔔 Built-in Alerts
The indicator includes six pre-configured alert conditions:
ALMA Trend Long - Price crosses above ALMA in strong uptrend
ALMA Trend Short - Price crosses below ALMA in strong downtrend
Mean Reversion Long - Price enters lower Gaussian zone
Mean Reversion Short - Price enters upper Gaussian zone
Strong Uptrend Detected - Momentum confirms strong bullish regime
Strong Downtrend Detected - Momentum confirms strong bearish regime
💡 Best Practices
Use on clean, liquid markets with consistent volatility
Combine with volume analysis for confirmation
Adjust envelope multiplier based on backtesting for your specific instrument
Higher timeframes (4H+) generally provide more reliable signals
Use adaptive mode for trending markets, hybrid for mixed conditions
⚠️ Important Notes
This indicator works best in markets with normal price distribution
Extreme news events can invalidate Gaussian assumptions temporarily
Always use proper risk management - no indicator is perfect
Backtest parameters on your specific instrument and timeframe
🔬 Technical Background
The Arnaud Legoux Moving Average was developed to solve the classic dilemma of moving averages: the trade-off between lag and noise. By applying Gaussian distribution weighting, ALMA achieves superior smoothing while maintaining responsiveness to price changes.
The envelope system extends this concept by creating probability zones based on volatility and momentum, effectively mapping where price is "likely" vs "unlikely" to be found based on statistical principles.
Created by AlphaNatt - For educational purposes. Always practice proper risk management. Not financial advice. Always DYOR.
Advanced HMM - 3 States CompleteHidden Markov Model
Aconsistent challenge for quantitative traders is the frequent behaviour modification of financial
markets, often abruptly, due to changing periods of government policy, regulatory environment
and other macroeconomic effects. Such periods are known as market regimes. Detecting such
changes is a common, albeit difficult, process undertaken by quantitative market participants.
These various regimes lead to adjustments of asset returns via shifts in their means, variances,
autocorrelation and covariances. This impacts the effectiveness of time series methods that rely
on stationarity. In particular it can lead to dynamically-varying correlation, excess kurtosis ("fat
tails"), heteroskedasticity (volatility clustering) and skewed returns.
There is a clear need to effectively detect these regimes. This aids optimal deployment of
quantitative trading strategies and tuning the parameters within them. The modeling task then
becomes an attempt to identify when a new regime has occurred adjusting strategy deployment,
risk management and position sizing criteria accordingly.
A principal method for carrying out regime detection is to use a statistical time series tech
nique known as a Hidden Markov Model . These models are well-suited to the task since they
involve inference on "hidden" generative processes via "noisy" indirect observations correlated
to these processes. In this instance the hidden, or latent, process is the underlying regime state,
while the asset returns are the indirect noisy observations that are influenced by these states.
MAIN FEATURES OF THE INDICATOR
The "Advanced HMM - 3 States Complete" indicator is an advanced technical analysis tool that uses Hidden Markov Model (HMM) to identify three main market regimes: BULL, BEAR, and SIDEWAYS.
🎯 KEY FEATURES:
1. HMM-based Trend Detection
3 market states: Bull (0), Bear (1), Sideways (2)
Dynamic probabilities: Calculates probability for each state based on price data
Transition matrix: Models state transitions between regimes
2. Analytical Features
Price volatility: Log returns and standard deviation
Momentum: Rate of Change (ROC)
Volume: Volume ratio vs moving average
Data normalization: Standardizes features to common scale
3. Visual Trading Signals
text
📍 BUY Signals:
- Green upward triangle below bars
- "LONG" label in green
📍 SELL Signals:
- Red downward triangle above bars
- "SHORT" label in red
📍 EXIT Signals:
- Orange X marks when transitioning to sideways
4. Information Display
Probability table (top-right): Shows percentage for each state
State label: Current regime with probability percentages
Chart background color: Reflects dominant market state
5. Automated Alerts
Alerts when new Bull/Bear market detected
Alerts when market transitions to sideways
Configurable TradingView notifications
6. Customizable Parameters
pinescript
length: 100 // Lookback period
smoothing_period: 20 // Probability smoothing
volatility_threshold: 0.5 // Volatility threshold
💡 PRACTICAL APPLICATIONS:
Identify primary trends with quantified probabilities
Entry/exit signals based on state transitions
Risk management during sideways markets
Trend confirmation when combined with other indicators
This indicator is particularly useful for market regime analysis and identifying trend transition points using advanced statistical probability methods.
🔧 TECHNICAL IMPLEMENTATION:
Composite observation: Weighted combination of returns (40%), momentum (30%), and volatility (30%)
Gaussian emission probabilities: Different distributions for each state
Manual HMM updates: Avoids matrix computation limitations in Pine Script
Real-time smoothing: EMA applied to state probabilities
The indicator provides institutional-grade regime detection in a visually intuitive package suitable for both discretionary and systematic traders.
Market Trend and Squeeze Indicator MTF - Optimized v31. Overview
This indicator is designed to identify market trends and consolidation phases using a combination of:
ADX (Average Directional Index) → Measures trend strength.
Keltner Channels (KC) → Helps identify trend channels.
Bollinger Bands (BB) → Measures volatility and price squeeze.
Squeeze Momentum → Determines when the market is “coiling” for a breakout.
Multi-Timeframe Analysis (MTF) → Shows these signals across different timeframes in one table.
Essentially, it tells you whether the market is trending up, trending down, consolidating, or neutral, while also giving a squeeze strength index.
2. Key Components
A. ADX (Trend Strength)
Trending Up / Down: ADX above the trending threshold (default 25).
Consolidating: ADX below the consolidation threshold (default 20).
This helps filter strong trends from weak or sideways markets.
B. Keltner Channels & Bollinger Bands (Squeeze Detection)
Keltner Channels (KC): Shows the average price range using ATR (volatility).
Bollinger Bands (BB): Shows volatility using standard deviation.
Squeeze condition: When BB is inside KC, the market is in a low-volatility consolidation phase, often leading to a breakout.
C. Squeeze Momentum
Measures whether the market is building upward or downward momentum during a squeeze.
Green/blueish colors indicate a strong potential upward breakout, while reddish/pinkish colors indicate potential downward breakout.
D. Multi-Timeframe Table
Shows trend and squeeze status across multiple timeframes (1M, 3M, 5M, 15M, 30M, 1H by default).
Helps traders see both short-term and longer-term trends at a glance.
E. Squeeze Gauge
Displays a 10-point squeeze index for the current timeframe:
Higher value = stronger squeeze.
Colored gradient shows the squeeze strength visually.
3. How to Read the Indicator
A. Trend & Squeeze Table
Each row represents a timeframe.
Cell colors:
Green → Trending Up
Red → Trending Down
Blue/Purple Gradient → Consolidating (squeeze)
Gray → Neutral
Numbers in cells:
Trending → Trend strength (1–10)
Consolidating → Squeeze index (1–10)
This lets you quickly see:
Which timeframes are trending
Which are in consolidation
The relative strength of trends or squeeze
B. Chart Plots
Keltner Channels (green/red lines) → Trend envelopes
Bollinger Bands (purple) → Volatility envelopes
White dots → Market is currently in a squeeze
ADX reference lines → Trend vs consolidation thresholds
C. Alerts
Alerts are triggered when:
Market starts trending (up or down)
Market starts consolidating
4. How Traders Can Use It
Trend Following
Enter trades in the direction of the trend:
Green table → buy / long
Red table → sell / short
Use trend strength numbers to confirm trend strength.
Breakout Strategy
When the squeeze (blue/purple) appears:
Watch for a breakout above/below KC or BB
Use momentum to anticipate direction (green = up, red = down)
Multi-Timeframe Confirmation
Only take trades when multiple timeframes align:
Example: 15M, 30M, and 1H all trending up → stronger buy signal
Mixed signals → avoid trading (market may be choppy)
Risk Management
Use KC or BB levels for stop-loss and target placement
ADX thresholds help avoid entering weak trends
5. Settings Traders Can Adjust
Setting Default Use
ADX Length 14 How sensitive trend detection is
ADX Trend Threshold 25 Minimum ADX for trend recognition
ADX Consolidation Threshold 20 Maximum ADX for considering consolidation
KC Length / Multiplier 20 / 1.5 Adjust channel sensitivity
BB Length / Multiplier 20 / 2 Adjust volatility detection
Squeeze Length 20 Number of bars for squeeze calculation
Table / Gauge Position Top Right / Bottom Right Place tables anywhere on chart
6. Summary
Green → Strong upward trend
Red → Strong downward trend
Blue/Purple → Consolidation / Squeeze
Gray → Neutral / weak movement
Squeeze Index → Measures how compressed price action is (1–10)
Multi-timeframe table → Quickly see trends and squeezes across all timeframes
This indicator is perfect for trend-followers and breakout traders who want visual clarity across multiple timeframes in one glance.
Match on Selectable Percentage Change + RangeIndicator Overview:
Match on Selectable Percentage Change + Range is a powerful analytical tool designed for traders and analysts who want to identify historical price bars that match a specific percentage variation, and then evaluate how price evolved in the following days. It combines precision filtering with visual tabular feedback, making it ideal for pattern recognition, backtesting, and scenario analysis.
What It Does
This indicator scans historical bars to find instances where the percentage change between two consecutive closes matches a user-defined target (± a customizable tolerance). Once matches are found, it displays:
The date of each match (most recent first)
The actual variation searched
The percentage change after 2, 10, 20, and 30 bars
The min-max range (in %) over those same periods
All results are shown in a dynamic table directly on the chart.
Inputs & Controls
Input Description
Which variation do you want to analyze? (%)
Set the target percentage change to look for (e.g. 2.5%)
% deviation from the variation to be considered (%) Define the tolerance range around the target (e.g. ±0.5%)
Bars to analyze (max 9999) Set how many past bars to scan
Show match table Toggle to enable/disable the entire table
Show percentage variations (2d, 10d, 20d, 30d) Toggle to show/hide post-match percentage changes
Show min-max ranges (2d, 10d, 20d, 30d) Toggle to show/hide post-match high/low ranges
Table Structure
Each row in the table represents a historical match. Columns include:
Date: When the match occurred
Variation in: The actual % change that triggered the match
2d / 10d / 20d / 30d: % change after those days
Min-Max 2d / 10d / 20d / 30d: Range of price movement after those days
Color coding helps quickly identify bullish (green) vs bearish (red) outcomes.
Use Cases
Backtesting: See how similar past moves evolved over time
Scenario modeling: Estimate potential outcomes after a known variation
Pattern recognition: Spot recurring setups or volatility clusters
Risk analysis: Understand post-variation drawdowns and upside potential
Tips for Use
Use tighter deviation (e.g. 0.3%) for precision, or wider (e.g. 1%) for broader pattern capture.
Combine with other indicators to validate setups (e.g. volume, RSI, trend filters).
Toggle off variation or range columns to focus only on the metrics you need.