Advanced VWAP [CryptoSea]The Advanced VWAP is a comprehensive volume-weighted average price (VWAP) tool designed to provide traders with a deeper understanding of market trends through multi-layered VWAP analysis. This indicator is ideal for those who want to track price movements in relation to VWAP bands and detect key market levels with greater precision.
Key Features
Multi-Timeframe VWAP Bands: Includes multiple VWAP bands with different lookback periods (5, 10, 25, and 50), allowing traders to observe short-term and long-term price behavior.
Smoothed Band Options: Offers optional smoothing of VWAP bands to reduce noise and highlight significant trends more clearly.
Dynamic Median Line Display: Plots the median line of the VWAP bands, providing a reference for price movements and potential reversal zones.
VWAP Trend Strength Calculation: Measures the strength of the trend based on the price's position relative to the VWAP bands, normalized between -1 and 1 for easier interpretation.
In the example below we can see the VWAP Forecastd Cloud, which consists of multiple layers of VWAP bands with varying lookback periods, creating a dynamic forecast visualization. The cloud structure represents potential future price ranges by projecting VWAP-based bands outward, with darker areas indicating higher density and overlap of the bands, suggesting stronger support or resistance zones. This approach helps traders anticipate price movement and identify areas of potential consolidation or breakout as the price interacts with different layers of the forecast cloud.
How it Works
VWAP Calculation: Utilizes multiple VWAP calculations based on various lookback periods to capture a broad range of price behaviors. The indicator adapts to different market conditions by switching between short-term and long-term VWAP references.
Smoothing Algorithms: Provides the ability to smooth the VWAP bands using different moving average types (SMA, EMA, SMMA, WMA, VWMA) to suit various trading strategies and reduce market noise.
Trend Strength Analysis: Computes the trend strength based on the price's distance from the VWAP bands, with a value range of -1 to 1. This feature helps traders identify the intensity of uptrends and downtrends.
Alert Conditions: Includes alert options for crossing above or below the smoothed median line, as well as touching the smoothed upper or lower bands, providing timely notifications for potential trading opportunities.
This image below illustrates the use of smoothed VWAP bands, which provide a cleaner representation of the price's relationship to the VWAP by reducing market noise. The smoothed bands create a flowing cloud-like structure, making it easier to observe significant trends and potential reversal points. The circles highlight areas where the price interacts with the smoothed bands, indicating potential key levels for trend continuation or reversal. This setup helps traders focus on meaningful movements and filter out minor fluctuations, improving the identification of strategic entry and exit points based on smoother trend signals.
Application
Strategic Entry and Exit Points: Helps traders identify optimal entry and exit points based on the interaction with VWAP bands and trend strength readings.
Trend Confirmation: Assists in confirming trend strength by analyzing price movements relative to the VWAP bands and detecting significant breaks or touches.
Customized Analysis: Supports a wide range of trading styles by offering adjustable smoothing, band settings, and alert conditions to meet specific trading needs.
The Advanced VWAP by is a valuable addition to any trader's toolkit, offering versatile features to navigate different market scenarios with confidence. Whether used for day trading or longer-term analysis, this tool enhances decision-making by providing a robust view of price behavior relative to VWAP levels.
Source
Dynamic Gradient Filter
Sigmoid Functions:
History and Mathematical Basis:
Sigmoid functions have a rich history in mathematics and are widely used in various fields, including statistics, machine learning, and signal processing.
The term "sigmoid" originates from the Greek words "sigma" (meaning "S-shaped") and "eidos" (meaning "form" or "type").
The sigmoid curve is characterized by its smooth S-shaped appearance, which allows it to map any real-valued input to a bounded output range, typically between 0 and 1.
The most common form of the sigmoid function is the logistic function:
Logistic Function (σ):
Defined as σ(x) = 1 / (1 + e^(-x)), where:
'x' is the input value,
'e' is Euler's number (approximately 2.71828).
This function was first introduced by Belgian mathematician Pierre François Verhulst in the 1830s to model population growth with limiting factors.
It gained popularity in the early 20th century when statisticians like Ronald Fisher began using it in regression analysis.
Specific Sigmoid Functions Used in the Indicator:
sig(val):
The 'sig' function in this indicator is a modified version of the logistic function, clamping a value between 0 and 1 on the sigmoid curve.
siga(val):
The 'siga' function adjusts values between -1 and 1 on the sigmoid curve, offering a centered variation of the sigmoid effect.
sigmoid(val):
The 'sigmoid' function provides a standard implementation of the logistic function, calculating the sigmoid value of the input data.
Adaptive Smoothing Factor:
The ' adaptiveSmoothingFactor(gradient, k)' function computes a dynamic smoothing factor for the filter based on the gradient of the price data and the user-defined sensitivity parameter 'k' .
Gradient:
The gradient represents the rate of change in price, calculated as the absolute difference between the current and previous close prices.
Sensitivity (k):
The 'k' parameter adjusts how quickly the filter reacts to changes in the gradient. Higher values of 'k' lead to a more responsive filter, while lower values result in smoother outputs.
Usage in the Indicator:
The "close" value refers to the closing price of each period in the chart's time frame
The indicator calculates the gradient by measuring the absolute difference between the current "close" price and the previous "close" price.
This gradient represents the strength or magnitude of the price movement within the chosen time frame.
The "close" value plays a pivotal role in determining the dynamic behavior of the "Dynamic Gradient Filter," as it directly influences the smoothing factor.
What Makes This Special:
The "Dynamic Gradient Filter" indicator stands out due to its adaptive nature and responsiveness to changing market conditions.
Dynamic Smoothing Factor:
The indicator's dynamic smoothing factor adjusts in real-time based on the rate of change in price (gradient) and the user-defined sensitivity '(k)' parameter.
This adaptability allows the filter to respond promptly to both minor fluctuations and significant price movements.
Smoothed Price Action:
The final output of the filter is a smoothed representation of the price action, aiding traders in identifying trends and potential reversals.
Customizable Sensitivity:
Traders can adjust the 'Sensitivity' parameter '(k)' to suit their preferred trading style, making the indicator versatile for various strategies.
Visual Clarity:
The plotted "Dynamic Gradient Filter" line on the chart provides a clear visual guide, enhancing the understanding of market dynamics.
Usage:
Traders and analysts can utilize the "Dynamic Gradient Filter" to:
Identify trends and reversals in price movements.
Filter out noise and highlight significant price changes.
Fine-tune trading strategies by adjusting the sensitivity parameter.
Enhance visual analysis with a dynamically adjusting filter line on the chart.
Literature:
en.wikipedia.org
medium.com
en.wikipedia.org
Fibonacci Levels on Any Indicator [By MUQWISHI]▋ INTRODUCTION :
A “Fibonacci Levels on Any Indicator” can be applied to any indicator to draw Fibonacci levels based on provided conditions of two price points to produce a sequence of horizontal line levels starting from 0% to 100% in addition to extension levels. The 0% level is measured as the start of retracement, while the 100% level is the beginning of the extension levels. This tool was developed to be easy to add to any indicator, and it could be valuable to some traders in terms of managing trades by setting targets and reducing risk in the trend direction.
_______________________
▋ USAGE:
➤ NEEDS TO IDENTIFY 4 ELEMENTS:
1. Starting Point. What’re the conditions / When will the drawing of the Fibonacci levels begin?
2. Ending Point. What’re the conditions / When will the drawing of the Fibonacci levels end?
3. High Point. What is the price for a 100% Fibonacci level (0% for the downside)?
4. Low Point. What is the price for a 0% Fibonacci level (100% for the downside)?
➤ STARTING & ENDING POINTS CONDITIONS:
Need to specify the condition when the drawing of Fibonacci levels starts and ends, and the indicator shows different prepared conditions.
New Phase: Import a value (plot) from an existing indicator, where its status changes from NaN to a real number.
Crosses Above/Below: Import a value(1) (plot) from an existing indicator, where it crosses above/below value(2).
Reversal Up/Down: Import a value(1) (plot) from an existing indicator, where it rises/decreases than the previous value(1).
First/Last Bar: Useful to draw stationary Fibonacci levels.
➤ UPPER & LOWER PIVOTS (0% & 100%):
Need to specify the two price points representing 0% & 100% Fibonacci levels to expose the sequence of Fibonacci lines.
Upper Pivot. By default, the ATR Upper Band. It’s possible to import a custom value from an existing indicator.
Lower Pivot. By default, the ATR Lower Band. It’s possible to import a custom value from an existing indicator.
➤ FIBONACCI STYLING OPTIONS:
Ability to customize line & label style, color, reverse, and hide/show levels.
_______________________
▋ IMPLEMENTATION:
Here are some examples of implementing the indicator.
Note: All presented examples below are for demonstration purposes, and they're not trading suggestions.
# Example 1: (Reversal Up/Down)
We want to implement Fibonacci levels on the Hull MA by mohamed982 . Our requirements are as follows:
Fibonacci levels start when the Hull MA reverses up.
Fibonacci levels end when the Hull MA reverses down.
Upper Pivot is the ATR Upper Band.
Lower Pivot is the ATR Lower Band.
After adding the required indicator (Hull MA), here’re the implementation and results
# Example 2: (Crosses Above/Below)
We want to implement Fibonacci Level on the Squeeze Momentum by LazyBear . Our requirements are as follows:
Fibonacci levels start when the Squeeze Momentum histogram crosses above 0.
Fibonacci levels end when the Squeeze Momentum histogram crosses below 0.
Upper Pivot is the Bollinger Upper Band.
Lower Pivot is the Bollinger Lower Band.
After adding the required indicators (Squeeze Momentum & Bollinger Band), here’re the implementation and results
# Example 3: (Crosses Above/Below)
We want to implement Fibonacci Level on the Crossing Moving Averages. Our requirements are as follows:
Fibonacci levels start when the 20-EMA crosses above 100-MA.
Fibonacci levels end when the 20-EMA crosses below 100-MA.
Upper Pivot is the ATR Upper Band.
Lower Pivot is the ATR Lower Band.
After adding the required indicators (20-EMA & 100-MA), here’re the implementation and results
# Example 4: (New Phase: When the previous value is NaN, and the current value is a real number.)
We want to implement Fibonacci Level on the Supertrend. Our requirements are as follows:
Fibonacci levels start when an up-Supertrend (green) line shows up.
Fibonacci levels end when a down-Supertrend (red) line shows up.
Upper Pivot is the down-Supertrend.
Lower Pivot is the up-Supertrend.
After adding the required indicator (Supertrend), here’re the implementation and results
# Example 5: (First/Last Bar)
We want to implement Fibonacci Level between two points, 330 & 300. Our requirements are as follows:
Fibonacci levels start at first bar on the chart.
Fibonacci levels end at last bar on the chart.
Upper Pivot is 330.
Lower Pivot is 300.
Here’re the implementation and results.
To customize the number of bars back (like 50 bars)
_______________________
▋ Final Comments:
The “Fibonacci Levels on Any Indicator” is made to apply on other indicators for planning Fibonacci Levels.
It can be implemented in different ways, along with presented examples.
This indicator does not work with plots that were developed by drawing classes.
Please let me know if you have any questions.
Thank you.
Line Colorizer - DurbtradeThe Line Colorizer is a simple indicator that can plot up/down-colorized lines for up to 10 unique individual sources!
Plot up/down colors are based on whether the current value is above or below the previous value.
Also included is a separate color for when the current value is equal to the previous value.
All colors can be modified, along with the plot styles.
--------------------------------------------
--------------------------------------------
Here is the Inputs tab of the Settings menu :
As you can see, you can plot a colorized line of up to 10 individual sources!
Checking the checkbox turns on that particular colorized plot,
and clicking on the drop down menu allows you select the source for that plot.
The plot styles, up/equal/down colors, and opacities
are customizable under the Style tab within the Settings menu :
Overall, it is pretty easy to use.
--------------------------------------------
Let's look at some examples of the Line Colorizer being used...
Colorize a basic Bollinger Bands indicator :
Want to colorize 3 EMA's? Go for it :
Spice up the standard MACD salad :
Customize the colors of your RSI's :
Try using the Line Colorizer on all of your favorite indicators.
--------------------------------------------
Script Stats :
Pinescript Version : 5
Code Length : 44 Lines
Max Unique Input Sources : 10
Max Visible Plots : 10
Total Colors/Opacities : 30
--------------------------------------------
Tips :
Typically you will want this indicator to be on a layer above (in front of) the source plot layer.
Stay mindful of line thicknesses,
and whether the original source plot is still visible or not.
The final output of the colorized plots are drawn in numerical order,
so, Colorized Source #1 is drawn first, and will appear below Colorized Source #2 on the chart...
and so on, with Colorized Source #10 being drawn last, at the very top.
Final Thoughts :
I like having this indicator.
The idea and script is simple, and the indicator is practical.
It's one method of easily separating some of the aspects of color from your favorite indicators and scripts,
and then customizing those aspects to your liking.
Especially practical for those who do not want to learn about writing their own scripts.
I think that this indicator can be a useful tool in the shed,
used for customizing the visuals of multiple unique sources
that are all on the same price/value scale.
It can help increase chart clarity and/or detail...
whether using it on top of a main chart that is simple,
or on top of a standalone indicator that is crowded with oscillating information.
I hope that you enjoy it and find it useful!
- Please feel free to comment your thoughts, critiques, or suggestions. They are all very helpful!
- Also, please feel free to comment any positive feedback, or awesome screencaps/ideas of the indicator in action!
- Check out my other Pinescript indicators if you like this one... they work well together.
- May your trades be successful!
--------------------------------------------
// Durbtrade
OHLC📕 LIBRARY OHLC
🔷 Introduction
This library is a custom library designed to work with real-time bars. It allows to easily calculate OHLC values for any source.
Personally, I use this library to accurately display the highest and lowest values on visual indicators such as my progress bars.
🔷 How to Use
◼ 1. Import the OHLC library into your TradingView script:
import cryptolinx/OHLC/1
- or -
Instead of the library namespace, you can define a custom namespace as alias.
import cryptolinx/OHLC/1 as src
◼ 2. Create a new OHLC source using the `new()` function.
varip mySrc = OHLC.new() // It is required to use the `varip` keyword to init your ``
- or -
If you has set up an alias before.
varip mySrc = src.new()
===
In that case, your `` needs to be `na`, define your object like that
varip mySrc = na
◼ 3. Call the `hydrateOHLC()` method on your OHLC source to update its values:
Basic
float rsi = ta.rsi(close, 14)
mySrc.hydrateOHLC(rsi)
- or -
Inline
rsi = ta.rsi(close, 14).hydrateOHLC(mySrc)
◼ 4. The data is accessible under their corresponding names.
mySrc.open
mySrc.high
mySrc.low
mySrc.close
🔷 Note: This library only works with real-time bars and will not work with historical bars.
SUPER Alligator[Gabbo]this indicator serves to differentiate the classic type Line and source of Alligator
There are the classic inputs for the 3 lines ( Jaw , Teeth and Lips ) in addition to the choice of the normal source and the type of line, the choices are:
SMA = Simple moving average
EMA = Exponential moving average
WMA = Weighted moving average
RMA = Rolling moving average
HMA = Hull moving average
JMA = Jurik moving average
DEMA = Double exponential moving average
TEMA = Triple exponential moving average
LSMA = Least squares moving average
VWMA = Volume-weighted moving average
SMMA = Moving average Smoothed
KAMA = Kaufman Moving Average Adaptive
ALMA = Arnaud Legoux moving average
FRAMA = Fractal Adaptive moving average
VIDYA = Variable Index Dynamic Average
There are also Inputs that are valid only for some styles such as:
JMA = "Phase" and "Power"
ALMA = "Offset" and "Sigma"
FRAMA = "Lower shift ( FC )" and "Upper shift ( SC )"
VIDYA = "Fixed CMO Lenght (9)?" and "Calculation Method: CMO/StDev?"
Selecting the input: "Use Different Source ???" you can use a source with multiple elements of your choice:
2 = (Source 1 + Source 2) / 2
3 = (Source 1 + Source 2 + Source 3) / 3
4 = (Source 1 + Source 2 + Source 3 + Source 4) / 4
5 = (Source 1 + Source 2 + Source 3 + Source 4 + Source 5) / 5
These are the editable Inputs for Plots:
"Jaw/ Teeth/ Lips ???" = to arm / disarm the Lines
"Fill Line???" = to insert / de-sensitize the fill of the Long and Short Lines - Long = Lips> Teeth> Jaw - Short = Jaw> Teeth> Jaw - Neutral = rest
"Fill Background???" = to insert / desensit the background of the Long and Short Lines - Long = Lips> Teeth> Jaw - Short = Jaw> Teeth> Jaw - Neutral = rest
SUPER MACDthis indicator serves to differentiate the classic source of MACD and add the: DYNAMIC MACD and DYNAMIC BAND
with these inputs you can modify the inputs of the different Bar's, you can choose between:
Candles = classic Candles
Heikin Hashi
Kagi
Line break
Pointfigure
Renko
To use the Dynamic Macd and Band just check the box:
Use Dynamic Rsi??? = this input will change the Rsi in the Dynamic Rsi
Use Dynamic Band??? = this input will change the Bands to the Dynamic Band
Selecting the input: "Use Different Source ???" you can use a source with multiple elements of your choice:
2 = (Source 1 + Source 2) / 2
3 = (Source 1 + Source 2 + Source 3) / 3
4 = (Source 1 + Source 2 + Source 3 + Source 4) / 4
5 = (Source 1 + Source 2 + Source 3 + Source 4 + Source 5) / 5
srcCalcLibrary "srcCalc"
Provides functions for converting input strings 'open','high','low','close','hl2','hlc3','ohlc4','hlcc4' to corresponding source values.
get_src(src)
Converts string to source float value
Parameters:
src : String to use (`close` is used if no argument is supplied).
Returns: Returns the float value of the string
Combo VIX and DXYHello traders
It's been a while :)
I wanted to share a cool script that you can use for any asset class.
The script isn't really special - though what it displays is super helpful
Volatility Index $VIX
(Source: Wikipedia)
VIX is the ticker symbol and the popular name for the Chicago Board Options Exchange's CBOE Volatility Index, a popular measure of the stock market's expectation of volatility based on S&P 500 index options.
It is calculated and disseminated on a real-time basis by the CBOE, and is often referred to as the fear index or fear gauge.
I consider that a $VIX above 30% is a very bearish signal.
Above 30% translating investors selling in masse their assets. #blood #on #the #street
Dollar Index $DXY
(Source: Wikipedia)
The U.S. Dollar Index (USDX, DXY, DX, or, informally, the "Dixie") is an index (or measure) of the value of the United States dollar relative to a basket of foreign currencies, often referred to as a basket of U.S. trade partners' currencies.
The Index goes up when the U.S. dollar gains "strength" (value) when compared to other currencies.
The index is designed, maintained, and published by ICE (Intercontinental Exchange, Inc.), with the name "U.S. Dollar Index" a registered trademark.
It is a weighted geometric mean of the dollar's value relative to following select currencies:
Euro (EUR), 57.6% weight
Japanese yen (JPY) 13.6% weight
Pound sterling (GBP), 11.9% weight
Canadian dollar (CAD), 9.1% weight
Swedish krona (SEK), 4.2% weight
Swiss franc (CHF) 3.6% weight
In "bear markets", the $DXY usually goes up.
People are selling their hard assets to get some $USD in return - pumping the $DXY higher
Corollary
I'm not sure which one happens first between a bearish $DXY or bearish $DXY... though both are usually correlated
If:
- $VIX goes above 30%, usually $DXY increases and assets versus the good old' $USD drop
- $VIX goes below 30%, usually $DXY decreases and assets versus the good old' $USD increases
This is a nice lever effect between both the $VIX, $DXY and the assets versus the $USD
That's being said, I don't only use those 2 information to enter in a trade.
It gives me though a strong confirmation whenever I'm long or short
Imagine I get a LONG signal but the combo $VIX + $DXY is bearish... this tells me to be cautious and to:
- enter at a pullback
- protect my position quickly at breakeven
- take my profit quick
For a mega bull market (some called it hyperinflation), you want your fiat to drop in value for the counter-asset to increase in value.
And before you ask.... yes I look at what $DXY is doing before taking a trade on $BTCUSD :)
In other words, $DXY going down is quite bullish for Bitcoin.
Settings and Alerts
The settings by default are the ones I use for my trading.
The background colors will be colored whenever the COMBO is bullish (green) or bearish (red)
Alerts are enabled using the brand new alert function published last week by @TradingView
That's it for today, I hope you'll like it :)
PS: In this chart above, I'm using the Supertrend indicator from @KivancOzbilgic
Dave
Dual EMA/SMA + Cross [SH]
I was missing an indicator that could show both an EMA and an MA with selectable source (open, close etc.) at the same time.
- Individually selectable EMA or MA.
- Option to highlight the bar where the MA's cross.
- Individually selectable source.
Not being pro it makes sense to have several indicators in one.
I hope someone finds this indicator useful.
Shaslund
The Lark: Directional Movement IndexAn open source version of the DMI. Mostly published for other scripters to modify.
Typical useage: www.investopedia.com