This is a very simple script which can be used as measure to define your trading zones based on volatility.
This script tries to identify the area of low and high volatility based on comparison between Bandwidth of higher length and ATR of lower length.
Relative Bandwidth = Bandwidth / ATR
Bandwidth can be based on either Bollinger Band, Keltner...
Before getting into the script, I would like to explain bit of history around this project. Wolfe was in the back of my mind for some time and I had several attempts so far.
When I first developed harmonic patterns, I got many requests from users to develop script to automatically detect Wolfe formation. I thought it would be easy and started...
Here is a small attempt to automatically identify wedges and flags.
Tradingview standard wedge checks for only 4 pivots. In this version, I have considered 5 pivots instead - which can help reduce noise as 4 pivots forming wedge can be quite common. In future, will also try to add more pivots in pattern recognition to make the signal more accurate.
Few essentials captured together (subset of arrayutils)
finds difference between two timestamps
timeStart : start timestamp
endTime : end timestamp
check_overflow(pivots, barArray, dir)
finds difference between two timestamps
pivots : pivots array
Recursive Zigzag Using Matrix allows to create zigzags recursively on multiple levels. After bit of consideration, decided to make this public.
zigzag(length, ohlc, numberOfPivots, offset)
calculates plain zigzag based on input
length : Zigzag Length
ohlc : Array containing ohlc values. Can also contain custom...
Combining Multizigzag with harmonic patterns - this script generates harmonic patterns based on multiple deapth zigzags.
Input parameter allows to chose which Zigzag to be included in pattern identification and set different length, line color, width and style for each Zigzag combinations.
Pattern rules are as below:
xab = 0.618
0.382 <= abc...
I may not be able to spend much time on the harmonic patterns and realized that there are not much open source scripts on them either. Hence, decided to release open source version which can be used by other developers for reference and build things on top of it.
Original script is protected and can be found here:
Logical ratios of patterns are coded as below:...
This is a supertrend with slight twisted concept which can be very benefecial in strong trending markets to reduce stop loss distance and exit slightly quicker.
▶ When the instrument is trending up, regular ATR shows high values if there are big green candles. This affect the stoploss distance in regular supertrend which leads to wide stops or delayed...
I started off with the intention of creating script to identify Wolfe wave projection. But, soon ran into problem with loops. Realized drawing wedge is more difficult than drawing converging triangle. Hence, took a step back and started working on wedges and triangle identification. Ended up with a messy output which looked like this.
Had to take another step...
Lets make things bit complicated.
Main difference between this script and the earlier Multi Zigzag Harmonic Pattern is the calculation logic of Zigzag 2, 3 and 4
In the earlier script, all zigzags were plain and were calculated on the basis of different lengths. (Such as 5, 10, 15, 20). These were derived on the basis of Multi Zigzag indicator
Here is my first attempt on defining volume profile. In this script, I am using new feature of pine security_lower_tf
Upon loading the script, it will ask users to select Time range to show the volume profile. Once you select the time range, confirmation input will popup. Upon confirming the inputs, you will be able to view the volume profile
simple utility to draw different candles using box and lines. Quite useful for drawing candles such as zigzag candles or MTF candles
draw(o, h, l, c, oBar, cBar)
draws candles based on ohlc values
o : Open Price
h : High Price
l : Low Price
c : Close Price
oBar : Open Time
cBar : Close...
Back to my favourite topic - Zigzags.
Here is an indicator which can help you visualise volume data on Zigzag swing highs and lows.
Settings are pretty simple and provides variety of display options
Display options are as demonstrated in the chart has following main types.
Plus/Minus - Stacked
Plus/Minus - Overlapping
Plus/Minus - Opposite...
Another attempt on making use of CM-Williams-Vix-Fix-Finds-Market-Bottoms from Chris Moody - which is arguably one of the best indicator available on pine and tradingview platform. Every time I revisit this, I get new ideas on applying this method.
I have slightly altered formula to
from the original formula
Library contains utility functions using arrays.
remove an item from array at specific index. Also deletes the item
arr : - array from which the item needs to be deleted
index : - index of item to be deleted
remove the last item from array. Also deletes the...
In regular scenario divergence calculation follows these procedure
Pivots on price are considered as primary source
They are compared with pivots on oscillators
Trend bias of price is used
This is an experimental version where
Pivots on oscillators are considered as primary source
They are compared with pivots on price
This is slightly different implementation of RSI using arrays. But, it also comes with a twist.
Formula for standard RSI can be found here: www.investopedia.com
If there is green candle, gain for the candle is equal to price movement from previous bar and loss for that candle is 0. Similarly in case of red candle, loss is considered to be movement from...
This is an experimental study aimed to find historical patterns of current trend movement.
▶ Derive zigzag pivots based on Length and Source
▶ Based on the Loopback Pivot settings devise a pattern string based on predetermined language which correlates all the pivots within the given range.
▶ Preserve pattern in an array along with bar index