Rules of Motive WavesMotive Waves are the components of Elliot Wave structure. Motive Waves consists of 5 sub-waves of which 3 are impulse (In the direction of trend) and 2 corrective waves. The Motive Wave in the upward direction will start with Swing High, Ends with Swing High and consists of 3 Higher Highs and 2 Higher Lows representing strong upward trend. Motive Wave in the downward direction will start with Swing Low, Ends with Swing low and consists of 3 Lower Lows and 2 Lower Highs representing strong downward trend.
🎲 Types of Motive Waves
Motive Waves are broadly classified by two types:
Impulse Waves
Diagonal Waves
Diagonal Waves are further classified into Contracting and Expanding Diagonals. These can fall into the category of either leading diagonal and ending diagonal.
🎲 Rules of Motive Waves
🎯 Generic Rule of any motive waves are as follows
Should consist of 5 alternating waves. (Swing High followed by Swing low and vice versa)
This can start from Swing High and end in Swing High or start from Swing Low and end in Swing Low.
Wave-2 should not move beyond Wave-1. This means, the Wave-2 is always shorter than Wave-1 with respect to distance between the price of start and end.
Wave-3 always moves beyond Wave-1. This means, the Wave-3 is always longer than Wave-2 in terms of price
Among Wave-1, Wave-3, and Wave-5, Wave-3 is never the shortest one. This means, either Wave-1 or Wave-5 can be longer than Wave-3 but not both. Wave-3 can also be longest among the three.
Here is the pictorial representation of the rules of the Motive Waves
For a wave to be considered as motive wave, it also needs to follow the rules of either impulse or diagonal waves.
🎯 Rules for a 5 wave pattern to be considered as Impulse Wave are:
Wave-4 never overlaps with Wave-1 price range
Wave-1, Wave-3 and Wave-5 should not be either expanding or contracting. Meaning, we cannot have Wave-1 > Wave-3 > Wave-5 , and we cannot have Wave-1 < Wave-3 < Wave-5
Pictorial representation of the impulse wave rules are as below:
🎯 Rules for the Diagonal Waves are as follows
Contrary to the first rule of impulse wave, in case of diagonal wave, Wave-4 always overlaps with Wave-1 price range.
Wave-1, Wave-3 and Wave-5 are either in expanding formation or contracting formation. That means, we need to have either Wave-1 > Wave-3 > Wave-5 OR Wave-1 < Wave-3 < Wave-5
Pictorial representation of the Contracting Diagonal Wave is as below. Here, the Wave-1, Wave-3 and Wave-5 are in contracting formation.
Pictorial representation of the Expanding Diagonal Wave is as below. Here, the Wave-1, Wave-3 and Wave-5 are in expanding formation.
Hewhomustnotbenamed
Trading Diverging Chart PatternsContinuing our discussion on trading chart patterns, this is our next tutorial after Trading Converging Chart Patterns
This tutorial is based on our earlier articles on pattern identification and classification.
Algorithmic Identification of Chart Patterns
Flag and Pennant Chart Patterns
In this tutorial, we concentrate on diverging patterns and how to define rules to trade them systematically. The diverging patterns discussed in this tutorial are:
Rising Wedge (Diverging Type)
Falling Wedge (Diverging Type)
Diverging Triangle
Rising Triangle (Diverging Type)
Falling Triangle (Diverging Type)
🎲 Historical Bias and General Perception
Before we look into our method of systematic trading of patterns, let's have a glance at the general bias of trading diverging patterns.
🟡 The Dynamics of Diverging Wedge Patterns
Diverging Wedge patterns are typically indicative of the Elliott Wave Structure's diagonal waves, potentially marking the ending diagonal waves. That means that the patterns may signal the ending of a long term trend.
Hence, the diverging rising wedge is considered as bearish, whereas the diverging falling wedge is considered as bullish when it falls under Wave 5 of an impulse or Wave C of a zigzag or flat.
For an in-depth exploration, refer to our detailed analysis in Decoding Wedge Patterns
Both rising wedge and falling wedge of expanding type offers lower risk reward (High risk and low reward) in short term as the expanding nature of the pattern will lead to wider stop loss.
🎯 Rising Wedge (Expanding Type)
Expanding Rising Wedge pattern is historically viewed with bearish bias.
🎯 Falling Wedge (Expanding Type)
Expanding Falling Wedge pattern is historically viewed with bullish bias.
🟡 The Dynamics of Diverging Triangle Patterns
Diverging pattern in general means increased volatility. Increased volatility during the strong trends also mean reducing confidence that may signal reversal.
🎲 Alternate Approach towards trading diverging patterns
Lack of back testing data combined with subjectivity in Elliott wave interpretation and pattern interpretation makes it difficult to rely on the traditional approach. The alternative method involves treating all expanding patterns equally and define a systematic trading approach. This involves.
When the pattern is formed, define a breakout zone. One side of the breakout zone will act as breakout point and the other side will act as reversal point.
Depending on the breakout or reversal, trade direction is identified. Define the rules for entry, stop, target and invalidation range for both directions. This can be based on specific fib ratio based on pattern size.
Backtest and Forward test the strategy and collect data with respect to win ratio, risk reward and profit factor to understand the profitability of patterns and the methodology.
Breaking it down further.
🟡 Defining The Pattern Trade Conditions
Base can be calculated in the following ways.
Distance between max and min points of the pattern. (Vertical size of the pattern)
Last zigzag swing of the pattern (This is generally the largest zigzag swing of the pattern due to its expanding nature)
This Base is used for calculation of other criteria.
🎯 Breakout Zone - Entry Points
Breakout zone can be calculated based on the following.
Long Entry (top) = Last Pivot + Base * (Entry Ratio)
Short Entry (bottom) = Last Pivot - Base * (Entry Ratio)
If the direction of the last zigzag swing is downwards, then top will form the reversal confirmation and bottom will form the breakout confirmation. Similarly, if the direction of the last zigzag swing is upwards, then top will become the breakout confirmation point and bottom will act as reversal confirmation point.
🎯 Stops
Long entry can act as stop for short and vice versa. However, we can also apply different rule for calculation of stop - this includes using different fib ratio for stop calculation in the reverse direction.
Example.
Long Stop = Last Pivot - Base * (Stop Ratio)
Short Stop = Last Pivot + Base * (Entry Ratio)
🎯 Invalidation
Invalidation price is a level where the trade direction for a particular pattern needs to be ignored or invalidated. Invalidation price can be calculated based on specific fib ratios. It is recommended to use wider invalidation range. This is to protect ignoring the potential trades due to volatility.
Long Invalidation Price = Last Pivot - Base * (Invalidation Ratio)
Short Invalidation Price = Last Pivot + Base * (Invalidation Ratio)
🎯 Targets
Targets can either be set based on fib ratios, as explained for other parameters. However, the better way to set targets is based on expected risk reward.
Target Price = Entry + (Entry-Stop) X Risk Reward
🟡 Back Test and Forward Test and Measure the Profit Factor
It is important to perform sufficient testing to understand the profitability of the strategy before using them on the live trades. Use multiple timeframes and symbols to perform a series of back tests and forward tests, and collect as much data as possible on the historical outcomes of the strategy.
Profit Factor of the strategy can be calculated by using a simple formula
Profit Factor = (Wins/Losses) X Risk Reward
🟡 Use Filters and Different Combinations
Filters will help us in filtering out noise and trade only the selective patterns. The filters can include a simple logic such as trade long only if price is above 200 SMA and trade short only if price is below 200 SMA. Or it can be as complex as looking into the divergence signals or other complex variables.
Trading Converging Chart PatternsWe discussed identification and classification of different chart patterns and chart pattern extensions in our previous posts.
Algorithmic Identification of Chart Patterns
Flag and Pennant Chart Patterns
In this installment, we shift our focus towards the practical trading strategies applicable to a select group of these patterns. Acknowledging that a universal trading rule cannot apply to all patterns, we narrow our examination to those of the converging variety.
We will specifically address the following converging patterns:
Rising Wedge (Converging Type)
Falling Wedge (Converging Type)
Converging Triangle
Rising Triangle (Converging Type)
Falling Triangle (Converging Type)
This selection will guide our discussion on how to approach these patterns from a trading perspective.
🎲 Historical Bias and General Perception
Each pattern we've discussed carries a historical sentiment that is widely regarded as a guideline for trading. Before we delve into our specific trading strategies, it's crucial to understand these historical sentiments and the general market interpretations associated with them.
🟡 The Dynamics of Contracting Wedge Patterns
Contracting Wedge patterns are typically indicative of the Elliott Wave Structure's diagonal waves, potentially marking either the beginning or conclusion of these waves. A contracting wedge within a leading diagonal may experience a brief retracement before the trend resumes. Conversely, if found in an ending diagonal, it could signal the termination of wave 5 or C, possibly hinting at a significant trend reversal.
The prevailing view suggests that these patterns usually precede a short-term directional shift: Rising Wedges are seen as bearish signals, while Falling Wedges are interpreted as bullish. It's essential to consider the trend prior to the formation of these patterns, as it significantly aids in determining their context within the Elliott Wave cycles, specifically identifying them as part of waves 1, A, 5, or C.
For an in-depth exploration, refer to our detailed analysis in Decoding Wedge Patterns
🎯 Rising Wedge (Converging Type)
The Rising Wedge pattern, historically viewed with a bearish bias, suggests that a downward trend is more likely upon a breakout below its lower trend line. This perception positions the pattern as a signal for traders to consider bearish positions once the price breaks through this critical support.
🎯 Falling Wedge (Converging Type)
The Falling Wedge pattern is traditionally seen through a bullish lens, indicating potential upward momentum when the price surpasses its upper trend line. This established viewpoint suggests initiating long positions as a strategic response to such a breakout, aligning with the pattern's optimistic forecast.
🟡 Contracting Triangle Patterns
Contracting Triangles, encompassing Converging, Ascending, and Descending Triangles, are particularly noteworthy when they appear as part of the Elliott Wave's B or 2 waves. These patterns typically signal a continuation of the pre-existing trend that preceded the triangle's formation. This principle also underpins the Pennant Pattern, which emerges following an impulse wave, indicating a pause before the trend's resumption.
🎲 Alternate Way of Looking into Converging Patterns
Main issue with historical perception are:
There is no clear back testing data to prove whether the general perception is correct or more profitable.
Elliott Waves concepts are very much subjective and can be often difficult for beginners and misleading even for experts.
So, the alternative way is to treat all the converging patterns equally and devise a method to trade using a universal way. This allows us to back test our thesis and be definitive about the profitability of these patterns.
Here are our simple steps to devise and test a converging pattern based strategy.
Consider all converging patterns as bidirectional. Meaning, they can be traded on either side. Thus chose to trade based on the breakout. If the price beaks up, then trade long and if the price breaks down, then trade short.
For each direction, define criteria for entry, stop, target prices and also an invalidation price at which the trade is ignored even without entry.
Backtest and Forward test the strategy and collect data with respect to win ratio, risk reward and profit factor to understand the profitability of patterns and the methodology.
Now, let's break it further down.
🟡 Defining The Pattern Trade Conditions
Measure the ending distance between the trend line pairs and set breakout points above and beyond the convergence zone.
🎯 Entry Points - These can be formed on either side of the convergence zone. Adding a small buffer on top of the convergence zone is ideal for setting the entry points of converging patterns.
Formula for Entry can be:
Long Entry Price = Top + (Top - Bottom) X Entry Ratio
Short Entry Price = Bottom - (Top-Bottom) X Entry Ratio
Whereas Top refers to the upper side of the convergence zone and bottom refers to the lower side of the convergence zone. Entry Ratio is the buffer ratio to apply on top of the convergence zone to get entry points.
🎯 Stop Price - Long entry can act as stop for short orders and the short entry can act as stop price for long orders. However, this is not mandatory and different logic for stops can be applied for both sides.
Formula for Stop Can be
Long Stop Price = Bottom - (Top - Bottom) X Stop Ratio
Short Stop Price = Top + (Top - Bottom) X Stop Ratio
🎯 Target Price - It is always good to set targets based on desired risk reward ratio. That means, the target should always depend on the distance between entry and stop price.
The general formula for Target can be:
Target Price = Entry + (Entry-Stop) X Risk Reward
🎯 Invalidation Price - Invalidation price is a level where the trade direction for a particular pattern needs to be ignored or invalidated. This price need to be beyond stop price. In general, trade is closed when a pattern hits invalidation price.
Formula for Invalidation price is the same as that of Stop Price, but Invalidation Ratio is more than that of Stop Ratio
Long Invalidation Price = Bottom - (Top - Bottom) X Invalidation Ratio
Short Invalidation Price = Top + (Top - Bottom) X Invalidation Ratio
🟡 Back Test and Forward Test and Measure the Profit Factor
It is important to perform sufficient testing to understand the profitability of the strategy before using them on the live trades. Use multiple timeframes and symbols to perform a series of back tests and forward tests, and collect as much data as possible on the historical outcomes of the strategy.
Profit Factor of the strategy can be calculated by using a simple formula
Profit Factor = (Wins/Losses) X Risk Reward
🟡 Use Filters and Different Combinations
Filters will help us in filtering out noise and trade only the selective patterns. The filters can include a simple logic such as trade long only if price is above 200 SMA and trade short only if price is below 200 SMA. Or it can be as complex as looking into the divergence signals or other complex variables.
Flag and Pennant Chart Patterns🎲 An extension to Chart Patterns based on Trend Line Pairs - Flags and Pennants
After exploring Algorithmic Identification and Classification of Chart Patterns , we now delve into extensions of these patterns, focusing on Flag and Pennant Chart Patterns. These patterns evolve from basic trend line pair-based structures, often influenced by preceding market impulses.
🎲 Identification rules for the Extension Patterns
🎯 Identify the existence of Base Chart Patterns
Before identifying the flag and pennant patterns, we first need to identify the existence of following base trend line pair based converging or parallel patterns.
Ascending Channel
Descending Channel
Rising Wedge (Contracting)
Falling Wedge (Contracting)
Converging Triangle
Descending Triangle (Contracting)
Ascending Triangle (Contracting)
🎯 Identifying Extension Patterns.
The key to pinpointing these patterns lies in spotting a strong impulsive wave – akin to a flagpole – preceding a base pattern. This setup suggests potential for an extension pattern:
A Bullish Flag emerges from a positive impulse followed by a descending channel or a falling wedge
A Bearish Flag appears after a negative impulse leading to an ascending channel or a rising wedge.
A Bullish Pennant is indicated by a positive thrust preceding a converging triangle or ascending triangle.
A Bearish Pennant follows a negative impulse and a converging or descending triangle.
🎲 Pattern Classifications and Characteristics
🎯 Bullish Flag Pattern
Characteristics of Bullish Flag Pattern are as follows
Starts with a positive impulse wave
Immediately followed by either a short descending channel or a falling wedge
Here is an example of Bullish Flag Pattern
🎯 Bearish Flag Pattern
Characteristics of Bearish Flag Pattern are as follows
Starts with a negative impulse wave
Immediately followed by either a short ascending channel or a rising wedge
Here is an example of Bearish Flag Pattern
🎯 Bullish Pennant Pattern
Characteristics of Bullish Pennant Pattern are as follows
Starts with a positive impulse wave
Immediately followed by either a converging triangle or ascending triangle pattern.
Here is an example of Bullish Pennant Pattern
🎯 Bearish Pennant Pattern
Characteristics of Bearish Pennant Pattern are as follows
Starts with a negative impulse wave
Immediately followed by either a converging triangle or a descending converging triangle pattern.
Here is an example of Bearish Pennant Pattern
🎲 Trading Extension Patterns
In a strong market trend, it's common to see temporary periods of consolidation, forming patterns that either converge or range, often counter to the ongoing trend direction. Such pauses may lay the groundwork for the continuation of the trend post-breakout. The assumption that the trend will resume shapes the underlying bias of Flag and Pennant patterns
It's important, however, not to base decisions solely on past trends. Conducting personal back testing is crucial to ascertain the most effective entry and exit strategies for these patterns. Remember, the behavior of these patterns can vary significantly with the volatility of the asset and the specific timeframe being analyzed.
Approach the interpretation of these patterns with prudence, considering that market dynamics are subject to a wide array of influencing factors that might deviate from expected outcomes. For investors and traders, it's essential to engage in thorough back testing, establishing entry points, stop-loss orders, and target goals that align with your individual trading style and risk appetite. This step is key to assessing the viability of these patterns in line with your personal trading strategies and goals.
It's fairly common to witness a breakout followed by a swift price reversal after these patterns have formed. Additionally, there's room for innovation in trading by going against the bias if the breakout occurs in the opposite direction, specially when the trend before the formation of the pattern is in against the pattern bias.
🎲 Cheat Sheet
Thinking in Pine - Study References Too Many Bars In the HistoryWelcome to "Thinking in Pine" short video series on the topics of Pine Script.
Today's topic is handling the error - "The study references too many candles in the history" and other bar_index related issues.
If you are not familiar with Pine Script time series concepts, please go through our previous videos.
Thinking in Pine - Time Series
Thinking in Pine - Special Cases of Time Series
🎲 Points Discussed
When do we get the error "Study references too many candles in the history" and how to overcome this issue.
bar_index limitations with drawing objects on the chart.
🎯 Example Program - Historical Reference Alternative Implementation
// When we are trying to refer to history more than or equal to 10000 bars older
// float value = close
// plot(value)
// Alternative implementation
var values = array.new()
values.unshift(close)
// Throws error on first bar since the number of items is less than 10000
// float valueFromArray = values.get(10000)
// plot(valueFromArray)
//Option 1 - Get the last available value when the number of bars available is less than 10000
float valueFromArray1 = values.get(math.min(bar_index, 10000))
plot(valueFromArray1)
// Option 2 - If number of available bars less than 10000, then set value to na else get the value of 10000 bars back
float valueFromArray2 = values.size() <= 10000? na : values.get(10000)
plot(valueFromArray2)
🎯 Example Program - Drawing Object Limitations with Bar Index
// Trying to create a line too far in history or in future
// if(barstate.islast)
// Throws error as can only draw upto 9999 bars before
// ln1 = line.new(bar_index, high, bar_index-10000, high)
// Throws error as we can only draw upto 500 bars in the future.
// ln2 = line.new(bar_index, high, bar_index+501, high)
startingPoint = ta.valuewhen(bar_index == last_bar_index-10000, time, 0)
float price = 0.0
if(barstate.islast)
// However, we can draw more than 10000 bars back or more than 500 bars in the future using time instead of bar _index
ln = line.new(time, high, startingPoint, high, xloc=xloc.bar_time)
// Cannot use line.get_price when the line is drawn using xloc = xloc.bar_time
// price := ln.get_price(last_bar_index-5000)
Algorithmic Identification and Classification of Chart PatternsWelcome to the world of technical analysis, where chart patterns play a pivotal role in shaping trading strategies. This is an ultimate guide designed to help users objectively identify the existence of patterns, define the characteristics and classify them. In this discussion, we will mainly concentrate on the patterns formed by trend line pairs. This includes wedges, triangles and channel type patterns.
🎲 Basic Principle of Identifying the Pattern
It is very important to apply definitely set of rules when identifying the patterns in order to avoid biases or fitting patterns to our opinions. The dangers of overfitting the patterns to our bias is documented in the idea
To identify the patterns objectively, we need to set some ground rules or follow a well-defined technique to derive the patterns. Here is the technique we follow to identify chart patterns.
🎲 Only Indicator Required - Zigzag
Tradingview has plenty of free community scripts for Zigzag indicator. For this demonstration, we are going to use our Multi Timeframe Recursive Zigzag implementation.
Once the indicator is loaded on the chart, go to indicator settings and perform these modifications.
Disable the Labels : The Labels contain information that is needed for this exercise.
Set the Highlight level to 1 or 0 : We can iteratively increase the level and check next levels on the go.
You can also adjust Zigzag Length and Depth Parameters.
🎲 Scanning and Identification of valid Pattern
We can either use 5 pivots or 6 pivots for pattern identification. 5-Pivot based scanning will generate more patterns than 6-Pivot based scanning. 6 pivot patterns are geometrically more accurate however, there is no proof that 6-Pivot based patterns produce better trading outcome.
🎯 Step 1 - On each level of zigzag, mark the last 5 or 6 zigzag pivots.
Since we are using Multi Timeframe Recursive Zigzag implementation, we can gradually increase the zigzag level from 0. This means that on every level, we can check if there are any patterns.
On each level - consider only the last 5 or 6 pivots and mark them on the chart.
Markings on Level 0 would look like this for 5 and 6 pivot scanning
🎯 Step 2: Draw Trend Lines
As part of this step, draw two trend lines.
The first trend line will join pivots 1 and 5 marked in the previous step.
The second trend line will join pivots 2 and 4 marked in the previous step for 5 pivot scanning. For 6 pivot scanning, the trend line joining pivots 2 and 6 will be marked.
🎯 Step 3: Inspect the validity of trend lines
A valid trend line is the one that confirm to below two points
Touches all the alternate pivots. For example, the trend line drawn from pivot 1 to 5 should also make contact with the candle of pivot 3. In case of 6 pivot scanning, the trend drawn from pivot 2 to 6 should also make contact with the candle of pivot 4.
All the candles from the starting pivot to ending pivot of the zigzag should be confined within the trend line pairs. Meaning, no candles should completely go above the upper trend line and no candle should completely go below the lower trend line.
Please note that while verifying the above points, minor adjustments in the alignment of the trend line can be made. Start and end of the trend line does not need to be on the high/low points of the candle, it can also be placed in any of the wick positions.
After adjusting the trend lines, in both type of scanning, we can see that the trend lines confirm to the above-mentioned rules. Hence, we have arrived with valid patterns in both types of scanning on the level 0 zigzag.
🎲 Classification of Patterns
Once the patterns are identified, they need to be classified into different types. We need to apply predetermined rules to objectively classify patterns into what they are. Everyone can build their own rules.
🎯 Properties of Derived Trend Lines
Before classifying the trend lines, we need to understand below properties of the derived trend lines.
▶ Direction of Individual Trend Lines
Both the trend lines needs to be individually classified among these categories
Rising - Trend Line is sharply rising up.
Falling - Trend Line is sharply falling down.
Flat - Trend Line is flat across the pivots.
Bi-Directional - Trend Lines are moving in opposite directions
Please note that, it is less probable for trend line to absolutely flat. Hence, allow angle to have certain degree of threshold to be considered as flat. For example, +- 10 degrees can be considered as flat.
Also, the angle of the trend line can further subjective based on how compressed the chart is. It is recommended to use either log/auto-scale or a specific formula based on ATR to identify the angle.
▶ Characteristic of the Trend Line Pairs
This parameter defines how both trend lines are aligned with respect to each other. Possible options are:
Converging - Trend Lines are converging and when extended towards the right will intersect at a visible distance.
Diverging - Trend Lines are diverging from each other and when extended towards the left will intersect at a visible distance.
Parallel - Trend Lines are almost parallel to each other and may not intersect to either right or to left at a visible distance.
To objectively identify the intersection distance, we further need to use some standard. Here are few options
Fixed Number of Bars : If the trend lines do not intersect to either left or right within X bars (Lets say 100), they can be considered as parallel. Otherwise, they can be classified as converging or diverging based on which side the intersection happens.
Relative to the Length of Pattern : If the length of longest trend line is X bars. The trend lines should converge within 1–2 times the X bars to be considered as converging or diverging. Or else, it can be termed as parallel channels.
🎯 Geometrical Shapes Classification
Following are the main geometrical classifications based on the characteristics of the trend lines and the pair.
Channels - Trend Lines are parallel to each other. And hence they both move in the same directions.
Wedges - Trend Lines are either converging or diverging from each other. However, both trend lines move in the same direction. Both trend lines will be either up or down.
Triangles - Trend Lines are either converging or diverging from each other. But, unlike wedges, upper and lower trend lines will have different direction.
🎲 Types of Patterns
Once we identify the direction and characteristics of trend lines, we can go on and classify the pattern in following categories.
Details below. Please note that examples are generated programmatically.
🎯 Rising Wedge (Contracting)
Rules for Contracting Rising Wedge are as follows:
Both Trend Lines are Rising
Trend Lines are converging.
🎯 Rising Wedge (Expanding)
Rules for the Expanding Rising Wedge are as follows:
Both Trend Lines are rising
Trend Lines are diverging.
🎯 Falling Wedge (Contracting)
Rules for the Contracting Falling Wedge are as follows:
Both Trend Lines are falling
Trend Lines are contracting.
🎯 Falling Wedge (Expanding)
Rules for the Expanding Falling Wedge are as follows:
Both Trend Lines are falling
Trend Lines are diverging.
🎯 Contracting/Converging Triangle
Rules for the Contracting Triangle are as follows
The upper trend line is falling
The lower trend line is rising
Naturally, the trend lines are converging.
🎯 Rising Triangle (Contracting)
The rules for the Contracting Rising Triangle are as follows
The upper trend line is flat
The lower trend line is rising
Naturally, the trend lines are converging towards each other
🎯 Falling Triangle (Contracting)
The rules for the Contracting Falling Triangle are as follows
The upper trend line is falling
The lower trend line is flat
Naturally, the trend lines are converging towards each other
🎯 Expanding/Diverging Triangle
Rules for the Expanding Triangle are as follows
The upper trend line is rising
The lower trend line is falling
Naturally, the trend lines are diverging from each other.
🎯 Rising Triangle (Expanding)
The rules for the Expanding Rising Triangle are as follows
The upper trend line is rising
The lower trend line is flat
Naturally, the trend lines are diverging from each other
🎯 Falling Triangle (Expanding)
The rules for the Expanding Falling Triangle are as follows
The upper trend line is flat
The lower trend line is falling
Naturally, the trend lines are diverging from each other
🎯 Rising/Uptrend Channel
Rules for the Uptrend Channel are as follows
Both trend lines are rising
Trend lines are parallel to each other
🎯 Falling/Downtrend Channel
Rules for the Downtrend Channel are as follows
Both trend lines are falling
Trend lines are parallel to each other
🎯 Ranging Channel
Rules for the Ranging Channel are as follows:
Both trend lines are flat
Naturally, the trend lines are parallel to each other.
Thinking in Pine - Tricks and Tips of DebuggingWelcome to "Thinking in Pine" short video series on the topics of Pine Script.
Today's discussion point is debugging and tools that Pine script provide us to debug our programs.
🎲 Points Discussed
Debugging using `plot` for numerical series values.
Using Pine Logs to debug for cases where `plot` is not suitable
🎯 Example Program - Debugging using plot
length = input.int(14, 'Length')
multiplier = input.float(4, 'Multiplier')
var dir = 1
var stopDistance = ta.atr(length) * multiplier
// Remove var to fix the first issue
// stopDistance = ta.atr(length) * multiplier
buyStopCurrent = close-stopDistance
sellStopCurrent = close + stopDistance
var buyStop = buyStopCurrent
var sellStop = sellStopCurrent
buyStop := dir > 0? math.max(buyStop, buyStopCurrent) : buyStopCurrent
sellStop := dir < 0? math.min(sellStop, sellStopCurrent) : sellStopCurrent
// Use nz to overcome na issues with math.max/ math.min
// buyStop := dir > 0? math.max(nz(buyStop, buyStopCurrent), buyStopCurrent) : buyStopCurrent
// sellStop := dir < 0? math.min(nz(sellStop, sellStopCurrent), sellStopCurrent) : sellStopCurrent
dir := dir == 1 and close < buyStop? -1 : dir == -1 and close > sellStop ? 1 : dir
// Plot statements used for debugging. display is set to display.data_window as the debugging plots do not need to appear on the charts
plot(stopDistance, 'Stop Distance', color.purple, display = display.data_window)
plot(buyStopCurrent, 'buyStopCurrent', color.red, display = display.data_window)
plot(sellStopCurrent, 'sellStopCurrent', color.green, display = display.data_window)
plot(buyStop, 'buyStop', color.red, display = display.data_window)
plot(sellStop, 'sellStop', color.green, display = display.data_window)
plot(dir, 'Direction', color.white, display = display.data_window)
plot(dir > 0? buyStop : sellStop, 'Supertrend', dir > 0? color.red : color.green)
🎯 Example Program - Pine Logs
sum = 0
arr = array.new()
for i = 0 to 10
sum+=i
// Log on every bar and also on every tick on real time
// log.info('Sum at iteration {0} is {1}', i, sum)
// Run only for the first bar
// if(barstate.isfirst)
// log.info('Sum at iteration {0} is {1}', i, sum)
// Run on the last confirmed bar
// if(barstate.islastconfirmedhistory)
// log.warning('Sum at iteration {0} is {1}', i, sum)
// if(barstate.isrealtime)
// log.warning('Sum at iteration {0} is {1}', i, sum)
// Display only once
// varip showLog = true
// if(barstate.isrealtime and showLog)
// log.warning('Sum at iteration {0} is {1}', i, sum)
// if (i == 10)
// showLog := false
// Extract through the array and log outside the loop
arr.push(sum)
// Log the extracted array on real time and print only once
varip showLog = true
if(barstate.isrealtime and showLog)
log.error('Sum at different iterations : {0}', arr)
showLog := false
plot(sum)
🎲 References
Pine Logs - Reference Manual
plot - Reference Manual
Thinking in Pine - Execution Model and Rollback on Realtime BarsHello All,
Welcome to another session of "Thinking in Pine" - short video tutorials on Pine Script.
Before continuing with this video, if you are not familiar with var, varip and regular variables, please watch our previous video - "Thinking in Pine - var, varip and regular variables"
🎲 Today's discussion points
How var, varip and regular variable modification code works with historical and real time bar updates.
Rollback concept of var variables
🎯 Example Program Used
// The statements execute on every tick
count = 0.0
count+=1
varip varipcount = 0 //executes only once on the first bar
varipcount+=1
// Reset counter on every bar
// if(barstate.isconfirmed)
// varipcount:=0
// Rollbacks and assigns on every tick
var varcount = 0.0 //executes only once on the first bar
varcount+=1
// varcount:=varcount -- Rollback
// varcount := varcount + 1 -- execute again
plot(varipcount, 'Varip Count')
plot(varcount, 'Var Count')
plot(count, 'Çount')
arrRegular = array.new()
var arrVar = array.new()
varip arrVarip = array.new()
if(bar_index >= last_bar_index -5)
arrRegular.push(close)
arrVar.push(close)
arrVarip.push(close)
log.info('Regular : {0}', arrRegular)
log.info('Var : {0}', arrVar)
log.info('Varip : {0}', arrVarip)
🎲 References
Pine Script® User Manual - Execution Model
Thinking in Pine - Functions Containing Var VariablesHello everyone, welcome back to "Thinking in Pine" short video tutorials. In this video, we have discussed special cases of using var variables inside function definitions.
If you are not familiar with var variables, please take a step back and watch our earlier video - "Thinking in Pine - var, varip and regular variables"
🎲 Summary
Using var within a function scope and how it behaves with multiple invocations.
Using the functions containing var variable definitions within a loop.
🎯 Example Program Used
increment()=>
var i = 0
i+=1
var1 = increment()
var2 = increment()
var3 = increment()
// The code above is equivalent to
// var i1 = 0
// i1+=1
// var1 = i1
// var i2 = 0
// i2+=1
// var2 = i2
// var i3 = 0
// i3+=1
// var3 = i3
plot(var1, "Counter 1", color=color.blue)
plot(var2, "Counter 2", color=color.red)
plot(var3, "Counter 3", color=color.purple)
arr = array.from(var1, var2, var3)
for i=1 to 3
arr.push(increment())
// The code above is equivalent to
// var i4 = 0
// i4+=1
// arr.push(i4)
if(bar_index == 4)
log.info('Value of array containing incremental values : {0}', arr)
🎲 References
Pine Script® User Manual - Variable declarations
Pine Script® Reference Manual - var
Thinking in Pine - Time Series Special CasesHello Everyone,
Welcome back to "Thinking in Pine" short video series. In this session, we have discussed few special cases of time series variables and using historical operator within local scope.
If you have not watched our previous video - "Thinking in Pine - Time Series" , request you to do that before continuing this video.
🎲 Summary of our today's discussion
How historical operator works for variables defined inside an conditional block
How historical operator works for variables defined in a loop.
🎯 Example Program Used
// Time series for variables within a condition
varip showLogInLoop = true
if(bar_index%3 == 0)
specialBarIndex = bar_index
if(bar_index > last_bar_index-3 and showLogInLoop)
log.info('Current and Previous special bar index are : {0} and {1}', specialBarIndex, specialBarIndex )
showLogInLoop := false
// Time series of variables within a loop
arrayOfX = array.new()
arrayOfLastX = array.new()
for i = 1 to 5
x = i*10
arrayOfX.push(x)
arrayOfLastX.push(x )
if(barstate.islastconfirmedhistory)
log.info('Array of X : {0}', arrayOfX)
log.info('Array of last X : {0}', arrayOfLastX)
🎲 References:
Pine Script® User Manual - Execution Model
Pine Script® User Manual - Time Series
Pine Script® User Manual - History Referencing Operator
Pine Script® Reference Manual - History Referencing Operator
Thinking in Pine - Time SeriesHello everyone,
Welcome back to "Thinking in Pine" short video series. In this video, we discuss the concept of time series variables in Pinescript.
If you are not familiar with var and varip type of variables - please step back and watch this video before continuing - "Thinking in Pine - var, varip and regular variables"
🎲 Summary of our discussion is as follows
What are time series variables, and how are they used in Pinescript?
How do we access historical values of time series?
Limitations of accessing historical values
🎯 Example Program Used
currentBar = bar_index
var currentBarUsingVar = 0
currentBarUsingVar := bar_index
varip showLog = true
valueAt200thBar = ta.valuewhen(bar_index == 500, currentBar, 0)
if(barstate.islast and showLog)
log.info("Current Bar Values using regular and var variables : {0}, {1}", currentBar, currentBarUsingVar)
log.info("Last Bar Values using regular and var variables : {0}, {1}", currentBar , currentBarUsingVar )
log.info("Values 500 bars ago using regular and var variables : {0}, {1}", currentBar , currentBarUsingVar )
offset = bar_index-25000
log.info("Values at 25000th bar using regular and var variables : {0}, {1}", currentBar , currentBarUsingVar )
showLog := false
plot(bar_index, "Bar Index", color = color.blue, display = display.data_window)
There are pitfalls of using historical operators within loop or under if condition. We will discuss that in our next video.
🎲 References:
Pine Script® User Manual - Execution Model
Pine Script® User Manual - Time Series
Pine Script® User Manual - History Referencing Operator
]Pine Script® Reference Manual - History Referencing Operator
Thinking in Pine - var, varip and regular variablesThis is our first video session on "Thinking in Pine" series. Before we start, we want to explain a bit about our new initiative.
🎲 What is "Thinking in Pine"?
In our journey to empower the trading community, we're excited to introduce "Thinking in Pine," a series of concise, 5-10 minute videos dedicated to unraveling the complexities of Pine Script®. We have our own list of topics to be covered, and we will start releasing the videos one by one. However, if you're grappling with any aspect of Pine Script® or stuck on an implementation, we encourage you to reach out to us or drop a comment here. We aim to address your queries by breaking down challenging concepts or implementations into easily digestible content.
What kind of videos are covered in "Thinking in Pine"?
Pine Script® Focus: We try to keep our focus on Pine Script® concepts and implementations.
General Utility: We prioritize topics that offer broader learning value. Though it's challenging to quantify this, we'll use our judgment to select topics that benefit the wider audience.
Time-Efficient Demonstrations: Ideally, we want to keep our demonstrations to 5–10 mins of time.
We're here to demystify Pine Script®, one topic at a time, making it accessible for everyone from beginners to advanced users. Stay tuned for insightful sessions with "Thinking in Pine"!
🎲 Demonstrating var, varip and regular variables in Pine Script®
In this video, we have demonstrated the difference between var, varip and regular variables by using an example implementation of OBV indicator.
🎯 Logic of OBV Calculation
Start with the value 0
On each bar, add volume to the indicator if close price is higher than previous bar close price.
On each bar, remove volume from the indicator is close price is lesser than previous bar close price
🎯 Highlights
Regular variables are initialized separately on each bar and does not propagate value to next bar unless coded to do it.
var variables are initialized once and then can be reassigned any number of times using := operator . The variables declared as var will propagate the current values to the next bar.
varip variables are initialized once and then can be reassigned any number of times using := operator . varip will behave similar to var on historical bars. However, on real time bars, they are recalculated on every tick, and they remember the state of each tick.
🎯 Example Program Used
Here is the example program used in the demonstration.
//Plot built-in OBV value for reference
plot(ta.obv, "OBV Built In", color=color.yellow)
//Volume multiplied by +-1 based on change in close price compared to previous bar.
volumeBySign = math.sign(nz(ta.change(close), 0))*volume
//Obv calculation by using regular variable. Code need to access and add last bar value using obvByRegular
obvByRegular = 0.0
obvByRegular += nz(obvByRegular , 0) + volumeBySign
plot(obvByRegular, "OBV By Regular Variable", color=color.blue)
//Obv calculation using var variable. Since var variables propagate values to next bar,
// we do not need to use historical operator to get the last bar value
var obvByVar = 0.0
obvByVar += volumeBySign
plot(obvByVar, "OBV by var Variable", color = color.maroon)
//Obv implementation using varip. The OBV is calculated based on every tick. Histoical values will match the same as that of other implementation.
//However, in real time, the calculations are done based on the tick values
varip obvByVarip = 0.0
varip lastPrice = close
varip lastVolume = volume
if(barstate.isnew)
lastVolume := 0
obvByVarip += math.sign(close-lastPrice)*(volume-lastVolume)
lastPrice := close
lastVolume := volume
plot(obvByVarip, "OBV by varip Variable", color = color.purple)
🎲 References:
Pine Script® User Manual - Variable declarations
Pine Script® Reference Manual - var
Pine Script® Reference Manual - varip
Pine Script® User Manual - Operators
Revisiting Automatic Access Management API for VendorsThis video explains how to automate access management for vendors who build and sell invite only scripts based on subscription or one time fee. I have made videos about this earlier as well. But, due to high demand, I have been asked to make this video again.
🎲 Tools Required
Replit - Used for hosting the service that automates access management
Postman - To test the services hosted
🎲 Prerequisites
User should have premium tradingview account and be able to publish invite only scripts by following the house rules.
User should disable 2FA on their account in order to allow programs to login remotely and manage access.
🎲 Steps
All the steps are also mentioned in the githup repository: github.com
🎯 Run the access management service
Fork the replit repository: replit.com
Update Environment Variables tvusername and tvpassword
Run the repl
🎯 Use postman to test the service methods
Detailed explanation of the API calls are present in the github link provided above. The service is capable of doing following things.
Check if the given tradingview username is valid or not
Get the access details of given user to list of scripts identified by pub id.
Delete the access to given user to list of scripts identified by pub id.
Provide/Extend access to given user to list of scripts identified by pub id for specific duration.
🎲 Notes
Please follow house rules while publishing and selling subscriptions to invite only scripts.
Do not commercialize these API calls or do not turn it into product. The mechanism is built on backend calls that are not officially supported by tradingview. While tradingview is tolerant on individual use, any malicious activity may force them to shut this down for everyone.
HOW-TO: Historical Pattern Matcher [Trendoscope]Hello everyone, here is a short video on how to use the indicator Historical Pattern Matcher . In this video, we went through the indicator components and settings in detail. All the information are also available on the script page. Please go through and let me know if you have further questions.
Bullish Hidden Divergence vs Bearish Hidden DivergenceHere is an explanation on the Bullish and Bearish Hidden Divergence concepts
Rules are as follows:
Bullish Hidden Divergence
Happens only in uptrend
Observed on pivot lows
Price makes higher low, whereas indicator makes lower low due to price consolidation. In bullish trend, this is considered as bullish as the price gets a breather and get ready to surge further.
Bearish Hidden Divergence
Happens only in downtrend
Observed on pivot Highs
Price makes lower high whereas oscillator makes higher high due to price consolidation. In bearish trend, this is considered as bearish as the price gets a breather and get ready to fall further.
Watch out for breakouts against the trend.
PayPal 79% down from ATH!! Under massive discount??I do not do manual analysis on anything. Instead, I develop methods to do the analysis. This way, we can be free from bias, and we measure things objectively.
Having said that, purely statistics based analysis does not take into consideration recent news events and other economical or political impacts on the company.
I developed this method to measure the discounted price probability of stocks based on its historical values of fundamentals and prices. Here is a summary of what is happening with PayPal!!
Price down 79% from peak. This is also 98% discount if you consider drawdown of prices from ATH
Most of the fundamentals are almost at all-time high. Exception is cashflow - that is in the negative territory
Profit and operating margins are down slightly compared to its ATH
Returns in comparison to capital, earning and assets are near ATH
Debts have significantly increased
Though the algorithm says probability of being discounted is pretty high, it takes all aspects into consideration and gives equal weightage. Will the significant increase in debt play a major role in the reduction of value, considering the increasing interest rates?
HOW-TO: Auto Harmonic Pattern - Screener [Trendoscope]Hello Everyone,
Here is a short walkthrough on our latest indicator cum screener - Auto Harmonic Pattern Screener. In this video we talk about few things.
Auto Harmonic Pattern Screener and how to use it
Different settings and Chart components
Differences between Auto Harmonic Pattern UltimateX and Screener and how to use them together to find patterns and study them in depth.
Common settings between the scripts and different use cases
This is a premium script which is part of Trendoscope Premium Indicator subscription. Please read the "Author's instructions" section of the script to know how to request for trial and subscription.
Please try and let me know if you have any feedbacks and report if you notice any bugs. Thanks very much for watching the video and using our indicators. Have a good day and enjoy your rest of the weekend :)
Decoding Wedge PatternsThere is a strong bias about chart patterns and their interpretation in the technical analysis space. It is a very common belief that a rising wedge forms bearish sentiment and a falling wedge forms bullish sentiment. Is that really true and how much we can rely on such bias?
In order to understand this, we need to dig a little bit about how such concepts could have come into the picture. The best I could get on the internet is an article from Investopedia that explains few technical reasons and constraints of using these patterns.
Through the Lens of Diagonal Waves
But, when I was studying the concepts of waves, this is what I found from one of the sources I referred to about diagonal waves:
ewtaf.com
Details are summarised and explained in the below diagram
The summary here is, Diagonal waves of contracting types are the same as that of Contracting Wedge patterns. And the diagonal waves of Expanding types represent expanding wedge chart patterns.
Diagonal Waves can appear as sub-waves in multiple parts of the entire Elliott Wave. And here are our scenarios
Leading Diagonals
Leading diagonals are diagonal waves that can appear towards the start of a trend. This can be
Wave 1 of an Impulse Wave - This is the start of a new trend. Avoid trading these wedges as they can be short pullbacks. Or better look for pullback and trading opportunities in the direction of the wedge.
Wave A of a Zigzag Wave - This can lead to a possible bull trap or bear trap. The corrective wave is likely to continue after a small pullback
Ending Diagonals
Both expanding and contracting types can be ending diagonals. Can appear as
Wave 5 of an Impulse Wave - Meaning the trend is coming towards possible exhaustion.
Wave C of zigzag or flat - Correction or pullback is coming to an end and the trend is likely to continue
Wolfe Wave
Wolfe wave is a rule built on top of wedge patterns to identify time-bound targets. The idea of generating targets and stops based on the Wolfe Wave is as shown below:
Further, here are a few indicators developed in Pinescript that can help do them automatically.
Wolfe Scanner
Wolfe Strategy
Takeaways
Here are a few things we learnt from our study.
When you are looking for wedge patterns on the chart, look for wedge formations created by 5 pivots. You can learn more about this from this post Fitting Patterns To Your Bias?
Before trading a wedge pattern, try to identify if the pattern fits in a bigger scheme of things. Check if they are towards the end/start of a trend or pullback
Concepts such as Wolfe Wave can help setup rules for trading wedge patterns for pullbacks.
Overview of Reversal Chart Pattern IndicatorHello Everyone,
In this video, we discussed briefly about
Different Reversal Chart Patterns
Zigzag and Patterns Ecosystem of Libraries and Indicators developed in Pinescropt
Recursive Reversal Chart Pattern Indicator
Adding the snapshot for reference
Link to the Indicator:
Search for Zigzag and Pattern Ecosystem libraries and indicators in my profile if you like the subject :)
EURAUD 350pips!! MUST WATCH! EURAUD is currently BULLISH but this is a weak one because we are trading on a EMA score of 2 which signals reversal so now we are positioning for a SHORT.
(Reason - D1 is currently exhausted and needs correction, possible DIV if HH happens and of course the EMA SCORE)
// #1 ENTRY (Risk Entry, Good Reward) // -: Even if we are looking for SHORT here, I believe we have an opportunity for a LONG before the SHORT rally.
So for the LONG entry, wait for price to push back to BL and LONG all the way to the UB on H4/D1 (175pips). Now for the main SHORT, SHORTR around D1 UB with a 50pips on candle close invalidation (300pips)
// #2 Entry (Confirmed Entry, Minimal Reward) // -: For SHORT ONLY, wait for price to hit D1 UB and then SHORT when we close back BELOW BL for SHORT continuation.
// INVALIDATION //
On #1 LONG ENTRY, Close IF candle close below the BL strong. On the MAIN SHORT, set a 50-60pips and run it all the way down.
On #2 Entry, when price rejects below the BL , the SUITE INDICATORS will print a SL zone on the chart for you, use it.
TARGETS - Take profit for the LONG is on H4 UB and on the main SHORT first exit could be on the touch on BL and second is when it gets back to to the PREV LOW/KEY ZONE
P.S I will post money making trades like this everyday and everything you see on my chart is
from the HOOD SUITE INDICATORS, everything you need is right in front on you inside the indicator.
(The key zones, Levels for manipulation, visible SL for invalidation, Alert when trade setup is ready).
No trend lines or complicated analysis, all you have to do is FOLLOW!
How to create auto trading bots for zero costHello Everyone,
Following are the things we discussed
🎲 Minimal Components of Auto Trading System:
Source where signals are generated
Exchange/Broker where orders are placed
Integration component which bridges both
🎲 In this example
Source - is our tradingview system and a sample script which generate alerts. Do not use this script for trading as it is only created for demonstration.
Exchange - We are going to use BingX exchange for this example as we only have this implementation in our integration system.
Integration System - www.pipedream.com is used for integration. This is cloud based integration product which is very flexible. Platform also allows users to contribute towards the product. Hence, it is very easy for us to develop integration to any broker or exchange which has API support.
🎲 Limitations
BingX APIs are fairly new and hence there are not much features. There is no option to place stop order.
It has option to place only limit/market orders
Stop loss is not possible via API
🎲 Steps:
🎯BingX
- Create account and enable perpetual futures trading
- Setup google authenticator and add valid email and phone.
- Create API - it will ask for Google authenticator code and email and phone OTPs.
- Store api key and secret key in safe place.
🎯Tradingview
- Create a script which can send stop, target, ticker information as signal.
- Study the existing idea about customising alerts for better understanding on how to achieve this.
🎯Pipedream
- Create account and setup BingX as source (needs API Key and Secret Key derived from BingX)
- Create Webhook trigger and capture webhook URL.
- Provide this URL in alerts to generate alert messages which are sent to webhook by default.
- Once alert is sent, load the alert in pipedream source and built rest of the workflow including calculate leveraged position and bracket order trades.
- Once tested, deploy the workflow so that workflow will keep listening to incoming alerts to generate trades.
Please note: the discrepancy in leverage calculation caused due to two things:
Lower timeframe used for generating faster alerts. Since the volatility is small, gaps can be huge.
The workflow did not run at once. Hence the delay caused rest of the issues resulting in miscalculations.
These problems however will not come when orders are placed via alerts and executed automatically.
Know Your PitchforksPitchfork is drawn when price forms ABC pattern. Pitchfork draws a series of parallel lines in the direction of trend which can be used for support and resistance.
There are many methods of drawing pitchfork. In all cases, a line joining BC will make the base of pitchfork and fork lines are drawn from different points of the base. All the fork lines will be parallel. But, the handle of the base defines the direction of fork lines. Classification of pitchfork is mainly based on the starting and ending points of the handle.
🎲 Regular Types
Here, end of the handle is always fixed and it will be the mid point of B and C.
🎯 Andrews Pitchfork
Handle starts from A and joins the base at mid of B and C.
Forks are drawn based on fib ratios from the handle
🎯 Schiff Pitchfork
Handle starts from Bar of A and price of middle of AB and joins the base at mid of B and C
Forks are drawn based on fib ratios from the handle
🎯 Modified Schiff Pitchfork
Handle starts from mid of A and B and joins the base at mid of B and C
Forks are drawn based on fib ratios from the handle
🎲 Inside Types
Here, C will act as end of the handle which joins the Base BC .
🎯 Andrews Pitchfork (Inside)
Handle starts from A and joins the base at C
Forks are drawn based on fib ratios from the handle
🎯 Schiff Pitchfork (Inside)
Handle starts from Bar of A and price of (A+B)/2 and joins the base at C
Forks are drawn based on fib ratios from the handle
🎯 Modified Schiff Pitchfork (Inside)
Handle starts from mid of A and B and joins the base at C
Forks are drawn based on fib ratios from the handle
Feel free to explore the open source indicator Recursive Auto-Pitchfork
Using scatterplot to understand the impact of RSI eventHello Everyone,
In this video we have discussed following things.
Scatter plot and implementation in Pine using heat map representation on tables.
Different quadrants and what it means.
RSI use case implemented in the indicator - RSI Impact Heat Map
How to use different settings and how to interpret the derived output.
General belief is when RSI crosses over 70, it is considered as overbought and people expect price to drop and when RSI crosses under 30, it is considered oversold and people expect price to move up. But, using this indicator, we can measure and plot the outcome of these events as scatter plot and use that to understand if these sentiments about overbought/oversold is right.
This can also be used with any entry condition. I look forward to developing a generic library for this so that other developers can make use of this to test their own criteria.
Thanks for watching this video. Let me know if you have any questions :)