Rate Of Change [Hyperbolic]Rate Of Change just got fixed!
Do note that you have to activate the "exotic calculations" inside the ROC-H settings.
A hyperbolic curve now transforms price. No more infinities on your indicators!
You may use the "exotic" function, that is embedded in my script in your own scripts.
This formula basically transforms the input (which may be zero or negative) into a strictly positive one.
While the mathematicians out there would opt for alternative formulae (like the exponential for negative numbers), I used the hyperbolic curve for continuity purposes. Feel free to build upon my calculations, and make them even better!
Tread lightly, for this is hallowed ground.
-Father Grigori
P.S. I cannot lock the source code. Science and knowledge belongs to humanity. Knowledge must not be up for sale.
Zmienność
OBV-MACDThe OBV-MACD indicator is a momentum-based technical analysis tool that helps traders identify trend reversals and trend strength. This Pine script is an implementation of the OBV-MACD indicator that uses the On-Balance Volume (OBV) and Moving Average Convergence Divergence (MACD) indicators to provide a momentum data of OBV.
The OBV-MACD indicator uses the OBV to calculate the cumulative volume, which is then smoothed using two moving averages - fast and slow. The difference between these moving averages is plotted as a histogram, with a signal line plotted over it. A buy signal is generated when the histogram crosses above the signal line, indicating a bullish trend, while a sell signal is generated when the histogram crosses below the signal line, indicating a bearish trend.
This Pine script also includes an OBV-MACD-Donchian version that incorporates Donchian channels for the OBV-MACD. The Donchian channel is a technical analysis indicator that helps traders identify the highs and lows of an asset's price over a certain period. The OBV-MACD-Donchian version uses the OBV-MACD indicator along with the Donchian channels to provide signals that the momentum of OBV is making new high/low during that period of time.
Traders can customize the input parameters of the OBV-MACD indicator, such as the timeframe, method of calculation for the moving averages, and the lengths of the moving averages and breakout lengths. The colors of the plot can also be customized to suit the trader's preferences.
Percent Change of Day [ilovealgotrading]
OVERVIEW:
This indicator aims to effectively show us the percentage change of the price within the time frame we have chosen.
What is the purpose of this indicator?
This indicator shows how the price changes for each bar at different time frames we have chosen. By examining the percentage change in different time periods, we can easily look at the change in the face of the market during the time interval. Also if the price is above or below the value of 0 during the specified time, the color of our percentage line changes.
IMPLEMENTATION DETAILS:
First of all, let's understand How to Calculate Percent Change?
The difference between the old and new value of a quantity given in percentages is known as a percent change. It's rather simple to calculate the % difference between two given quantities.
The formula is given by;
Example
The price of a kilo of rice went from 10$ to12.5$, what is the percentage change?
Explanation
• The old value of sugar = $ 10
• New value = $12.5
• Now apply the percent change formula;
• Percentage change = ×100%
= x 100%
= (2.5/10) x 100%
= 25%
In this case, the percent change is positive and therefore, it is an increase.
How Is Percentage Change Used in Finance?
In the world of finance, percentage change is frequently used to analyze changes in the value of stocks or major market indexes over time.
Percentage change is used for many purposes in finance, most notably to track the price change of stocks market and crypto market.
What can we change from the settings panel ?
We can set time frame setting of the percentage change from place number 1
We are able to adjust the changing color if the percentage change is above or below zero from place 2 and 3
ALSO:
Please do not open trades without properly managing your risk and psychology!!!
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .
Know Sure Thing + RibbonFrom now on this will be the main indicator I will be using.
The mathematical foundation of KST is elegant and trustworthy. I took the time to share this beautiful (in my opinion) indicator, because you will probably be seeing it in my future ideas.
I am not a trader, this indicator was made to analyze mainly long-term charts, and trend-continuation/change analysis.
The purpose of this indicator is not to give entry/exit points. However, the 9-period EMA (tightest EMA) can serve as an alternative to the classic "9-period MA signal line".
Tread lightly, for this is hallowed ground.
-Father Grigori
GamCP Multi-timeframe v0.1Measures compression on different timeframes, on demand. A high compression precedes high volatilty.
v0.1 - by mufaxor
JZ_Chaikin HTF Volatility BreakoutFirst off, all credit to Harry Potter as this is a minor customization of his indicator.
Basic additions:
-- Added a Higher Timeframe that is set to Daily but can be changed. Timeframe does wait until barstate.isconfirmed so won't repaint.
-- Added HMA smoothing line to both Chart and HTF. Can be used as it's own signal, as confirmation or in combination with faster signal line -- Breakout signal & Range Highlight use both.
-- Added optional coloring of HMA based on whether increasing or decreasing.
-- Added a low volatility option that highlights Range/No Trade zones. Defval is off so needs to be selected from inputs.
Breakout Signals are very simple and both take the HTF signal and HMA. When the faster Volatility line rises from below zero and comes within the range of -10 to 0, AND the HMA signals is increasing (and also below zero) for confirmation, generates a breakout signal of an incoming big move. You can alter the breakout threshold to be greater or less than -10, I just found that works best for filtering out the noise and false signals. Won't catch everything, but pretty reliable when it does.
Tested mostly on BTC so can't vouch for other assets and would likely need modification.
I've JUST taught myself coding from scratch (and to say I'm an amateur is an understatement), so apologies in advance if anything is unclear or could be coded better. Open to any suggestions.
RSI with Keltner Channel (+EMA Ribbon)Note that the EMA Ribbon is not embedded into the custom RSI with KC. In the future I plan to embed it. The EMA Ribbon I use is the following:
This is my very first attempt at modifying an indicator. I basically attempted to add a Keltner Channel around RSI.
This was used as an alternative channel to the standard Bollinger Band. KC goes hand-in-hand with the EMA Ribbon. KC also helps to better pinpoint relative-overbought/oversold conditions.
In my belief, the 20-80 levels don't behave as overbought/oversold levels. An exponential chart would always be overbought. So a Keltner Channel could in theory (and in practice) give us greater understanding on chart analysis.
This custom indicator is a bodge . It has lots of extra calculations that can be removed. I post this rough indicator for the community to give feedback on how I can improve it, or perhaps give an idea to some of you. Please don't judge me, I wouldn't post it but lately some have asked me about it.
In the future I would like to embed an EMA ribbon in this RSI indicator, just like I did in the following idea.
During this period, I don't really have the time to fix this indicator to my standards. So I will leave it as is for the foreseeable future.
If you have the will and knowledge however, feel free to built upon this indicator and share it!
Tread lightly, for this is hallowed ground.
-Father Grigori
PS. In this indicator, I would replace all the moving averages with an EMA Ribbon "average".
Volatility Spike EstimatorPlots the Average True Range (ATR), its historical mean, the upper threshold for a volatility spike, and uses background color to show the likelihood of a volatility spike based on the current ATR value.
Green background indicates an increased likelihood of a volatility spike, while red background means a spike might have already occurred or be in progress.
Update: In this version, we added a short-term ATR calculation with an adjustable input parameter, shortTermATRLength. The likelihood of a volatility spike is now estimated based on the short-term ATR instead of the original ATR. This change makes the indicator more sensitive to recent market conditions and can help detect potential volatility spikes more quickly.
Mora's Compression IndicatorIntroducing Mora's Price Compression indicator.
One of the biggest challenges in trading strategies is to differentiate between zones in which price is consolidated (so called squeezed) and zones of price expansion. Zones of consolidation can indicate traders' indecision or the creation of order blocks, but regardless of their mechanism, most indicators behave differently in those areas as oppose to times when price is trending.
A traditional indicator of consolidation zones is the so call Squeeze, which combines Bollinger Bands and Keltner’s Channels.. although broadly used, its interpretation is not quite straightforward.
Here a new indicator is introduced to identify areas of consolidation or expansion based on current and historical volatility.
Ultimately we know the price is consolidated (current volatility) when it starts raging within a narrower band that we are use to see (Historical volatility), so the ratio of the current to historical volatility becomes a straightforward identification of consolidation zones and that is what this indicator provides.
The indicator is scaled such that values near zero mean price is compressed and values near 100 price is over-extended. The indicators is designed to allow different time-frames, while avoiding repainting.
Turtle Trading Risk Adjusted Position Size CalculatorTurtle Trading Risk Adjusted Position Size Calculator
Hello Traders !
Turtle Trading Risk Adjustment Calculator (inspired by the Turtle Traders Position sizing methods) aims to objectively help day traders allocate the appropriate position size per trade by scaling different instruments by their risk, as measured by their volatility via the ATR (default - Average of 14 period True Range). By doing so This volatility-based position sizing method normalizes risk across different asset classes.
Understanding The formula
Formula U normalizes positions sizes among any non FX asset, by representing a standard unit of risk as a fraction of volatility adjusted by a risk coefficient (note higher risk coeff values (high uncertainty) will lead to lower trade capital allocation i.e lower position size - Varying the risk coefficient is relevant in expressing uncertainty) and scaled to ones trading account size relative to 1 contract of the asset to be traded, This is referred to as the Dollar volatility, formula D.
Dollar volatility is a bit confusing but in essence it is simply a factor of the asset price such that quantity sums to ones Trading account balance or how many times larger ones trading account is than the assets current market price, or more formally The amount of value a $1 change in the contract would impact your trading account given you are current trading all you account equity.
Formula TVPP is my own adaptation of the Turtle Trading Position Sizing formulas and the standard value per pip formula adjusted for volatility, this iteration has the same logic as stated above although the formulas vary.
Hope this is Useful, Wishing you Luck in your Trading Journey - u got this !!
Binance Auto Spot-Futures Premium/Discount -CheThis Script is based in the 2020 @Plumptoiletduck script
Special thanks to @tartigradia for the Auto Detect code for the Binance pair.
It tells us the difference in price between Spot and Perpetual Futures.
Now I incorporated the function that automatically detects the pair we are in to show the premium/discount of that pair.
You never need to select the currency you are in the script anymore!
It is specially designed for Binance coins, it includes all perpetuals.
How to use it?
Usually if the Futures are higher than the Spot it indicates that we are in an over exposure zone of longs in futures.
If the spot is cheaper than the futures it means that the futures are more fearful.
You can use this script with an Open Interest script to get an idea of what is going on.
Other examples:
ATR-Stepped, Another New Adaptive Moving Average [Loxx]ATR-Filtered, Another New Adaptive Moving Average is a modification of @cheatcountry's "Another New Adaptive Moving Average " shown below
I've added AT- stepped filtering. This is a standard ATR filter that works by requiring movement by XX multiple of ATR before registering a trend flip. I've also included Loxx's Expanded Source Types. You can read about those here:
From @cheatcountry on A New Adaptive Moving Average
The New Adaptive Moving Average was created by Scott Cong (Stocks and Commodities Mar 2023) and this is a companion indicator to my previous script
This indicator still works off of the same concept as before with effort vs results but this indicator takes a slightly different approach and instead defines results as the absolute difference between the closing price and a closing price x bars ago. As you can see in my chart example, this indicator works great to stay with the current trend and provides either a stop loss or take profit target depending on which direction you are going in. As always, I use darker colors to show stronger signals and lighter colors to show normal signals. Buy when the line turns green and sell when it turns red.
Included
Alerts
Signals
Loxx's Expanded Source Types
Ladder StDevThis indicator shows the upwards (green) and downward (red) volatility of the market. It is a standard deviation of the price but with a twist! For the upwards volatility , only the green candles are taken into account, and for the downwards only the red candles are.
Compared to my previous "Ladder ATR" indicator this a different approach to measure the the upwards and downwards volatility of the market by utilizing the standard deviation instead of the ATR. When both measure the volatility they have different "dynamics". Standard deviation increases the weight of larger values over smaller values. The ATR indicator is based on the average of absolute changes. So, if we apply the indicators on a daily chart , ATR considers intraday and between-day data, while the standard deviation calculation includes only daily returns (source price).
Volatility Percentile (H-LINES)A simple script that adjusts the Volatility Percentile Indicator visibly in order to better accommodate entries/exits and certain trading setups/strategies.
--------------------------------------------------------------------------------------------------------------------------------------------------------
TL;DR - Remember after a full reset, we are looking for initial crosses UP on the UpperSwingline and crosses DOWN on the LowerSwingline for primary and secondary signal derivation.
Vice versa also works great but the prior method mentioned is a little more consistent in my experience, but you should mess around and optimise this for your own setups and strategies anyway.
--------------------------------------------------------------------------------------------------------------------------------------------------------
ORIGINAL SCRIPT HERE:
^Click image for a redirect to that script.
ALL CREDIT GOES TO: www.tradingview.com
He wrote everything so give credit where it's due, good bit of kit this here script is.
--------------------------------------------------------------------------------------------------------------------------------------------------------
HOW I USE MY VISUALLY ALTERED VERSION OF THIS SCRIPT
First of all, the alterations I've made seem only to be consistently viable with renko charts though if you can get the sought after results using candles or any other chart type then perfect, but be wary. All my back-testing done only with LinReg, HMA and SWMA - ATR type settings exclusively on renko charts. The changes I've made to the original script essentially just turns it visibly into an oscillator and uses a couple horizontal lines to generate signals, very simple - absolutely nothing has changed in the actual code of calculating this indicator.
What I believe my adjustments have achieved is quite simple. A full reset/oscillation on the indicator tries to map the strongest parts of a move or at least the part of the move where volume and the rate of transactions is at its peak to even facilitate said move. *take this statement with a pinch of salt though I do believe it's interacting with accumulation/distribution patterns, which is expected of volatility*
For ease of communication let's refer to the area between the the first UpperSwingline cross to the subsequent LowerSwingline cross, as the primary move. Then afterwards when it crosses the UpperSwingline again to make the full reset, the area in between those two points referred to as the secondary move.
Though more interestingly/practically the indicator ends up giving you two signals. In order for this to work we have to first decide that a spike up in volatility which crosses the UpperSwingline implies a significant level of interest at that price level. Usually that means a reversal is brewing, if price has already moved, trended and is approaching a certain area of value; which causes a spike of new positions to be taken, then you know that this is a level where contrarians are looking to enter. Now here's the tricky part, when volatility crosses the LowerSwingline price action becomes a little more open for interpretation, the way I personally like to look at this secondary signal is the potential for an exhaustion period to prolong itself a little longer. I know that's not the perfect analysis for what's going on, a more in-depth look into what's going on would best be described using Elliott Wave Theory, if a cross on the UpperSwingline near a significant area of value gives us a reversal trade lets just assume for the sake of argument that a new Elliott Wave can begin forming here. Making the move from that initial UpperSwngline cross to the cross on the LowerSwingline, the area that encompasses those two points: the impulse wave. After this point my analogy kind of falls apart and sadly my knowledge just isn't what it needs to be in order for me to properly analyse what's going on here but I must digress. Price after crossing the LowerSwingline up until the point where it makes a full reset by crossing the UpperSwingline again, within this area price seems to do either one of two things:
Situation 1 - Most likely occurs after a major trend reversal from major support/resistance or area of value (price has trended to new territory, maybe spent time a little time consolidating but hasn't broken the key level, momentum shifts, price action breaks current structure and you get the signal that primary move is a reversal) = Exhaustion Period, price will continue in direction of primary move during the secondary move. This here is for our trend-followers, you wanna take a continuation trade? Just wait for the pullback/rally to hit a FiB retracement level and enter - or any other means to find a decent support/resistance to enter.
Situation 2 - Most likely occurs when market enters a range or consolidation (price was previously seen as being at either a discount or premium so Situation 1 could have already played out and now you're looking at a full reset after that, imagine this spot to be the centre line of a linear regression channel or bang in the middle of your range, could even occur if price breaks a key moving average and decides it ought to consolidate around it for a while. Basically at any point where a somewhat prolonged consolidation is expected and not a quick reversal) = Corrective Wave, price will move against the direction of primary move during the secondary move. Now you might be expecting me to say this ones for you reversal traders but not really, if this is occurring then there probably isn't a definitive direction the market has chosen so you can use this opportunity to take range trades in the direction or against the direction of whatever the current trend or latest trend was depending on whatever slight bias you may have. <--- Situation 2 is very useful for finding cleaner entries if you do have a trend bias, say price underwent Situation 1, is now at key moving average but your bias is that it will break and continue up, so you wait and allow the secondary move of Situation 2 to take your entry to a much better R:R before entering a position.
--------------------------------------------------------------------------------------------------------------------------------------------------------
[Hoss] VWAP ADThe VWAP ( Volume Weighted Average Price ) Deviation script is a powerful tool designed for traders to analyze the relationship between price and volume . By calculating deviations around the VWAP , the script allows users to identify key support and resistance levels that can help in making better-informed trading decisions.
The script calculates VWAP based on the chosen data source (default is closing price) and then computes deviations above and below the VWAP using either the Average Deviation or the Standard Deviation method. The user can select the desired method through the script's input options. These deviations are then plotted as bands on the chart, providing a visual representation of the areas where the price may potentially revert or experience a breakout.
A unique and valuable feature of this script is the addition of a monitor that counts the number of times the price crosses above the Upper Deviation level 2 and below the Lower Deviation level 2 within a user-defined lookback period. This monitor is displayed as a table in the bottom right corner of the chart and can be enabled or disabled through an input option.
The cross count monitor serves as a valuable aid to traders by providing insights into the historical frequency of price crossing the deviation levels. This information can be used to identify potential trading opportunities based on historical price behavior around these levels.
Ladder ATRThis indicator shows the upwards (green) and downward (red) volatility of the market. It is a moving average of the true range values like the ATR indicator does but with a twist! For the upwards volatility, only the green candles are taken into account, and for the downwards only the red candles are.
To the best of my knowledge, this technique had been introduced by HeWhoMustNotBeNamed in his "Supertrend - Ladder ATR" publication where the different types of volatility helped to improve the "trend reversal" conditions compared to the "Supertrend" indicator.
However, the actual "Ladder ATR" values were hard to see. This indicator shows the actual upward and downward volatility making it easy to reason about long and short price moves and potential biases in each direction.
In layman's terms this indicator "Ladder ATR" is to the "Supertrend - Ladder ATR" what the "Average True Range" indicator is to the "Supertrend" indicator.
Ignition Band Angles are Bollinger Bands with numeric angleI developed Bollinger Bands that provide a numeric value indicating their strength. To achieve this, I used the degree of the angle of attack and color-coded the numbers. The top band displays the number in the upper corner of the chart, the bottom band in the bottom corner, and the Basis is in the left middle. These numbers quantify the slope of the bands, which can be difficult to discern on a chart because stretching out the x and y axis can flatten or exaggerate a slope. With my Bollinger Bands, you get a constant reading that provides an accurate measurement of the angle and strength of a trend. I hope this helps.
I11L - Better Buy Low Volatility or High Volatility?This Pine Script code defines a TradingView strategy called "I11L - Better Buy Low Volatility or High Volatility?". The strategy aims to study the difference between buying when an asset's volatility is low and when it is high. It allows the user to select whether to buy during low or high volatility periods by changing the input variable mode.
Here's a brief explanation of the System:
The strategy is initialized with relevant settings such as overlay, pyramiding, default quantity type, initial capital, and others.
The mode input allows the user to choose between "Buy low Volatility" and "Buy high Volatility" options.
volatilityTargetRatio is the user-defined threshold to be used for making buy decisions. A value of 1 equals the average ATR (Average True Range) for the security. A lower value indicates lower volatility.
atrLength is the number of periods to calculate the ATR.
sellAfterNBarsLength sets the number of bars to hold the position before selling it.
The script calculates the ATR using the ta.atr() function, and then divides it by the closing price to normalize the value. It also calculates the simple moving average (SMA) of the normalized ATR over a period of 5 times the ATR length, and then computes the ratio between the normalized ATR and its average.
The script keeps track of the number of holding bars using the variable holdingBarsCounter. When there are open trades, the holding bars counter is incremented.
The decision to buy is made based on the selected mode and whether the computed ratio is above or below the user-defined threshold.
When the holding bars counter exceeds the user-defined limit, the position is closed.
The script plots the computed ratio with different colors based on the buy and close conditions. The ratio is plotted in green when a buy signal is triggered, red when a close signal is triggered, and white in all other cases. The value of 1 (the reference for the average ATR) is also plotted on the chart in white color.
This strategy helps traders study the difference between buying during low and high volatility periods and compare the performance of these conditions. It can be useful for analyzing the effectiveness of volatility-based trading strategies, such as entering positions when the market is calm or during periods of strong price movement.
Historical Volatility Scale [ChartPrime]This indicator outputs a visual scale representing the level of volatility in the market relative to the timeframe selected on the users chart. The method of volatility used is "historical volatility" which is calculated by taking the standard deviation of a series of "x" length which contains the current closing price divided by the previous closing price for all nodes. The output of the volatility is standardized by also running an additional percentrank calculation over the raw volatility values to allow the volatility scale to oscillate properly between its minimum of 0 and maximum of 100.
📗 SETTINGS
Length: The length determines how many bars/nodes should be considered when calculating the standard deviation. In simple terms, the higher the length, the less sensitive and less reactive the scale will be to current price action, and larger moves would be required to trigger the scale.
🧰 UTILITY
The arrow or "The Pin" will move upwards towards the "fire" emoji when the volatility is higher than the majority of values for the amount of bars back that you set the "length" setting to. Vise Versa for when the pin is lowering towards the "snooze" emoji, the volatility is less than the majority of nodes/values for the past "length" amount of values.
When the volatility is low, a trader could consider utilizing more leading indicators to make their trading decisions as opposed to lagging indicator such as trend indicators. When the volatility is low, the price action is consolidation which would be bad for a trend following strategy. Vise Versa for trend strategies, having a higher volatility may be better for such strategies.
Its important to remember that this indicator itself is a lagging indicator, in that it relies on historical data to showcase the current state of the markets volatility. This means that although the recommendation in the previous paragraph may make logical sense, it is not a guarantee that if the volatility is showcasing a trending market, that your trend strategies will necessarily be profitable.
Extended Price Volume Trend Strategy : EducationalThe Extended Price Volume Trend (EPVT) is a technical indicator that is used to identify potential trend changes and measure the strength of a trend. In this strategy, we combine the EPVT with other indicators to create a trading system that aims to capture trend reversals and momentum shifts.
The EPVT indicator is calculated by taking the cumulative volume and multiplying it by the percentage change in price. We then find the highest and lowest values of this indicator over a certain period of time to determine the baseline. The difference between the EPVT and the baseline is then plotted on a chart to create the EPVT line.
To use this indicator for trading, we look for crossovers of the EPVT line with zero. When the EPVT crosses above zero, it indicates that buying pressure is increasing, and we may consider taking a long position. Conversely, when the EPVT crosses below zero, it indicates that selling pressure is increasing, and we may consider taking a short position.
To further refine our trading signals, we use three take-profit levels, which we set as a percentage of the current EPVT value. We also use a simple moving average to provide additional confirmation of trend changes.
In summary, the EPVT trading strategy is a technical analysis-based approach to trading that aims to identify potential trend reversals and momentum shifts. By combining the EPVT indicator with other technical tools, we can create a comprehensive trading system that provides clear entry and exit signals for both long and short positions. Please note that this strategy is for educational purposes only and should not be taken as financial advice.
I11L - Risk Adjusted LeveragingThis trading system, called "I11L - Risk Adjusted Leveraging", is designed to manage trades based on the current market volatility relative to its historical average. The system calculates the target number of open trades based on the ATR (Average True Range) indicator and adjusts the leverage accordingly. The system opens and closes trades using a pyramiding approach, allowing multiple positions to be opened at the same time.
Here's a step-by-step explanation of the system:
1. Calculate the ATR with a 14-day period and normalize it by dividing it by the current closing price.
2. Calculate the 100-day simple moving average (SMA) of the normalized ATR.
3. Calculate the ratio of the normalized ATR to its 100-day SMA.
4. Determine the target leverage based on the inverse of the ratio (2 / ratio).
5. Calculate the target number of open trades by multiplying the target leverage by 5.
6. Plot the target number of open trades and the current number of open trades on the chart.
7. Check if there's an opportunity to buy (if the current number of open trades is less than the target) or close a trade (if the current number of open trades is more than the target plus 1).
8. If there's an opportunity to buy, open a long trade and add the trade's name to the openTrades array.
9. If there's an opportunity to close a trade and there are trades in the openTrades array, close the most recent trade by referencing the array and remove it from the array.
This system aims to capture trends in the market by dynamically adjusting the number of open trades and leverage based on the market's volatility. It uses an array to keep track of open trades, allowing for better control over the opening and closing of individual trades.
Inter-Exchanges Crypto Price Spread Clouds (Tartigradia)Display variations in min-max and median values of high, low and close across exchanges. It's a kind of realized volatility indicator, as the idea is that in times of high volatility (high emotions, fear, uncertainty), it's more likely that market inefficiencies will appear for the same asset between different market makers, ie, the price can temporarily differ a lot. This indicator will catch these instants of high differences between exchanges, even if they lasted only an instant (because we use high and low values).
Compared with my other "Inter-Exchanges Crypto Price Spread Deviation" indicator, this one overlays directly on the chart, and offers a different take based on the same premisses. Instead of summarizing volatility via standard deviation, here we display clouds of the range of values that were observed.
A big advantage of this approach is that it can also be used to determine safe stop loss levels, especially the values of percentile rank (i.e., what are the high values that were observed in at least 50% of exchanges?).
Indeed, all price levels are displayed in the indicator's status bar:
green for high values,
red for low values,
aqua for median,
purple for average,
The first two values are max and min values of high across exchanges (in green).
The next two values are max and min of low across exchanges (in red).
The next two values are median (aqua) and average (purple).
The last two values are percentile rank values for high (green) and low (red) respectively.
Another advantage is that the high (green) vs low (red) clouds can be seen as representing the buying or selling pressure respectively across exchanges, and this may in itself provide a signal to know whether one side is winning.
Link to my other complementary indicator:
Compared to other inter-exchanges spread indicators, this one offers two major features:
The symbol automatically adapts to the symbol currently selected in user's chart. Hence, switching between tickers does not require the user to modify any option, everything is dynamically updated behind the scenes.
It's easy to add more exchanges (requires some code editing because PineScript v5 does not allow dynamical request.security() calls).
Limitations/things to know:
History is limited to what the ticker itself display. Ie, even if the exchanges specified in this indicator have more data than the ticker currently displayed in the user's chart, the indicator will show only a timeperiod as long as the chart.
The indicator can manage multiple exchanges of different historical length (ie, some exchanges having more data going way earlier in the past than others), in which case they will simply be ignored from calculations when far back in the past. Hence, you should be aware that the further you go in the past, the less exchanges will have such data, and hence the less accurate the measures will be (because the deviation will be calculated from less sources than more recent bars). This is thanks to how the array.* math functions behave in case of na values, they simply skip them from calculations, contrary to math.* functions.
Inter-Exchanges Crypto Price Spread Deviation (Tartigradia)Measures the deviation of price metrics between various exchanges. It's a kind of realized volatility indicator, as the idea is that in times of high volatility (high emotions, fear, uncertainty), it's more likely that market inefficiencies will appear for the same asset between different market makers, ie, the price can temporarily differ a lot. This indicator will catch these instants of high differences between exchanges, even if they lasted only an instant (because we use high and low values).
Both standard deviation and median absolute deviation (more robust to outliers, ie, exchanges with a very different price from others won't influence the median absolute deviation, but the standard deviation yes).
Compared to other inter-exchanges spread indicators, this one offers two major features:
* The symbol automatically adapts to the symbol currently selected in user's chart. Hence, switching between tickers does not require the user to modify any option, everything is dynamically updated behind the scenes.
* It's easy to add more exchanges (requires some code editing because PineScript v5 does not allow dynamical request.security() calls).
Limitations/things to know:
* History is limited to what the ticker itself display. Ie, even if the exchanges specified in this indicator have more data than the ticker currently displayed in the user's chart, the indicator will show only a timeperiod as long as the chart.
* The indicator can manage multiple exchanges of different historical length (ie, some exchanges having more data going way earlier in the past than others), in which case they will simply be ignored from calculations when far back in the past. Hence, you should be aware that the further you go in the past, the less exchanges will have such data, and hence the less accurate the measures will be (because the deviation will be calculated from less sources than more recent bars). This is thanks to how the array.* math functions behave in case of na values, they simply skip them from calculations, contrary to math.* functions.