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...
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:...
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...
A friendly reminder to myself and rest of the traders that market can stay low for prolonged time!!
Details are pretty simple.
Here is small comparison of the stats for major US indices.
Can also be applied to stocks. Cells are highlighted in red background ii
Drawdown/Recovery is still in progress for historical stats
Nothing fancy. Just converted the new matrix library of zigzags ( mZigzag ) into indicator as I sensed it can be useful as indicator.
On top of the standard zigzag, the indicator also tracks given oscillators, moving average and volume indicators on each pivots. More indicators can be added programmatically - but it will take up space in chart. Hence, so far I...
Library provides an alternative method to scan harmonic patterns. This is helpful in reducing iterations. Republishing as new library instead of existing eHarmonicpatterns because I need that copy for existing scripts.
scan_xab(bcdRatio, err_min, err_max, patternArray) Checks if bcd ratio is in range of any harmonic...
Matrix implementation of zigzag to allow further possibilities.
Main advantage of this library over previous zigzag methods is that you can attach any number of indicator/oscillator information to zigzag
calculate(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots) calculates zigzag and related information
I got this idea from @fikira's script Intrabar-Price-Volume-Change-experimental
The indicator calculates OBV and PVT based on ticks. Since, the indicator relies on live ticks, it only starts execution after it is put on the charts. The script can be useful in analysing intraday buy and sell pressure. Details are color coded based on the values.
⬜ The script is intended to cover few things.
▶ Strategy testing framework based on eStrategy library
▶ Using historicalrange of values for identifying better entry and exits.
This is also built on top of the Systematic Investment Plan script published here
⬜ Strategy testing framework
Strategy testing framework is different from tradingview...
Library contains methods which can help build custom strategy for continuous investment plans and also compare it with systematic buy and hold.
sip(startYear, initialDeposit, depositFrequency, recurringDeposit, buyPrice) Depicts systematic buy and hold over period of time
startYear : Year on which SIP is started
Library provides an alternative method to scan harmonic patterns. This is helpful in reducing iterations
scan_xab(bcdRatio, err_min, err_max, patternArray) Checks if bcd ratio is in range of any harmonic pattern
bcdRatio : AB/XA ratio
err_min : minimum error threshold
err_max : maximum error...
Tradingview default strategy tester has few limitations. To name some:
Tradingview default strategy tester does not have option for periodic investment.
Does not allow reduce and refill kind of operations.
Comparison to buy and hold equity does not take into consideration on number of days invested
Hence, I created this as base for my further...
Library contains utility functions using arrays.
delete( arr , index)
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
pop( arr )
remove the last item from array. Also deletes the...