Oliver Velez IndicatorOliver Velez is a well-known trader and educator who has developed multiple trading strategies. One of them is the 20-200sma strategy, which is a basic moving average crossover strategy. The strategy involves using two simple moving averages (SMAs) - a short-term SMA with a period of 20 and a long-term SMA with a period of 200 - on a 2-minute timeframe chart.
When the short-term SMA crosses above the long-term SMA, it signals a potential bullish trend and traders may look for opportunities to enter a long position. Conversely, when the short-term SMA crosses below the long-term SMA, it signals a potential bearish trend and traders may look for opportunities to enter a short position.
Traders using this strategy may also look for additional confirmations, such as price action signals or other technical indicators, before entering or exiting a trade. It is important to note that no trading strategy can guarantee profits, and traders should always use risk management techniques to limit potential losses.
This script is an implementation of the 2 SMA's (can also choose other types of MA's), with Elephant Bar Indicator (EBI) and the Tail Bars Indicator in TradingView.
The Elephant Bar Indicator is a technical indicator used in trading to identify potential trend reversals in the market. It is named after the large size of the bullish or bearish candlestick that it represents. The Tail Bars Indicator is a pattern recognition technique that identifies candlestick patterns with long tails or wicks.
The script starts by defining the input parameters for both indicators. For the Elephant Bar Indicator, the user inputs the lookback period and the size multiplier. For the Tail Bars Indicator, the user inputs the tail ratio and opposite wick ratio.
Next, the script calculates the moving averages of the closing price over the defined short and long periods using the Moving Average function. The script then calculates the average candle size and volume over the lookback period.
The script then identifies the Elephant Bars and Tail Bars using the input parameters and additional conditions. For Elephant Bars, the script identifies bullish and bearish bars that meet certain criteria, such as a size greater than the average candle size and volume greater than the average volume.
For Tail Bars, the script identifies bullish and bearish bars that have long tails or wicks and meet certain criteria such as opposite wick size less than or equal to the tail size multiplied by the input opposite wick ratio.
Finally, the script plots the Elephant Bar and Tail Bar signals on the chart using different colors and shapes. The script also plots the moving averages and Keltner Channels to help traders identify potential trend reversals.
It is still under development, so please, if someone has ideas to add, more than welcome
Candlestick analysis
Candle Trend Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed candle trend scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Muti-Part Green and Red Candle Trends
• A multi-part green candle trend begins upon the completion of a swing low and continues until a red candle completes the swing high, with each green candle counted as a part of the trend.
• A multi-part red candle trend begins upon the completion of a swing high and continues until a green candle completes the swing low, with each red candle counted as a part of the trend.
█ FEATURES
Inputs
Start Date
End Date
Position
Text Size
Show Sample Period
Show Plots
Table
The table is colour coded, consists of seven columns and, as many as, thirty-one rows. Blue cells denote the multi-part candle trend scenarios, green cells denote the corresponding green candle trend scenarios and red cells denote the corresponding red candle trend scenarios.
The candle trend scenarios are listed in the first column with their corresponding total counts to the right, in the second column. The last row in column one, displays the sample period which can be adjusted or hidden via indicator settings.
The third column displays the total candle trend scenarios as percentages of total 1-candle trends, or complete swing highs and swing lows. And column four displays the total candle trend scenarios as percentages of the, last, or preceding candle trend part. For example 4-candle trends as a percentage of 3-candle trends. This offers more insight into what might happen next at any given point in time.
Plots
I have added plots as a visual aid to the various candle trend scenarios listed in the table. Green up-arrows, with the number of the trend part, denote green candle trends. Red down-arrows, with the number of the trend part, denote red candle trends.
█ HOW TO USE
This indicator is intended for research purposes, strategy development and strategy optimisation. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe.
It can, for example, give you an idea of whether the next candle will close higher or lower than it opened, based on the current scenario and what has happened in the past under similar circumstances. Such information can be very useful when conducting top down analysis across multiple timeframes and making strategic decisions.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
Ectopic Bar by Moti RakamEctopic Bar is an indicator that highlights a pin-bar candle that has divergence in it's shape and volume delta. To find volume delta, code of standard Up/Down volume indicator has been used.
PIN BAR : pin bar are marked by using Close Range option parameter. Default value is set to 0.35 which implies any candle that closes in the 35% of its high/low will be considered a pin bar (of course the code also ensures that rest of the bar body is only a wick).
HOW IT WORKS:
Up/Down volume variables "Up Volume" and "Down Volume" are checked against the shape of the pin bar to find an ectopic situation. For example, if a bullish pin bar candle (a bullish hammer) has more sell volume than buy volume, that's an ectopic situation. The bullish hammer shows a buying push from the bottom of the wick, instead the up/down volume indicator shows there were more sell orders than buy orders. Hence the ectopic situation. Similarly, an inverted hammer (a bearish hammer) in general should have more sell volume, but instead if it has more buying volume, the indicator highlights it as an ectopic bar.
Ectopic Bars are painted in yellow colour.
Weekly Options Expiry Candle V.2In India Weekly options expire on Thursday and that creates a different price action candle than the week timeframe.
My previous script Weekly Options Expiry Candle has some limitations. This script overcame those limitations and added some features.
You can use this in any intraday time frame candle.
It will show:
All expiry candle in box format
Expiry OHLC label
Pivot (Floor or Fibonacci) based on expiry OHLC data
Developing Expiry candle and Pivot
A table showing expiry range(high-low) and Expiry body abs(open-close) stats.
You can turn on or off any feature.
Please let me know if you found this script useful or have any questions or suggestions.
NSE:BANKNIFTY
NSE:NIFTY
Cloud Bunching [5ema]Reused some functions from (i believe made by):
©paaax: The table position function.
@QuantNomad: The function calculated value and array screener for 40+ instruments .
How it uses:
Gives signal when the cloud is bunching with ratio smaller than the set ratio and the close price breaking out the cloud.
Track 40 different symbols, on any timeframe to follow and alert.
When a symbol has a signal, it will display on the chart and send an alert.
How it works:
The cloud created by 5 EMA (20, 50, 200, 460, 610). Upper Cloud is max EMA , Lower Cloud is min EMA . Center line is averange (5 EMA )
If the ratio upper / lower < input bunching (%) -> change color of cloud.
Get the signal if: the close price break out cloud (with bar is shooting, or hammer ,...) and high volume (or not).
With another symbols (max 40 ) also use that function with any time frame. By request.security() and array function.
How it setting:
Change the bunching rate (%) of the clouds for any symbols.
Change the percentage (%) of the close price that breaks out of the bunching cloud.
Choose volume condition.
Show or turn off the cloud, table.
Select the symbol to follow.
Choose a timeframe to follow other symbols.
----
This indicator is for reference only, you need your own method and strategy.
If you have any questions, please let me know in the comments.
Vertical Line at nth Previous CandleThis code is a Pine script for TradingView that plots a vertical line on the chart n bars away from the current candle on the current time frame. The number of bars and line color can be customized by the user using input fields. The script calculates the highest and lowest price on the chart for the past n bars, and then draws a vertical line at the target bar with the specified line color. The previous line is removed and the ID of the new line is stored so that the next time the script is run, it can be removed and replaced with a new line. This script can be useful for marking important points on a chart or for visually tracking patterns or trends over time.
Entry Alert BotThis bot is SIMPLY to trigger an external webhook. You simply enter you take profit, entry, and stop loss %, and it will auto-populate the variables listed to the calculated values. That is all this script does. It does draw the trade on the chart for you. If you want a long, and price crosses up over you entry it will trigger the webhook. If you want a short and price crosses below your entry, it will trigger the webhook.
SumIndTarget:
The SumInd indicator combines Heiking Ashi, Sar Parabolic, Koncord, RSI, DMI, MACD and Bollinger Bands to give buy or sell signals or trends. This are called base indicators.
The goal is to have a clear and quick buy or sell suggestion and to avoid evaluating all or some of the named indicators, especially if they give contradictory signals among them. This speed and simplicity helps the trader to see several tickers in less time. It is intended for all markets and time periods where the above-mentioned indicators can be used.
How it works:
SumInd already has the importance or "weight" of each indicator named above configured, but they can be modified. You can set 0% for no use, or any other value based on the weight you want to give it, between 1% and 200% where 100% is the normal use, and increases or decreases based on importance.
Each base indicator can give signals to buy, sell or just "wait and see".
Each base indicator is checked for a buy signal, in which case its weight is added to the positive or green line, and if there is a sell signal, its weight is subtracted from the sell or red line. in case of indeterminacy or 'wait and see', nothing is added to any signal.
The yellow or total line is the sum of the buy or green signal plus the sell or red signal.
If the yellow or total line rises above the buy level, the background changes to green and an up arrow appears at the bottom of the chart indicating the buy suggestion, because most of the indicators you are interested in gave a buy signal.
If the yellow line or total falls below the sell level, the background changes to red and a downward arrow appears in the upper area of the chart indicating the sell suggestion, because most of the indicators you are interested in gave a sell signal.
The Buy and Sell level can be changed according to the security of the suggestion you need.
Areas without arrows or marks are considered "wait and see" areas, the previous trend in principle continues. They can be marked with the default background if desired from the SumInd settings.
Details and criterials:
Each of the following indicators can be turned on or off and assigned different weights of importances, by whether or not it shares the following criteria:
Heikin Ashi candles: add or subtract half an assigned weight if there is a buy or sell candle and the other half weight if there are two consecutive candles with the same signal.
RSI: Adds or subtracts the assigned weight if the ema is below or above the signal.
Parabolic Sar: Adds half a weight in transition to buy or sell and another half weight if there are two consecutive signals of the same trend.
Koncord: Add or subtract the weight if the current trend (mountain) grows or decreases respectively from the 4th previous time signal, and also the value (red line) is less than 35 or exceeds 65 respectively.
DMI: Adds or subtracts a quarter of the weight assigned by the DMI signal multiplied by the value of DMI, if the positive or negative signal exceeds the other negative or positive signal by 15% respectively.
Bollinger Bands: Add or subtract the weight if the previous third signal touches or falls out of the zone and keeps growing or decreasing respectively.
MACd: Add or subtract one third of the weight if the last 3 time signals are rising or falling, Add or subtract another third if the fast signal is above or below the slow signal, and Add or subtract the last third of the weight if it is rising with the negative fast signal, or falling with the positive fast signal.
Liquidity Candles with Prev Day High/Low and Midnight OpenAlright, let's talk about how to use this fancy indicator. But first, let me warn you, using indicators is like driving a car, you can't just press the gas pedal and hope for the best. You need to know what you're doing, or else you'll crash and burn faster than a soufflé in a microwave.
Now, let's get started. The first thing you need to do is understand what this indicator is telling you. Think of it like a signalman at a train station. He's waving flags and giving hand signals to tell you whether it's safe to proceed or if you need to stop and wait. This indicator works the same way.
It's going to give you signals based on price movements, telling you whether it's safe to buy or sell. But don't get too excited, my friend. You still need to use your brain and make smart decisions. Don't just blindly follow the signals, or else you'll end up like a sheep being led to the slaughter.
Now, let's talk about some of ICT's smart money trading concepts. First up, we have "liquidity grabs". This is when the big boys in the market create false breakouts to shake out the weak hands. They're like school bullies stealing lunch money from the little kids. But you can avoid being a victim by watching for signs of a liquidity grab, and using your brain to decide whether it's a real breakout or just a trap.
Next up, we have "stop runs". This is when the big players purposely trigger stop-loss orders to get a better entry or exit. It's like a game of chicken, but with your money on the line. To avoid being run over, keep an eye on your stop-loss orders, and don't be too predictable in your trading.
Finally, we have "market structure". This is like the blueprint of the market, showing you where the support and resistance levels are. It's like a treasure map to finding the best trades. But don't forget that market structure can change over time, so keep updating your map and stay ahead of the game.
So there you have it, my friend. A quick tutorial on using this indicator, with a side of ICT's smart money trading concepts. But remember, indicators are just tools, and you're the one driving the car. Use your brain, stay alert, and don't be a sheep. Happy trading!
Divergent Trades LLC:
Disclaimer: The information provided by the Divergent Trades LLC indicator is for educational and informational purposes only. It should not be considered financial advice or a recommendation to buy, sell, or trade any financial instrument. Divergent Trades LLC is not responsible for any losses incurred as a result of using this indicator. Trading in the financial markets carries a high level of risk and may not be suitable for all investors. Before making any investment decisions, please consult with a financial advisor and do your own due diligence. Past performance is not indicative of future results. By using the Divergent Trades LLC indicator, you acknowledge that you have read and understand this disclaimer and agree to its terms and conditions.
ICT Market Structure and OTE ZoneThis indicator is based on the ICT (Inner Circle Trader) concepts, and it helps identify daily market structure and the optimal trade entry (OTE) zone based on Fibonacci retracement levels.
To read and interpret this indicator, follow these steps:
Daily High and Low: The red line represents the daily high, while the green line represents the daily low. These lines help you understand the market structure and the range within which the price has moved during the previous day.
OTE Zone: The gray area between two gray lines represents the optimal trade entry (OTE) zone. This zone is calculated using Fibonacci retracement levels (in this case, 61.8% and 78.6%) applied to the previous day's high and low. The OTE zone is an area where traders might expect a higher probability of a price reversal, following the ICT concepts.
To use this indicator for trading decisions, you should consider the following:
Identify the market structure and overall trend (uptrend, downtrend, or ranging).
Watch for price action to enter the OTE zone. When the price reaches the OTE zone, it may indicate a higher probability of a price reversal.
Combine the OTE zone with other confluences, such as support and resistance levels, candlestick patterns, or additional ICT concepts like order blocks and market maker profiles, to strengthen your trading decisions.
Always use proper risk management and stop-loss orders to protect your capital in case the market moves against your trade.
Keep in mind that the provided indicator is a simple example based on the ICT concepts and should not be considered financial advice. The ICT methodology is vast, and traders often combine multiple concepts to develop their trading strategies. The provided indicator should be treated as a starting point to explore and implement the ICT concepts in your trading strategy.
Volume-Weighted Closing Range (TG Fork)Volume-weighted closing range of each bar. Closing range is (high - close) relative to the length of the wick (high - low). A close at the top of the wick would be 100%, middle 50%, bottom 0%. This is then multiplied by volume to weight towards high volume bars.
A moving average is applied to visualize trend in volume-weighted closing range over time.
Options include changing the threshold of bullish closes. The default is 50%, but you can view a close above 40% as a bullish .
How to use:
Columns indicate per-bar closing range, and can be used as either a buying-selling pressure indicator, or as an overreaction detector (eg, bars that are abnormally big can be used to start a fading/contrarian trade next bars). Green means the bar closed in the upper range, red in the lower range.
The cloud is the moving average over several bars (by default using EMA). This tends to represent sentiment over a period of time, and hence trend/momentum. Can be used in any timescale, even on weekly, then this represents the market cycles.
If you like this indicator, please show the original author your appreciation:
Hikkake Hunter 2.0This script serves as a successor to a previous script I wrote for identifying Hikkakes nearly two years ago.
The old version has been preserved here:
█ OVERVIEW
This script is a rework of an old script that identified the Hikkake candlestick pattern. While this pattern is not usually considered a part of the standard candlestick patterns set, I found a lot of value when finding a solution to identifying it. A Hikkake pattern is a 3-candle pattern where a middle candle is nested in between the range of the prior candle, and a candle that follows has a higher high and a higher low (bearish setup) or a lower high and a lower low (bullish setup). What makes this pattern unique is the "confirmation" status of the pattern; within 3 candles of this pattern's appearance, there must be a candle that closes above the high (bullish setup) or below the low (bearish setup) of the second candle. Additional flexibility has been added which allows the user to specify the number of candles (up to 5) that the pattern may have to confirm after its appearance.
█ CONCEPTS
This script will cover concepts mainly focusing on candlestick analysis, price analysis (with higher timeframes), and statistical analysis. I believe there is also educational value presented with the use of user-defined-types (UDTs) in accomplishing these concepts that I hope others will find useful.
Candlestick Analysis - Identification and confirmation of the patterns in the deprecated script were clunky and inefficient. While the previous script required the use of 6 candles to perform the confirmations of patterns (restricted solely to identifying patterns that confirmed in 3 candles or less), this script only requires 3 candles to identify and process patterns by utilizing a UDT representing a 'pattern object'. An object representing a pattern will be created when it has been identified, and fields within that object will be set for processing by the functions it is passed to. Pattern objects are held by a var array (values within the array persist between bars) and will be removed from this array once they have been confirmed or non-confirmed.
This is a significant deviation from the previous script's methods, as it prevents unnecessary re-evaluations of the confirmation status of patterns (i.e. Hikkakes confirmed on the first candle will no longer need to be checked for confirmations on the second or third; a pitfall of the deprecated version which required multiple booleans tracking prior confirmation statuses). This deviation is also what provides the flexibility in changing the number of candles that can pass before a pattern is deemed non-confirmed.
As multiple patterns can be confirmed simultaneously, this script uses another UDT representing a linked-list reduction of the pattern object used to process it. This liked-list object will then be used for Price Analysis.
Price Analysis - This script employs the use of a UDT which contains all the returns of confirmed patterns. The user specifies how many candles ahead of the confirmed pattern to calculate its return, as well as where this calculation begins. There are two settings: FROM APPEARANCE and FROM CONFIRMATION (default). Price differences are calculated from the open of the candle immediately following the candle which had confirmed the pattern to the close of the candle X candles ahead (default 10). ( SEE FEATURES )
Because of how Pine functions, this calculation necessitates a lookback on prior candles to identify when a pattern had been confirmed. This is accomplished with the following pseudo-code:
if not na(confirmed linked-list )
for all confirmed in list
GET MATRIX PLACEMENT
offset = FROM CONFIRMATION ? 0 : # of candles to confirm
openAtFind = open
percent return = ((close - openAtFind) / openAtFind) * 100
ADD percent return TO UDT IN MATRIX
All return UDTs are held in a matrix which breaks up these patterns into specific groups covered in the next section.
Higher Timeframes - This script makes a request.security call to a higher timeframe in order to identify a price range which breaks up these patterns into groups based on the 'partition' they had appeared in. The default values for this partitioning will break up the chart into three sections: upper, middle, and lower. The upper section represents the highest 20% of the yearly trading range that an asset has experienced. The lower section represents the trading range within a third (33%) of the yearly low. And the middle section represents the yearly high-low range between these two partitions.
The matrix containing all return UDTs will have these returns split up based on the number of candles required to confirm the pattern as well as the partition the pattern had appeared in. The underlying rationale is that patterns may perform better or worse at different parts of an asset's trading range.
Statistical Analysis - Once a pattern has been confirmed, the matrix containing all return UDTs will be queried to check if a 'returnArray' object has been created for that specific pattern. If not, one will be initialized and a confirmed linked-list object will be created that contains information pertinent to the matrix position of this object.
This matrix contains the returns of both the Bullish and Bearish Hikkake patterns, separated by the number of candles needed to confirm them, and by the partitions they had appeared in. For the standard 3 candles to confirm, this means the matrix will contain 18 elements (dependent on the number of candles allowed for confirmations; its size will range from 12 to 30).
When the required number of candles for Price Analysis passes, a percent return is calculated and added to the returnArray contained in the matrix at the location derived from the confirmed linked-list object's values. The return is added, and all values in the returnArray are updated using Pine's built in array.___ functions. This returnArray object contains the array of all returns, its size, its average, the median, the standard deviation of returns, and a separate 3-integer array which holds values that correspond to the types of returns experienced by this pattern (negative, neutral, and positive)*.
After a pattern has been confirmed, this script will place the partition and all of the aforementioned stats values (plus a 95% confidence interval of expected returns) related to that pattern onto the tooltip of the label that identifies it. This allows users to scroll over the label of a confirmed pattern to gauge its prior performance under specific conditions. The percent return of the specific pattern identified will later be placed onto the label tooltip as well. ( SEE LIMITATIONS )
The stats portion of this script also plays a significant role in how patterns are presented when using the Adaptive Coloring mode described in FEATURES .
*These values are incremented based on user-input related to what constitutes a 'negative' or 'positive' return. Default values would place any return by a pattern between -3% and 3% in the 'neutral' category, and values exceeding either end will be placed in the 'negative' or 'positive' categories.
█ FEATURES
This script contains numerous inputs for modifying its behavior and how patterns are presented/processed, separated into 5 groups.
Confirmation Setting - The most important input for this script's functioning. This input is a 'confirm=true' input and must be set by the user before the script is applied to the chart. It sets the number of candles that a pattern has to confirm once it has been identified.
Alert Settings - This group of booleans sets which types of alerts will fire during the scripts execution on the chart. If enabled, the four alerts will trigger when: a pattern has been identified, a pattern has been confirmed, a pattern has been non-confirmed, and show the return for that confirmed pattern in an alert. Because this script uses the 'alert' function and not 'alertcondition', these must be enabled before 'any alert() function call' is set in TradingView's 'alerts' settings.
Partition Settings - This group of inputs are responsible for creating (and viewing) the partitions that breaks the returns of the patterns identified up into their respective groups. The user may set the resolution to grab the range from, the length back of this resolution the partitions get their values from, the thresholds which breaks the partitions up into their groups, and modify the visibility (if they're shown, the colors, opacity) of these partitions.
Stats Settings - These inputs will drastically alter how patterns are presented and the resulting information derived from them after their appearance. Because of this section's importance, some of these inputs will be described in more detail.
P/L Sample Length - Defines the number of candles after the starting point to grab values from in the % return calculation for that pattern.
P/L Starting Point - Defines the starting point where the P/L calculation will take place. 'FROM APPEARANCE' will set the starting point at the candle immediately following the pattern's appearance. 'FROM CONFIRMATION' will place the starting point immediately following the candle which had confirmed the pattern. ( SEE LIMITATIONS )
Min Returns Needed - Sets how many times a specific pattern must appear (both by number of candles needed to confirm and by partition) before the statistics for that pattern are displayed onto the tooltip (and for gradient coloration in Adaptive Coloring mode).
Enable Adaptive Coloring - Changes the coloration of the patterns based on the bullish/bearishness of the specified Gradient Reference value of that pattern compared to the Return Tolerance values OR the minimum and maximum values of that specified Gradient Reference value contained in the matrix of all returns. This creates a color from a gradient using the user-specified colors and alters how many of the patterns may appear if prior performance is taken into account.
Gradient Reference - Defines which stats measure of returns will be used in the gradient color generation. The two settings are 'AVG' and 'MEDIAN'.
Hard Limit - This boolean sets whether the Return Tolerance values will not be replaced by values that exceed them from the matrix of returns in color gradient generation. This changes the scale of the gradient where any Gradient Reference values of patterns that exceed these tolerances will be colored the full bullish or bearish gradient colors, and anything in between them will be given a color from the gradient.
Visibility Settings - This last section includes all settings associated with the overall visibility of patterns found with this script. This includes the position of the labels and their colors (+ pattern colors without Adaptive Coloring being enabled), and showing patterns that were non-confirmed.
Most of these inputs in the script have these kinds of descriptions to what they do provided by their tooltips.
█ HOW TO USE
I attempted to make this script much easier to use in terms of analyzing the patterns and displaying the information to the user. The previous script would have the user go to the 'data window' side bar on TradingView to view the returns of a pattern after they had specified which pattern to analyze through the settings, needlessly convoluted. This aim at simplicity was achieved through the use of UDTs and specific code-design.
To use, simply apply the indicator to a chart, set the number of candles (between 2 and 5) for confirming this specific pattern and adjust the many settings described above at your leisure.
█ LIMITATIONS
Disclaimer - This is a tool created with the hopes of helping identify a specific pattern and provide an informative view about the performance of that pattern. Previous performance is not indicative of future results. None of this constitutes any form of financial advice, *use at your own risk*.
Statistical Analysis - This script assumes that all patterns will yield a NORMAL DISTRIBUTION regarding their returns which may not be reflective of reality. I personally have limited experience within the field of statistics apart from a few high school/college courses and make no guarantees that the calculation of the 95% confidence interval is correct. Please review the source code to verify for yourself that this interval calculation is correct (Function Name: f_DisplayStatsOnLabel).
P/L Starting Point - Because of when the object related to the confirmation status of a pattern is created (specifically the linked-list object) setting the 'P/L Starting Point' to 'FROM APPEARANCE' will yield the results of that P/L calculation at the same time as 'FROM CONFIRMATION'.
█ EXAMPLES
Default Settings:
Partition Background (default):
Partition Background (Resolution D : Length 30):
Adaptive Coloration:
Show Non-Confirmed:
Pullback IndicatorThe Pullback Indicator is a technical analysis tool designed to identify pullbacks in the price action of a financial instrument. It is based on the concept that price tends to retrace to a previous level of support or resistance before continuing in the direction of the trend.
The indicator is plotted as a series of triangles above or below the price bars, depending on the type of pullback detected. A green triangle is displayed when a bullish pullback is detected, while a red triangle is displayed for a bearish pullback.
The Pullback Indicator uses Inside Bar Range, this number is a user-defined input that specifies the number of bars to look back for the highest high and lowest low.
The indicator classifies four types of pullbacks:
Swing Low - When the price forms a lower low and a higher low than the previous bar.
Swing High - When the price forms a higher high and a lower high than the previous bar.
High Low Sweep and close below - When the price forms a lower low and a higher low than the previous bar, but the close is below the previous high.
High Low Sweep and close above - When the price forms a higher high and a lower high than the previous bar, but the close is above the previous low.
The Pullback Indicator is best used in conjunction with other technical analysis tools to confirm the direction of the trend and to identify potential entry and exit points.
Will my limit order be filled ?Hi
This is a small script that tries to assess the probability that a limit order sent at x % from the last close will be filled in the next y bars.
It is based on historical data and can be useful to decide where to place your limit orders and to determine how far from the price you can put the limit order to get an X% chance of getting filled.
It displays this result for both long and short entries and you can specify if you want to fill orders with wicks or not.
Wick Length Dominance IndicatorThis indicator, called the "Wick Momentum Indicator" (WMI), helps to gauge price momentum by comparing the total length of upper and lower wicks of a certain number of candlesticks. The indicator turns green when there is a bullish momentum (total length of lower wicks is greater than that of upper wicks) and turns red when there is a bearish momentum (total length of upper wicks is greater than that of lower wicks).
Candle Mania [starlord_xrp]This indicator locates and places markers on known bullish and bearish candles. All candles can be turned on/off in the settings. It also has a setting to display RSI/MFI/Stoch RSI indications of oversold and overbought areas in the background showing areas of higher interest. The last feature is a setting that allows you to see where Heiken-Ashi has switched from green to red and vice-versa. Please let me know if there is anything that you would like to see added or any improvements.
Equilibrium╭━━━╮╱╱╱╱╱╱╭╮╱╭╮
┃╭━━╯╱╱╱╱╱╱┃┃╱┃┃
┃╰━━┳━━┳╮╭┳┫┃╭┫╰━┳━┳┳╮╭┳╮╭╮
┃╭━━┫╭╮┃┃┃┣┫┃┣┫╭╮┃╭╋┫┃┃┃╰╯┃
┃╰━━┫╰╯┃╰╯┃┃╰┫┃╰╯┃┃┃┃╰╯┃┃┃┃
╰━━━┻━╮┣━━┻┻━┻┻━━┻╯╰┻━━┻┻┻╯
╱╱╱╱╱╱┃┃
╱╱╱╱╱╱╰╯
Overview
Equilibrium is a tool designed to measure the buying & selling pressure in the market. It is depicted as a “pressure gauge” that automatically adjusts as new candles are formed, providing a real-time indication of who's on top right now, buyers or sellers?
Background
Supply & demand is considered to be the main driving force of our modern economies, where the interaction between the two parties(sellers & buyers) leads to the determination of the fair price for a given product. Stock markets are no exception, they operate very much based around the idea of supply & demand.
In simple terms, supply refers to the availability of a product, and demand is the willingness of consumers to buy that product at a given price. It is obvious that different vendors may sell the same product at slightly different prices, and similarly, different customers may choose to buy the same product from different vendors at varying prices. The idea is that the price is allowed to fluctuate from time to time, but in a free & fair market, the price will eventually settle down to a value that makes both the parties happy. Such a state is known as the “Price-Equilibrium”, and this process is also referred to as the market mechanism.
This is the basic assumption around which this tool is based, the market is always trying to move towards a state of equilibrium.
Calculations
This tool takes a simplistic approach to estimate the degree of imbalance between buyers & sellers, here’s a brief summary of how the pressure is calculated:
- We compute the total lengths of red & green candles for a given period, i.e. price range multiplied by the volume for that candle.
- Then the distribution of each type of candle is calculated.
- Assuming more red candles denote more selling pressure, and green candles denote buying pressure, the gauge is populated cell by cell.
- As the pressure on one side increases, the intensity of the cell color also increases, signifying the extent to which one side is dominating.
How to use it
- The indicator is designed as a pressure gauge that moves up(vertical alignment) or to the right(horizontal alignment) as the buying pressure increases, and moves down or to the left as the selling pressure increases. How it is to be used & applied, that completely depends on your trading methodology. But, the general idea is that we expect the market to be in a state of equilibrium, and if that is not the case the tool will highlight that, and this is also where the opportunity lies to find suitable trades.
- Just by having an idea about who’s dominating the market currently, a trader can also pick sides wisely. Remember, the market is always striving to come back a state of equilibrium, and a slight imbalance can indicate the current trend, and more importantly, who’s more likely to make the next move.
User Settings
The tool offers some minimal configurations for the end user:
- You can choose to display the actual percentage value in the gauge(Show Text).
- You can adjust colors that denote buyers & sellers.
- You can change the layout of gauge, default is vertical(right side of the screen).
- Last, and most important, you can adjust the number of candles to traverse for calculating the pressure. Default is 50, can go upto 1000.
RedK EVEREX - Effort Versus Results ExplorerRedK EVEREX is an experimental indicator that explores "Volume Price Analysis" basic concepts and Wyckoff law "Effort versus Result" - by inspecting the relative volume (effort) and the associated (relative) price action (result) for each bar - showing the analysis as an easy to read "stacked bands" visual. From that analysis, we calculate a "Relative Rate of Flow" - an easy to use +100/-100 oscilator that can be used to trigger a signal when a bullish or bearish mode is detected for a certain user-selected length of bars.
Basic Concepts of VPA
-------------------------------
(The topics of VPA & Wyckoff Effort vs Results law are too comprehensive to cover here - So here's just a very basic summary - please review these topics in detail in various sources available here in TradingView or on the web)
* Volume Price Analysis (VPA) is the examination of the number of shares or contracts of a security that have been traded in a given period, and the associated price movement. By analyzing trends in volume in conjunction with price movements, traders can determine the significance of changes in price and what may unfold in the near future.
* Oftentimes, high volumes of trading can infer a lot about investors’ outlook on a market or security. A significant price increase along with a significant volume increase, for example, could be a credible sign of a continued bullish trend or a bullish reversal. Adversely, a significant price decrease with a significant volume increase can point to a continued bearish trend or a bearish trend reversal.
* Incorporating volume into a trading decision can help an investor to have a more balanced view of all the broad market factors that could be influencing a security’s price, which helps an investor to make a more informed decision.
* Wyckoff's law "Effort versus results" dictates that large effort is expected to be accompanied with big results - which means that we should expect to see a big price move (result) associated with a large relative volume (effort) for a certain trading period (bar).
* The way traders use this concept in chart analysis is to mainly look for imbalances or invalidation. for example, when we observe a large relative volume that is associated with very limited price change - that should trigger an early flag/warning sign that the current price trend is facing challenges and may be an early sign of "reversal" - this applies in both bearish and bullish conditions. on the other hand, when price starts to trend in a certain direction and that's associated with increasing volume, that can act as kind of validation, or a confirmation that the market supports that move.
How does EVEREX work
---------------------------------
* EVEREX inspects each bar and calculates a relative value for volume (effort) and "strength of price movement" (result) compared to a specified lookback period. The results are then visualized as stacked bands - the lower band represents the relative volume, the upper band represents the relative price strength - with clear color coding for easier analysis.
* The scale of the band is initially set to 100 (each band can occupy up to 50) - and that can be changed in the settings to 200 or 400 - mainly to allow a "zoom in" on the bands.
* Reading the resulting stacked bands makes it easier to see "balanced" volume/price action (where both bands are either equally strong, or equally weak), or when there's imbalance between volume and price (for example, a compression bar will show with high volume band and very small/tiny price action band) - another favorite pattern in VPA is the "Ease of Move", which will show as a relatively small volume band associated with a large "price action band" (either bullish or bearish) .. and so on.
* a bit of a techie piece: why the use of a custom "Normalize()" function to calculate "relative" values in EVEREX?
When we evaluate a certain value against an average (for example, volume) we need a mechanism to deal with "super high" values that largely exceed that average - I also needed a mechanism that mimics how a trader looks at a volume bar and decides that this volume value is super low, low, average, above average, high or super high -- the issue with using a stoch() function, which is the usual technique for comparing a data point against a lookback average, is that this function will produce a "zero" for low values, and cause a large distortion of the next few "ratios" when super large values occur in the data series - i researched multiple techniques here and decided to use the custom Normalize() function - and what i found is, as long as we're applying the same formula consistently to the data series, since it's all relative to itself, we can confidently use the result. Please feel free to play around with this part further if you like - the code is commented for those who would like to research this further.
* Overall, the hope is to make the bar-by-bar analysis easier and faster for traders who apply VPA concepts in their trading
What is RROF?
--------------------------
* Once we have the values of relative volume and relative price strength, it's easy from there to combine these values into a moving index that can be used to track overall strength and detect reversals in market direction - if you think about it this a very similar concept to a volume-weighted RSI. I call that index the "Relative Rate of Flow" - or RROF (cause we're not using the direct volume and price values in the calculation, but rather relative values that we calculated with the proprietary "Normalize" function in the script.
* You can show RROF as a single or double-period - and you can customize it in terms of smoothing, and signal line - and also utilize the basic alerts to get notified when a change in strength from one side to the other (bullish vs bearish) is detected
* In the chart above, you can see how the RROF was able to detect change in market condition from Bearsh to Bullish - then from Bullish to Bearish for TSLA with good accuracy.
Other Usage Options in EVEREX
------------------------------------
* I wrote EVEREX with a lot of flexibility and utilization in mind, while focusing on a clean and easy to use visual - EVEREX should work with any time frame and any instrument - in instruments with no volume data, only price data will be used.
* You can completely hide the "EVEREX bands" and use EVEREX as a single or dual period strength indicator (by exposing the Bias/Sentiment plot which is hidden by default) -
here's how this setup would look like - in this mode, you will basically be using EVEREX the same way you're using a volume-weighted RSI
* or you can hide the bias/sentiment, and expose the Bulls & Bears plots (using the indicator's "Style" tab), and trade it like a Bull/Bear Pressure Index like this
* you can choose Moving Average type for most plot elements in EVEREX, including how to deal with the Lookback averaging
* you can set EVEREX to a different time frame than the chart
* did i mention basic alerts in this v1.0 ?? There's room to add more VPA-specific alerts in future version (for example, when Ease-of-Move or Compression bars are detected...etc) - let me know if the comments what you want to see
Final Thoughts
--------------------
* EVEREX can be used for bar-by-bar VPA analysis - There are so much literature out there about VPA and it's highly recommended that traders read more about what VPA is and how it works - as it adds an interesting (and critical) dimension to technical analysis and will improve decision making
* RROF is a "strength indicator" - it does not track price values (levels) or momentum - as you will see when you use it, the price can be moving up, while the RROF signal line starts moving down, reflecting decreasing strength (or otherwise, increasing bear strength) - So if you incorporate EVEREX in your trading you will need to use it alongside other momentum and price value indicators (like MACD, MA's, Trend Channels, Support & Resistance Lines, Fib / Donchian..etc) - to use for trade confirmation
Correlation Coefficient TableThis is a sample PineSript code implementation using Correlation Coefficient. It uses the ta.correlation library of Pinescript and calculates the correlation based on user input length. The results are then plotted on a table. The corr value displays the actual correlation coefficient value while the Corr Status displays the interpretation of the correlation coefficient values.
The script takes the following input
Source Symbol - This is the base symbol which will be used in calculating correlation coefficient. In my case, since i am looking more often on crypto. I defaulted it to BTCUSDT
Symbol 1 - Symbol 5 - These are the coins that will be compared to our base symbol for correlation.
Source - You can select on which price source you want to be calculated. By default this is set to candle close price.
Length - The number of price bar to look back and retrieve correlation coefficient. Set to 20 bars by default.
Table Settings - Since the correlation coefficient are displayed on a table. An option to customize the table settings are presented.
The Correlation Status column was based on this Interpretation:
For more information, read this article www.tradingview.com
Trap Trading - SwaGThis is an intraday indicator
Set timeframe to 5 min
Take long entry on the high brakes of selling traps
Take short entry on the low brakes of buying traps
ignore traps left to red zones
Use the nearest trap
take profit/loss on a 1:2 risk-to-reward basis.
Trap Trading
Trap trading is a trading strategy that seeks to profit from false breakouts in financial markets. This strategy is based on the idea that when the market breaks through a key level of support or resistance, many traders will take that as a signal to enter or exit trades, causing the price to move further in the breakout direction.
However, in some cases, the market will quickly reverse course and move in the opposite direction, trapping those traders who entered the trade based on the breakout. This can create a trading opportunity for those who are able to identify the false breakout and trade in the opposite direction.
The trap trading strategy typically involves identifying a key level of support or resistance on a price chart and then waiting for the market to break through that level. If the price continues to move in the breakout direction, the trader may enter a trade in that direction with a stop loss set just below the breakout level.
However, if the market quickly reverses and moves back below the breakout level, the trader may enter a trade in the opposite direction with a stop loss set just above the breakout level. The idea is to take advantage of the trapped traders who entered the trade based on the false breakout, and profit from the market's reversal.
As with any trading strategy, there are risks and potential drawbacks to trap trading. False breakouts can be difficult to identify, and there is always the risk that the market will continue to move in the breakout direction, resulting in losses for the trader. Additionally, trap trading requires a solid understanding of technical analysis and market trends, which may take time and experience to develop.
DojiCandle body size RSI-SMMA filter MTF
DojiCandle body size RSI-SMMA filter MTF
Hi. I was inspired by a public script written by @ahmedirshad419, .
I thank him for his idea and hard work.
His script is the combination of RSI and Engulfing Pattern.
//------------------------------------------------------------
I decided to tweak it a bit with Open IA.
I have changed:
1) candle pattern to DojiCandle Pattern;
2) I added the ability for the user to change the size of the candlestick body;
3) Added SMMA 200;
4) Changed the colour of SMMA 200 depending on price direction;
5) Added a change in the colour of candlesticks, depending on the colour of the SMMA 200;
6) Added buy and sell signals with indicator name, ticker and close price;
7) Added ability to use indicator on multi time frame.
How it works
1. when RSI > 70 > SMMA 200 and form the bullish DojiCandle Pattern. It gives sell signal
2. when RSI < 30 < SMMA 200 and form the bearish DojiCandle Pattern. It gives buy signal
settings:
basic setting for RSI, SMMA 200 has been enabled in the script to set the levels accordingly to your trades
Enjoy
Reverse Relative Strength Indicator [CC]The Reverse Relative Strength Index was created by Giorgos Siligardos (Stocks & Commodities V. 21:6 (18-30)). It is a handy indicator that reverse engineers the RSI price calculation to show what the price would have to be for the RSI value to match our chosen input. You can select your chosen RSI level using the RSI Level input for this indicator. For example if you wanted to see what the price would be for the RSI value to match the oversold level then you would set the RSI Level for 30 and it will plot that price on the chart. This uses some simple math to extrapolate the price with some basic algebra from the typical RSI calculation. This, of course, is a very similar concept to my previous Reverse Moving Average Convergence Divergence script. This indicator formula can be used for any oscillator with some slight tweaking and could also be customized to show the price for overbought and oversold levels, which I will probably do in the near future. This indicator is useful in many ways such as a trend indicator as my example shows or for a price projection tool. For example, if you had a current RSI level of 66 and it was going up and you want to see what the price would be if it reached the overbought level then you could do that. Let me know what works well for you and if you have any suggestions for how to further improve upon this script. I have included darker colors to show stronger signals and lighter colors to show normal signals. Buy when the line turns green and sell when it turns red.
I have a bunch of backlogged scripts that I'm trying to publish, so I figured I would focus on my RSI scripts since I have a bunch, so be prepared to see a bunch of those over the next week or so. Let me know if there are any other scripts you would like to see me publish!
NSDT Regular CandlesWhen using Range charts on TradingView, the only candle appearance option is "Range Bars", which are those little thin ones that can be hard to see.
So I made this candle indicator that can be used to plot Regular Candles over the Range Bars for a standard view.
Here is the same chart - only showing the original Range Bars