This is my first attempt on implementing a statistical method. This problem was given to me by @lejmer (who also helped me later on building more efficient code to achieve this) when we were debating on the need for higher resource allocation to run scripts so it can run longer and faster. The major problem faced by those who want to implement statistics based...
Library "HSupertrend" Supertrend implementation based on harmonic patterns hsupertrend(zProperties, pProperties, errorPercent, showPatterns, patternColor) derives supertrend based on harmonic patterns Parameters: zProperties : ZigzagProperties containing Zigzag length and source array pProperties : PatternProperties used for calculation ...
Extending the earlier implemented concept of Harmonic-Patterns-Based-Trend-Follower , in this script, lets make it work as supertrend so that it is more easier to operate. 🎲 Process 🎯 Derive Zigzag and scan harmonic patterns for last 5 confirmed pivots 🎯 If a pattern is found, bullish and bearish zones are calculated based on parameter Base 🎯 These bullish and...
Earlier this week, published an idea on how harmonic patterns can be used for trend following. This script is an attempt to implement the same. 🎲 Process 🎯 Derive Zigzag and scan harmonic patterns for last 5 confirmed pivots 🎯 If a pattern is found, highest point of pattern will become the bullish zone and lower point of the pattern will become bearish zone. 🎯...
Similar to RelativeBandwidthFilter , this script is also a simple trend filter which can be used to define your trading zone. 🎲 Concept On contrary to reversal mindset, we define trend when price hits either side of the band. If close price hits upper band then it is considered as bullish and if close price hits lower band, then it is considered bearish....
Hello Everyone, Wish you all Merry X-Mas and happy new year. Lets start 2023 with fresh new strategy built on Wolfe Indicator. Details of the indicator can be found here 🎲 Wolfe Concept Wolfe concept is simple. Whenever a wedge is formed, draw a line joining pivot 1 and 4 as shown in the chart below: For simplicity, we will only consider static value for...
🎲 Concept Zigzag is built based on the price and number of offset bars. But, in this experiment, we build zigzag based on different bands such as Bollinger Band, Keltner Channel and Donchian Channel. The process is simple: 🎯 Derive bands based on input parameters 🎯 High of a bar is considered as pivot high only if the high price is above or equal to upper...
Library "BinaryInsertionSort" Library containing functions which can help create sorted array based on binary insertion sort. This sorting will be quicker than array.sort function if the sorting needs to be done on every bar and the size of the array is comparatively big. This is created with the intention of using this to solve a bigger problem posted by...
This is an attempt to develop alternative visualisation of financial charts. This script also makes use of new pine feature types which represents User Defined Object Types. You can refer to below documentation to understand more about this feature: www.tradingview.com www.tradingview.com 🎲 Structure of new chart components 🎯Instead of candles/bars,...
Library "ta" Collection of all custom and enhanced TA indicators. Same as enhanced_ta. But, removed all the displays to make it faster. ma(source, maType, length) returns custom moving averages Parameters: source : Moving Average Source maType : Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median ...
Still experimental. Extending further on the divergence backtest results - in this script we try to project next 2 pivots (including one unconfirmed pivot) 🎲 Previous experiments 1. Divergence-Backtester 2. Divergence-Backtester-V2 🎲 Additions Apart from collecting the stats on number of occurrences of HH, HL, LH, LL - this script also keeps track of...
Further attempts to study divergence impact on price in shorter terms. Previous study can be found here: In this script, we are trying to gather the stats based on last two pivot state together. For example, Individual table of Pivot High Projection is as explained below: But, by looking at the bigger picture, we can further estimate following things...
Library "strategy" Library containing few key calculations for strategy involving leveraged limit and stop orders getQty(entry, stop, riskPercentage) calculate qty and leverage based on entry and stop price for given risk percentage. Parameters: entry : Entry Price stop : Stop Price riskPercentage : risk percentage per trade Returns: -...
Using moving average crossover for identifying the change in trend is very common. However, this method can give lots of false signals during the ranging markets. In this algorithm, we try to find the extreme trend by looking at fully aligned multi-level moving averages and only look at moving average crossover when market is in the extreme trend - either bullish...
Micro zigzag is created based on similar concepts as that of zigzag but by using lower timeframe intra-bar data. The lines join candle's high/low points but also depict how the price movement within the candle happened. That is, if the high of the candle is reached first, pivot from previous candle join the high first and then low and vice versa. The output can...
Further development on the sub-candle concept defined in the earlier script. SubCandle This time instead of concentrating only on the last part, we are dividing the main candle into three parts. First Sub-Candle - Covers the candle movement from open to first of highest/lowest point. First sub-candle tells how fast/slow the initial movement took place and...
I created this script as POC to handle specific cases where not having tick data on historical bars create repainting. Happy to share if this serves purpose for other coders. What is the function of this script? Script plots a sub-candle which is remainder of candle after forming the latest peak. Higher body of Sub-candle refers to strong retracement of...
This is a very simple script which can be used as measure to define your trading zones based on volatility. Concept 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...