VWOP: Volume Weighted & Oscillated PriceWhile playing around with the standard "ta.vwap" I wondered why there was no length input, so I did some research on what the underlying calculation actually is, and did my best to augment it so as to allow for a variable length based on an oscillator value.
Normal VWAP = (Number of Shares Bought x Typical Price) / Total Volume
In my VWOP Calculation, typical price is replaced by selected moving average type or "matype" and then multiplied by the volume.
Then a total value is calculated using math.sum with a length value that changes according to a selected oscillator's value. The total is then divided by
the sum of just volume using the same oscillating length value. Result is then passed through the selected"matype" once more to give the final result.
Indicator designed for use as a entry/exit indicator in conjunction with more traditional moving averages and/or signal filters. Useful for taking volume + an oscillator into account along with price, instead of just the price as with a simple moving average.
M-oscillator
Hurst Spectral Analysis Oscillator"It is a true fact that any given time history of any event (including the price history of a stock) can always be considered as reproducible to any desired degree of accuracy by the process of algebraically summing a particular series of sine waves. This is intuitively evident if you start with a number of sine waves of differing frequencies, amplitudes, and phases, and then sum them up to get a new and more complex waveform." (Spectral Analysis chapter of J M Hurst's book, Profit Magic )
Background: A band-pass filter or bandpass filter is a device that passes frequencies within a certain range and rejects (attenuates) frequencies outside that range. Bandpass filters are widely used in wireless transmitters and receivers. Well-designed bandpass filters (having the optimum bandwidth) maximize the number of signal transmitters that can exist in a system while minimizing the interference or competition among signals. Outside of electronics and signal processing, other examples of the use of bandpass filters include atmospheric sciences, neuroscience, astronomy, economics, and finance.
About the indicator: This indicator will accept float/decimal length inputs to display a spectrum of 11 bandpass filters. The trader can select a single bandpass for analysis that includes future high/low predictions. The trader can also select which bandpasses contribute to a composite model of expected price action.
10 Statements to describe the 5 elements of Hurst's price-motion model:
Random events account for only 2% of the price change of the overall market and of individual issues.
National and world historical events influence the market to a negligible degree.
Foreseeable fundamental events account for about 75% of all price motion. The effect is smooth and slow changing.
Unforeseeable fundamental events influence price motion. They occur relatively seldom, but the effect can be large and must be guarded against.
Approximately 23% of all price motion is cyclic in nature and semi-predictable (basis of the "cyclic model").
Cyclicality in price motion consists of the sum of a number of (non-ideal) periodic cyclic "waves" or "fluctuations" (summation principle).
Summed cyclicality is a common factor among all stocks (commonality principle).
Cyclic component magnitude and duration fluctuate slowly with the passage of time. In the course of such fluctuations, the greater the magnitude, the longer the duration and vice-versa (variation principle).
Principle of nominality: an element of commonality from which variation is expected.
The greater the nominal duration of a cyclic component, the larger the nominal magnitude (principle of proportionality).
Shoutouts & Credits for all the raw code, helpful information, ideas & collaboration, conversations together, introductions, indicator feedback, and genuine/selfless help:
🏆 @TerryPascoe
🏅 DavidF at Sigma-L, and @HPotter
👏 @Saviolis, parisboy, and @upslidedown
HS,HH,LL,and EMA by: rpalconitHello everyone,
HS,HH,LL, and EMA stands for Hull Suite, Higher High, Lower Low and Exponential Moving Average.
Signal Features:
• Long Position: If the Higher High and Lower Low signals are LL and LH at the SUPPORT LEVEL, plot the Fibonacci Retracement and get retracement from 0.382,0.5 and 0.618 for EP. and your SL should be at 1.1 level of the Fibonacci, target TP should be 1.5 ratio. For confirmations the Hull Suite (HS) should be green color and on or below the Exponential Moving Average (EMA).
• Short Position: If the Higher High and Lower Low signals are HH and HL at the RESISTANCE LEVEL, plot the Fibonacci Retracement and get retracement from 0.382,0.5 and 0.618 for EP. and your SL should be at 1.1 level of the Fibonacci, target TP should be 1.5 ratio. For confirmations the Hull Suite (HS) should be red color and on or above the Exponential Moving Average (EMA).
You can change EMA length in any of your preference. The Default is 50.
Details about the indicator
INPUTS
Time Frame
• Time Frames Chart: You can select your preferred timeframe at the dropdown list. Default is 4H. Aside from Time Fame, I advice not to change anything at input default for better result.
STYLE
• Note: For effective signals results and to minimize noise, you need to uncheck first on the style tab: MHULL, BAR COLOR AND LINES.
Best regards,
ruelpalconit
Any Oscillator Underlay [TTF]We are proud to release a new indicator that has been a while in the making - the Any Oscillator Underlay (AOU) !
Note: There is a lot to discuss regarding this indicator, including its intent and some of how it operates, so please be sure to read this entire description before using this indicator to help ensure you understand both the intent and some limitations with this tool.
Our intent for building this indicator was to accomplish the following:
Combine all of the oscillators that we like to use into a single indicator
Take up a bit less screen space for the underlay indicators for strategies that utilize multiple oscillators
Provide a tool for newer traders to be able to leverage multiple oscillators in a single indicator
Features:
Includes 8 separate, fully-functional indicators combined into one
Ability to easily enable/disable and configure each included indicator independently
Clearly named plots to support user customization of color and styling, as well as manual creation of alerts
Ability to customize sub-indicator title position and color
Ability to customize sub-indicator divider lines style and color
Indicators that are included in this initial release:
TSI
2x RSIs (dubbed the Twin RSI )
Stochastic RSI
Stochastic
Ultimate Oscillator
Awesome Oscillator
MACD
Outback RSI (Color-coding only)
Quick note on OB/OS:
Before we get into covering each included indicator, we first need to cover a core concept for how we're defining OB and OS levels. To help illustrate this, we will use the TSI as an example.
The TSI by default has a mid-point of 0 and a range of -100 to 100. As a result, a common practice is to place lines on the -30 and +30 levels to represent OS and OB zones, respectively. Most people tend to view these levels as distance from the edges/outer bounds or as absolute levels, but we feel a more way to frame the OB/OS concept is to instead define it as distance ("offset") from the mid-line. In keeping with the -30 and +30 levels in our example, the offset in this case would be "30".
Taking this a step further, let's say we decided we wanted an offset of 25. Since the mid-point is 0, we'd then calculate the OB level as 0 + 25 (+25), and the OS level as 0 - 25 (-25).
Now that we've covered the concept of how we approach defining OB and OS levels (based on offset/distance from the mid-line), and since we did apply some transformations, rescaling, and/or repositioning to all of the indicators noted above, we are going to discuss each component indicator to detail both how it was modified from the original to fit the stacked-indicator model, as well as the various major components that the indicator contains.
TSI:
This indicator contains the following major elements:
TSI and TSI Signal Line
Color-coded fill for the TSI/TSI Signal lines
Moving Average for the TSI
TSI Histogram
Mid-line and OB/OS lines
Default TSI fill color coding:
Green : TSI is above the signal line
Red : TSI is below the signal line
Note: The TSI traditionally has a range of -100 to +100 with a mid-point of 0 (range of 200). To fit into our stacking model, we first shrunk the range to 100 (-50 to +50 - cut it in half), then repositioned it to have a mid-point of 50. Since this is the "bottom" of our indicator-stack, no additional repositioning is necessary.
Twin RSI:
This indicator contains the following major elements:
Fast RSI (useful if you want to leverage 2x RSIs as it makes it easier to see the overlaps and crosses - can be disabled if desired)
Slow RSI (primary RSI)
Color-coded fill for the Fast/Slow RSI lines (if Fast RSI is enabled and configured)
Moving Average for the Slow RSI
Mid-line and OB/OS lines
Default Twin RSI fill color coding:
Dark Red : Fast RSI below Slow RSI and Slow RSI below Slow RSI MA
Light Red : Fast RSI below Slow RSI and Slow RSI above Slow RSI MA
Dark Green : Fast RSI above Slow RSI and Slow RSI below Slow RSI MA
Light Green : Fast RSI above Slow RSI and Slow RSI above Slow RSI MA
Note: The RSI naturally has a range of 0 to 100 with a mid-point of 50, so no rescaling or transformation is done on this indicator. The only manipulation done is to properly position it in the indicator-stack based on which other indicators are also enabled.
Stochastic and Stochastic RSI:
These indicators contain the following major elements:
Configurable lengths for the RSI (for the Stochastic RSI only), K, and D values
Configurable base price source
Mid-line and OB/OS lines
Note: The Stochastic and Stochastic RSI both have a normal range of 0 to 100 with a mid-point of 50, so no rescaling or transformations are done on either of these indicators. The only manipulation done is to properly position it in the indicator-stack based on which other indicators are also enabled.
Ultimate Oscillator (UO):
This indicator contains the following major elements:
Configurable lengths for the Fast, Middle, and Slow BP/TR components
Mid-line and OB/OS lines
Moving Average for the UO
Color-coded fill for the UO/UO MA lines (if UO MA is enabled and configured)
Default UO fill color coding:
Green : UO is above the moving average line
Red : UO is below the moving average line
Note: The UO naturally has a range of 0 to 100 with a mid-point of 50, so no rescaling or transformation is done on this indicator. The only manipulation done is to properly position it in the indicator-stack based on which other indicators are also enabled.
Awesome Oscillator (AO):
This indicator contains the following major elements:
Configurable lengths for the Fast and Slow moving averages used in the AO calculation
Configurable price source for the moving averages used in the AO calculation
Mid-line
Option to display the AO as a line or pseudo-histogram
Moving Average for the AO
Color-coded fill for the AO/AO MA lines (if AO MA is enabled and configured)
Default AO fill color coding (Note: Fill was disabled in the image above to improve clarity):
Green : AO is above the moving average line
Red : AO is below the moving average line
Note: The AO is technically has an infinite (unbound) range - -∞ to ∞ - and the effective range is bound to the underlying security price (e.g. BTC will have a wider range than SP500, and SP500 will have a wider range than EUR/USD). We employed some special techniques to rescale this indicator into our desired range of 100 (-50 to 50), and then repositioned it to have a midpoint of 50 (range of 0 to 100) to meet the constraints of our stacking model. We then do one final repositioning to place it in the correct position the indicator-stack based on which other indicators are also enabled. For more details on how we accomplished this, read our section "Binding Infinity" below.
MACD:
This indicator contains the following major elements:
Configurable lengths for the Fast and Slow moving averages used in the MACD calculation
Configurable price source for the moving averages used in the MACD calculation
Configurable length and calculation method for the MACD Signal Line calculation
Mid-line
Note: Like the AO, the MACD also technically has an infinite (unbound) range. We employed the same principles here as we did with the AO to rescale and reposition this indicator as well. For more details on how we accomplished this, read our section "Binding Infinity" below.
Outback RSI (ORSI):
This is a stripped-down version of the Outback RSI indicator (linked above) that only includes the color-coding background (suffice it to say that it was not technically feasible to attempt to rescale the other components in a way that could consistently be clearly seen on-chart). As this component is a bit of a niche/special-purpose sub-indicator, it is disabled by default, and we suggest it remain disabled unless you have some pre-defined strategy that leverages the color-coding element of the Outback RSI that you wish to use.
Binding Infinity - How We Incorporated the AO and MACD (Warning - Math Talk Ahead!)
Note: This applies only to the AO and MACD at time of original publication. If any other indicators are added in the future that also fall into the category of "binding an infinite-range oscillator", we will make that clear in the release notes when that new addition is published.
To help set the stage for this discussion, it's important to note that the broader challenge of "equalizing inputs" is nothing new. In fact, it's a key element in many of the most popular fields of data science, such as AI and Machine Learning. They need to take a diverse set of inputs with a wide variety of ranges and seemingly-random inputs (referred to as "features"), and build a mathematical or computational model in order to work. But, when the raw inputs can vary significantly from one another, there is an inherent need to do some pre-processing to those inputs so that one doesn't overwhelm another simply due to the difference in raw values between them. This is where feature scaling comes into play.
With this in mind, we implemented 2 of the most common methods of Feature Scaling - Min-Max Normalization (which we call "Normalization" in our settings), and Z-Score Normalization (which we call "Standardization" in our settings). Let's take a look at each of those methods as they have been implemented in this script.
Min-Max Normalization (Normalization)
This is one of the most common - and most basic - methods of feature scaling. The basic formula is: y = (x - min)/(max - min) - where x is the current data sample, min is the lowest value in the dataset, and max is the highest value in the dataset. In this transformation, the max would evaluate to 1, and the min would evaluate to 0, and any value in between the min and the max would evaluate somewhere between 0 and 1.
The key benefits of this method are:
It can be used to transform datasets of any range into a new dataset with a consistent and known range (0 to 1).
It has no dependency on the "shape" of the raw input dataset (i.e. does not assume the input dataset can be approximated to a normal distribution).
But there are a couple of "gotchas" with this technique...
First, it assumes the input dataset is complete, or an accurate representation of the population via random sampling. While in most situations this is a valid assumption, in trading indicators we don't really have that luxury as we're often limited in what sample data we can access (i.e. number of historical bars available).
Second, this method is highly sensitive to outliers. Since the crux of this transformation is based on the max-min to define the initial range, a single significant outlier can result in skewing the post-transformation dataset (i.e. major price movement as a reaction to a significant news event).
You can potentially mitigate those 2 "gotchas" by using a mechanism or technique to find and discard outliers (e.g. calculate the mean and standard deviation of the input dataset and discard any raw values more than 5 standard deviations from the mean), but if your most recent datapoint is an "outlier" as defined by that algorithm, processing it using the "scrubbed" dataset would result in that new datapoint being outside the intended range of 0 to 1 (e.g. if the new datapoint is greater than the "scrubbed" max, it's post-transformation value would be greater than 1). Even though this is a bit of an edge-case scenario, it is still sure to happen in live markets processing live data, so it's not an ideal solution in our opinion (which is why we chose not to attempt to discard outliers in this manner).
Z-Score Normalization (Standardization)
This method of rescaling is a bit more complex than the Min-Max Normalization method noted above, but it is also a widely used process. The basic formula is: y = (x – μ) / σ - where x is the current data sample, μ is the mean (average) of the input dataset, and σ is the standard deviation of the input dataset. While this transformation still results in a technically-infinite possible range, the output of this transformation has a 2 very significant properties - the mean (average) of the output dataset has a mean (μ) of 0 and a standard deviation (σ) of 1.
The key benefits of this method are:
As it's based on normalizing the mean and standard deviation of the input dataset instead of a linear range conversion, it is far less susceptible to outliers significantly affecting the result (and in fact has the effect of "squishing" outliers).
It can be used to accurately transform disparate sets of data into a similar range regardless of the original dataset's raw/actual range.
But there are a couple of "gotchas" with this technique as well...
First, it still technically does not do any form of range-binding, so it is still technically unbounded (range -∞ to ∞ with a mid-point of 0).
Second, it implicitly assumes that the raw input dataset to be transformed is normally distributed, which won't always be the case in financial markets.
The first "gotcha" is a bit of an annoyance, but isn't a huge issue as we can apply principles of normal distribution to conceptually limit the range by defining a fixed number of standard deviations from the mean. While this doesn't totally solve the "infinite range" problem (a strong enough sudden move can still break out of our "conceptual range" boundaries), the amount of movement needed to achieve that kind of impact will generally be pretty rare.
The bigger challenge is how to deal with the assumption of the input dataset being normally distributed. While most financial markets (and indicators) do tend towards a normal distribution, they are almost never going to match that distribution exactly. So let's dig a bit deeper into distributions are defined and how things like trending markets can affect them.
Skew (skewness): This is a measure of asymmetry of the bell curve, or put another way, how and in what way the bell curve is disfigured when comparing the 2 halves. The easiest way to visualize this is to draw an imaginary vertical line through the apex of the bell curve, then fold the curve in half along that line. If both halves are exactly the same, the skew is 0 (no skew/perfectly symmetrical) - which is what a normal distribution has (skew = 0). Most financial markets tend to have short, medium, and long-term trends, and these trends will cause the distribution curve to skew in one direction or another. Bullish markets tend to skew to the right (positive), and bearish markets to the left (negative).
Kurtosis: This is a measure of the "tail size" of the bell curve. Another way to state this could be how "flat" or "steep" the bell-shape is. If the bell is steep with a strong drop from the apex (like a steep cliff), it has low kurtosis. If the bell has a shallow, more sweeping drop from the apex (like a tall hill), is has high kurtosis. Translating this to financial markets, kurtosis is generally a metric of volatility as the bell shape is largely defined by the strength and frequency of outliers. This is effectively a measure of volatility - volatile markets tend to have a high level of kurtosis (>3), and stable/consolidating markets tend to have a low level of kurtosis (<3). A normal distribution (our reference), has a kurtosis value of 3.
So to try and bring all that back together, here's a quick recap of the Standardization rescaling method:
The Standardization method has an assumption of a normal distribution of input data by using the mean (average) and standard deviation to handle the transformation
Most financial markets do NOT have a normal distribution (as discussed above), and will have varying degrees of skew and kurtosis
Q: Why are we still favoring the Standardization method over the Normalization method, and how are we accounting for the innate skew and/or kurtosis inherent in most financial markets?
A: Well, since we're only trying to rescale oscillators that by-definition have a midpoint of 0, kurtosis isn't a major concern beyond the affect it has on the post-transformation scaling (specifically, the number of standard deviations from the mean we need to include in our "artificially-bound" range definition).
Q: So that answers the question about kurtosis, but what about skew?
A: So - for skew, the answer is in the formula - specifically the mean (average) element. The standard mean calculation assumes a complete dataset and therefore uses a standard (i.e. simple) average, but we're limited by the data history available to us. So we adapted the transformation formula to leverage a moving average that included a weighting element to it so that it favored recent datapoints more heavily than older ones. By making the average component more adaptive, we gained the effect of reducing the skew element by having the average itself be more responsive to recent movements, which significantly reduces the effect historical outliers have on the dataset as a whole. While this is certainly not a perfect solution, we've found that it serves the purpose of rescaling the MACD and AO to a far more well-defined range while still preserving the oscillator behavior and mid-line exceptionally well.
The most difficult parts to compensate for are periods where markets have low volatility for an extended period of time - to the point where the oscillators are hovering around the 0/midline (in the case of the AO), or when the oscillator and signal lines converge and remain close to each other (in the case of the MACD). It's during these periods where even our best attempt at ensuring accurate mirrored-behavior when compared to the original can still occasionally lead or lag by a candle.
Note: If this is a make-or-break situation for you or your strategy, then we recommend you do not use any of the included indicators that leverage this kind of bounding technique (the AO and MACD at time of publication) and instead use the Trandingview built-in versions!
We know this is a lot to read and digest, so please take your time and feel free to ask questions - we will do our best to answer! And as always, constructive feedback is always welcome!
VolumeFlowVolume & price have a direct correlation with each other. If the fundamental value changes, the price changes and volume follows. If the technicals change, volume changes and price follows.
Because the relationship between volume and price is so connected, I created a script highlighting important volume flow measurements.
The VolumeFlow indicator combines several volume measurements into 1 indicator.
1) Volume net inflow / outflow
2) Volume total flow change
3) Volume cumulation flow
The VolumeFlow indicator uses a scale from 100 high to -100 low, with the zero level being neutral.
The VolumeFlow indicator has 4 inputs:
1) +Volume-
2) VolumeFast
3) VolumeSlow
4) Accum/Dist
Default inputs:
+Volume-
length = 1, color = + green or - red
VolumeFast
length = 2, color = blue
VolumeSlow
length = 3, color = white
Accum/Dist
length = 5, color = brown
Horizontal lines
length = 100, 50, 0, -50, -100, color = white
* The VolumeFlow indicator uses altered pieces of code from my Options360 FibVIP indicator, Tradingview "Up / down volume" indicator and Tradingview "Accumulation/Distribution" indicator. *
VIX OscillatorThis is my VIX Oscillator indicator.
About it:
This indicator takes the Z-Score of the VIX and of the current ticker you are on and presents them in the format of an oscillator.
Key parts of the indicator:
A diagram of the key elements of the indicator are displayed above.
Purple Line: Represents the Z-Score of the current Ticker.
Blue Line: Represents the Z-Score of the VIX
Green fill line: Represents bullish divergence
Red fill line: Represents bearish divergence
How to use it:
Characteristics for long entries:
- Look for recent bullish divergence (green fill line)
- Look for the ticker line (purple line) to be holding above 0 (neutrality)
- look for a bullish cross (purple line (ticker) crossing over blue line (VIX))
Characteristics for short entries:
- Look for recent Bearish divergence
- Look for the VIX line (blue line) to be holding above 0 and the Ticker
- Look for the ticker line to be holding below 0
- Look for a bearish cross (blue crossing above purple)
Some principles:
The bands represent oversold, overbought and neutral.
0 is absolute neutrality. No bias here.
Anything towards + 2.5 is considered normal, moving towards overbought (2.5 or higher).
Anything towards -2.5 is considered normal, moving towards oversold (-2.5 or lower).
+2.5 or higher is overbought.
-2.5 or lower is oversold.
As always, I have prepared a quick tutorial video for your reference of this indicator:
Please let me know your questions, comments or suggestions about this indicator below.
Thank you for checking it out!
Composite Cosmetic CandlesThis is effectively version 2 of my script "Candle Fill % Meter", with a few different/more options available in a more compact form. Choose between multiple oscillator sources, # of dividing lines, and solid or gradient candle fill. Once again this script is intended for use with hollow candles! This script enables you to see more information with less screen space taken up, not to mention it looks nice. Labels by last bar also toggleable in the settings.
[blackcat] L3 Jurik MACDLevel: 3
Background
Use Jurik MA to build MACD and many people need to judge the market trend against the main candlestick chart when using MACD .
Function
First of all, the MACD function is built with Jurik MA and ALMA for better performance.
Second, the principle of MACD is the difference between EMA's long-term and short-term values. So, I wonder if it is possible to use EMA to construct a set of candle charts that are similar in proportion to MACD values for overlapping comparisons? Because this can greatly facilitate traders to make quick trend judgments. So I used the 3-8 lines of EMA to simulate the KD of KDJ, constructed a set of candle charts, and generated buying and selling points through conditional constraints. Do you like this MACD + Candlestick chart?
Key Signal
Traditional Jurik MACD output signal
Candlesticks
Near Top --> Top is reached and reversal may happen soon. (fuchsia labels)
Near Bottom --> Bottom is reached and reversal may happen soon. (yellow labels)
Remarks
Feedbacks are appreciated.
Balance of Force (BOF)The script "Balance of Force" is an indicator that aims to provide insight into the bullish and bearish forces present in the market by analyzing the relationship between bullish and bearish true ranges. The indicator first calculates the bearish and bullish true ranges by taking the absolute difference between the open and close prices for each period and summing these values over a user-specified length. It then calculates the ratio of the bullish true range to the bearish true range and takes the natural logarithm of this value, resulting in the "bullish-bearish ratio".
The script then calculates the standard deviation of this ratio over a user-specified length to create a measure of volatility. Using this deviation and the dominant cycle, it then applies an exponential moving average to smooth the ratio. The indicator plots the smoothed ratio, the raw ratio, and the deviation of the ratio multiplied by 1, 2 and 3 in addition to filling the area between the deviation multiplied by 3 and the log(1) with red and green. The user can use the indicator to identify potential bullish or bearish market conditions by analyzing the relationship between the smoothed ratio and the log(1) and the deviation of the ratio.
Fair Value Strategy UltimateThis is a strategy using an index's (SPX, NDX, RUT) Fair Value derived from Net Liquidity.
Net Liquidity function is simply: Fed Balance Sheet - Treasury General Account - Reverse Repo Balance
Formula for calculating the fair value of and Index using Net Liquidity looks like this: net_liquidity/1000000000/scalar - subtractor
The Index Fair Value is then subtracted from the Index value which creates an oscillating diff value.
When diff is greater than the overbought threshold, Index is considered overbought and we go short/sell.
When diff is less than the oversold signal, Index is considered oversold and we cover/buy.
The net liquidity values I calculate outside of TradingView. If you'd like the strategy to work for future dates, you'll need to update the reference to my NetLiquidityLibrary , which I update daily.
Parameters:
Index: SPX, NDX, RUT
Strategy: Short Only, Long Only, Long/Short
Inverse (bool): check if using an inverse ETF to go long instead of short.
Scalar (float)
Subtractor (int)
Overbought Threshold (int)
Oversold Threshold (int)
Start After Date: When the strategy should start trading
Close Date: Day to close open trades. I just like it to get complete results rather than the strategy ending with open trades.
Optimal Parameters:
I've optimized the parameters for each index using the python backtesting library and they are as follows =>
SPX
Scalar: 1.1
Subtractor: 1425
OB Threshold: 0
OS Threshold: -175
NDX
Scalar: 0.5
Subtractor: 250
OB Threshold: 0
OS Threshold: -25
RUT
Scalar: 3.2
Subtractor: 50
OB Threshold: 25
OS Threshold: -25
Rotational Gravity OscillatorMade using elements from two Cheatcountry scripts:
Includes a Bollinger Band for bounds that forms a trend follower based on the 0 point.
Includes CheatCountry color code signals, different color scheme. Bright colors are strong signals, ark are weak, green bull, red bear, the basics.
Switches for Bollinger Band color codes, which can actually be useful signals.
This oscillator can be used for divergences, trends, signal strength, confirmation, volatility readings, you name it.
It is a comparative oscillator, that compares adaptively smoothed, weighted modified Change of Gravity oscillators between 2 symbols and multiple lengths to determine directional momentum as one asset compares to another.
The default uses the Crypto TOTAL market cap to help trade cryptocurrencies. You will notice that BTC will give sell signals in uptrends at times. That is because it is being compared to an index of the total Crypto market cap, and since alt-coins move faster, BTC will lag behind this index.
Give CheatCountry a follow, hes one of the MVPs of Tradingview Pinescripters, constantly giving us access to novel new concepts as they are published by professionals.
True Range Adjusted Exponential Momentum [CC]-[burgered]Original Script by CheatCountry, used with permission (chill guy):
I have made a sort of conversion of CheatCountries implementation of the True Range Adjusted Exponential Moving Average into a momentum oscillator.
Being True Range based, it the bounds vary based on the chart.
Includes a Bollinger Band for bounds that forms a trend follower based on the 0 point.
Includes CheatCountry color code signals, different color scheme. Bright colors are strong signals, ark are weak, green bull, red bear, the basics.
This oscillator can be used for divergences, trends, signal strength, confirmation, volatility readings, you name it.
Works well on smoothed/filtered signals as well.
Give CheatCountry a follow, hes one of the MVPs of Tradingview Pinescripters, constantly giving us access to novel new concepts as they are published by professionals.
Dynamic Linear Regression Oscillator | AdulariDescription:
This dynamic linear regression oscillator visualizes the general price trend of specific ranges in the chart based on the linear regression calculation, it automatically determines these ranges with pivot detection. The central line of the indicator is the baseline of the linear regression itself. This is a good tool to use to determine when a price is unusually far away from its baseline. The lines above or below it are overbought and oversold zones. These zones are based on the high or low of the range, in combination with the set multipliers.
The overbought and oversold lines indicate support and resistance; when the prices stay outside these levels for a significant period of time, a reversal can be expected soon. When the oscillator's value crosses above the signal or smoothed line the trend may become bullish. When it crosses below, the trend may become bearish.
This indicator is quite special, as it first determines price ranges using pivot detection. It then uses the middle of the range to determine how far the current price is from the baseline. This value is then rescaled compared to a set amount of bars back, putting it into relevant proportions with the current price action.
How do I use it?
Never use this indicator as standalone trading signal, it should be used as confluence.
When the value crosses above the signal this indicates the current bearish trend is getting weak and may reverse upwards.
When the value crosses below the signal this indicates the current bullish trend is getting weak and may reverse downwards.
When the value is above the middle line this shows the bullish trend is strong.
When the value is below the middle line this shows the bearish trend is strong.
When the value crosses above the upper line this indicates the trend may reverse downwards.
When the value crosses below the lower line this indicates the trend may reverse upwards.
Features:
Oscillator value indicating how far the price has currently deviated from the middle of the range. Proportioned to data from a set amount of bars ago.
Signal value to indicate whether or not the price is abnormally far from the middle of the range.
Horizontal lines such as oversold, overbought and middle lines, indicating possible reversal zones.
Automatic range detection using pivots.
Built-in rescaling functionality to ensure values are proportionate with the latest data.
How does it work? (simplified)
1 — Calculate the middle of the range.
2 — Define whether the current price is above the middle of the range or below.
3 — If above the middle of the range, calculate the difference of the current high and the middle line. If below, calculate the difference of the current low and the middle line.
4 — Smooth the value using a set moving average type.
5 — Rescale the value to proportionate it with the latest data.
PSAR BBPT ZLSMA BTC 1minLong entry:
PSAR gives buy signal
BBPT prints green histogram
ZLSMA is below the price
ZLSMA has uptrend
SL is smaller than the max SL
Optional Sessions and EMA filters
Short entry
PSAR gives sell signal
BBPT prints red histogram
ZLSMA is above the price
ZLSMA has downtrend
SL is smaller than the max SL
Optional Sessions and EMA filters
SL:
Placed below ZLSMA + offset on long
Placed above ZLSMA + offset on short
TP1:
1x the SL by default
Takes no profit by default, 50% is also a good setting
TP2:
2x the SL by default
Take out all remaining position size.
If price reaches TP1, the SL is set to the entry price.
RAINBOW_13thHi Dears!
hereby, I present you one of my indicators which is a kind of artistic indicator.
It calculates different ranks of functions and based on them suggests a buy or sell order which is depicted on right-side separately.
Inputs:
(For calculating)
+Source:
+Length: Number of previous bars in calculation
+Topology:
++EMA
++RMA
++SMA
++RSI
+OVER BOUGHT RSI: Define your boundary for overbought in RSI-TOPOLOGY.
+OVER SOLD RSI: Define your boundary for oversold in RSI-TOPOLOGY.
(Visual)
+Transparency: affect colors of rainbow!
Wish you good deals!
BY USING PLZ DO NOT FORGET TO BOOST IT!
Shakib.
RSI Pull-BackA pull-back occurs whenever the price or the value of an indicator breaks a line and comes back to test it before continuing in the prevailing trend.
The RSI has oversold and overbought levels such as 20 and 80 and whenever the market breaks them returns to normality, we can await a pull-back to them before the reversal continues.
This indicator shows the following signals:
* A bullish signal is generated whenever the RSI surpasses the chosen oversold level then directly shapes a pull-back to it without breaking it again.
* A bearish signal is generated whenever the RSI breaks the chosen overbought level then directly shapes a pull-back to it without surpassing it again.
TOTAL:(RSI+TSI)TOTAL:(RSI+TSI)
This indicator collects instant data of RSI and TSI oscillators. RSI moves between (0) and (100) values as a moving line, while TSI moves between (-100) and (+100) values as two moving lines.
The top value of the sum of these values is graphically;
It takes the total value (+300) from RSI (+100), TSI (+100) and (+100).
The lowest value of the sum of these values is graphically;
It takes the value (-200) from the RSI (0), (-100) and (-100) from the TSI.
In case this indicator approaches (+300) graphically; It can be seen that price candlesticks mostly move upwards. This may not always give accurate results. Past incompatibilities can affect this situation.
In case this indicator approaches (-200) graphically; It can be seen that price candlesticks mostly move downwards. This may not always give accurate results. Past incompatibilities can affect this situation.
The graphical movements and numerical values created by this indicator do not give precise results for price candles.
RSI Accumulation/Distribution [M]Hello everyone,
After my long tests, I observed that the rate of change of direction of the price was high after the periods when the RSI spent a long time outside the band. As a result of my observations, I prepared this indicator.
This indicator shows you the accumulation and distribution areas that occur outside the rsi band.
There are 3 different levels available.
Level 1 = 5 Bars
Level 2 = 7 Bars
Level 3 = 9 Bars
For example, if the RSI spends more than 9 bars below the 30 level or above the 70 level, it will paint that area red. Levels can be changed from the indicator settings. The rsi is smoothed with simple moving average to reduce fake signals.
Using the RSI A/D indicator with different indicators or patterns will increase your success rate.
Examples:
On Balance Volume Scaled - OBV ScaledThe main idea of this oscillator is to place the OBV oscillator and its oscillation around the range of 0 and around -50 to +50 and for this scaling of the "On Balance Volume" oscillator, I have used Min-max normalization.
Since this oscillator does not have a specific minimum and maximum, just setting the maximum and minimum does not seem the best thing to do. As in this case, we will constantly observe sudden changes and we will have problems such as volatility. On the one hand, we will constantly deal with sudden changes and problems such as volatility. Also on the other hand, the continuous collisions of the high/low(+50 & -50) and index and returning from that is another thing that we are going to deal with.
Therefore, to solve these problems and create more flexible maximum and minimum ranges, another similar method has been used. Choosing the maximum of our normalization to the size of the moving average of 100 candles of the index maximum and choosing the minimum of normalization to the size of the moving average of 100 candles of the minimums of the OBV index, and then normalizing the OBV index with the Min-max method with those ranges, is the recommended method ,which has been used to eliminate problems. In this case, we will not have any problem hitting 50 and returning or hitting -50 and returning. Also, our scaled OBV index will have the ability to touch and cross 50 and -50 and can fluctuate without problems.
HL-D Close Fraction Oscillator | AdulariDescription:
This indicator calculates the difference between price high's and low's, and fractions it by the close price. If it calculates the difference between a high and low or low and high is defined by whether the current close is higher than the previous close. It is then also rescaled to ensure the value is always appropriate compared to the last set amount of bars.
This indicator can be used to determine whether a market is trending or ranging, and if so in which direction it is trending.
How do I use it?
Never use this indicator as standalone trading signal, it should be used as confluence.
When the value is above the middle line this shows the bullish trend is strong.
When the value is below the middle line this shows the bearish trend is strong.
When the value crosses above the upper line this indicates the trend may reverse downwards.
When the value crosses below the lower line this indicates the trend may reverse upwards.
When the value crosses above the signal this indicates the current bearish trend is getting weak and may reverse upwards.
When the value crosses below the signal this indicates the current bullish trend is getting weak and may reverse downwards.
Features:
Oscillator value indicating the difference between highs and lows fractioned by the close price.
Signal indicating a clear trend and base line value.
Horizontal lines such as oversold, overbought and middle lines, indicating possible interest zones.
How does it work?
1 — Define trend by checking if current close is above or below previous close.
2 — If the current close is above the previous close, calculate the oscillator's value using this formula:
(high - low) / close
2 — If the current close is below the previous close, calculate the oscillator's value using this formula:
(low - high) / close
3 — Smooth the original value using a specified moving average.
4 — Rescale the value using this formula:
newMin + (newMax - newMin) * (value - oldMin) / math.max(oldMax - oldMin, 10e-10)
5 — Calculate signal value by applying smoothing to the oscillator's value.
Generalized Smooth StepHello, folks. Sorry for not posting anything for a long time, just busy with my university studies for the moment.
Quick script for today — Smooth Step.
You can search for it in Wikipedia, but saying shortly and informatively, this is just an advanced type of oscillator, used as momentum indicator.
In the codes across the Internet everybody uses the 3rd order equation, BUT I found it kinda boring to use indicator this simple, so I made an option to choose the order of the equation in the settings — parameter "Order of the equation". This why it is called generalized smooth step, as it makes possible to use equation of virtually any order.
It is limited to 18 because very strange behaviour that you get after passing 18th order (it jsut becomes not tradeable any longer).
As I've mentioned above, it is an advanced version of classical oscillator, used as momentum indicator .
How to use it?
If smooth step is above 50, then the price momentum is bullish;
If smooth step is below 50, then the price momentum is bearish.
As simple as it is, it becomes useful enough on the higher timeframes (>=1H), so feel free to play with it and find optimal settings for yourself.
Hints
Try perform different smoothing and leading methods (developed by Ehler) to get better results;
You can use smooth step as confirmation/filter for trend-following trades.
Hope you will find it valueable.
Take your profits!
- Tarasenko Fyodor
RU:
Привет, ребята. Извините, что долго ничего не выкладывал, просто сейчас занят учебой в университете.
Быстрый скрипт на сегодня — Smooth Step.
Вы можете поискать его теоретическое обоснование в Википедии, но если говорить кратко и информативно, то это совершенствованный тип классического осциллятора, используемый в качестве моментум-индикатора .
В кодах в интернете все используют уравнение 3-го порядка, НО Мне было скучно пользоваться таким простым индикатором, поэтому я сделал возможность выбирать порядок уравнения в настройках — параметр " Порядок уравнения». Поэтому он называется обобщеннымsmooth step, так как позволяет использовать уравнение практически любого порядка.
Я ограничил порядок уравнения 18 , потому что индикатор показывает начинается очень странное поведение, когда вы делаете порядок больше 18 (индикатор просто начинается вести семя хаотично, что ли).
Как я уже упоминал выше, это усовершенствованная версия классического осциллятора, используемого в качестве моментум-индикатора .
Как им пользоваться?
Если smooth step выше 50, то импульс цены бычий;
Если smooth steз\p ниже 50, то импульс цены медвежий.
Хоть это и очень простой индикатор, он может оказаться достаточно полезным на старших таймфреймах (>=1H), так что не стесняйтесь играть с ним и находить оптимальные настройки для себя.
Советы
Попробуйте использовать различные методы сглаживания и лидирования (разработан Джоном Элером (John Ehler)), чтобы получить лучшие результаты;
Вы можете использовать smooth step в качестве подтверждения/фильтра для сделок, следующих за трендом.
Надеюсь, этот скрипт будет вам полезен.
Получите прибыль!
- Тарасенко Фёдор
(mab) Volume IndexThis script implements the (mab) Volume Index (MVI) which is a volume momentum oscillator. The formula is similar to the formula of RSI but uses volume instead of price. The price is calculated as the average of open, high, low and close prices and is used to determine if the volume is counted as up-volume or down-volume.
I created MVI to replace OBV on my charts, because OBV is not as simple to read and find e.g. divergences. MVI is much easier to read because it is an oscillator with a minimum value of 0 and a maximum value of 100. It's easy to find divergences too. I like to display MVI over the volume bars. However, you can display it in a separate pain as well.
Multiple Divergences (UDTs - objects) - Educational█ OVERVIEW
This script highlights the usage of User-defined Types (UDTs) and objects , and bullish /bearish divergences.
Pivotpoints are used to find divergences, the result of this script will be different against other public multiple divergences scripts.
FOR Pine Script™ CODERS
Besides the information found in CONCEPTS , the comments in the script will, hopefully ), guide you through my thought process.
█ CONCEPTS
The main principle of this script are bullish /bearish divergences, this with 3 different oscillators ( RSI , CCI , MFI )
If you want to know more about divergences, have a look at some Education and Research idea's .
On every bar, an object HLs is made, containing bar_index , high , low , and 2 bool variables ( isPh , isPl ).
On every bar, an object Osc is made, containing bar_index , o (oscillator value), and 2 bool variables ( isPh , isPl ).
If a pivothigh (ph ) is found, isPh will be true on that bar, false otherwise.
If a pivotlow (pl) is found, isPl will be true on that bar, false otherwise.
These objects are added to an array, with limited size.
If a ph is found, the script draws a testline from that ph to every previous ph , found in the array.
Then every high in between these 2 points are checked if they don't pierce the testline .
If the testline isn't broken, the Reg_Div_Piv() function will give 4 values, 1 check (not pierced) variable and the 4 points of the line.
The testline is deleted.
Once a positive check is found, the script will perform the same, but now with the Osc objects.
The script will ONLY compare Osc pivots which are maximum 1 bar away from the high/low pivot .
If everything is confirmed, a line is drawn, visible on the chart.
█ REMARKS
A label will be visible with a number, this is the amount of divergences found with the according oscillator .
EXAMPLE
Div with RSI and CCI -> 2
Div with MFI alone -> 1
Div with RSI and CCI and MFI -> 3
...
Divergences should only be used when confirmed, this is after bar close .
As an aid, lines that are not confirmed will be dotted , if confirmed, they will be solid .
The divergence check start when a ph/pl is found, after which oscillator pivot are checked.
Optionally the same can be done, when a oscillator pivot is found and then check the ph/pl ,
this should give more results, although it can make the script slower.
█ SETTINGS
Left - amount of bars at the left which needs to be lower/higher
Right - amount of bars at the right which needs to be lower/higher
Max values - maximum values in array of objects
3 oscillator settings with
• ON/OFF
• Length
• color bullish divergence
• color bearish divergence
Have FUN !