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:
Candlestick analysis
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
Efficiency GapsPaints inefficient candles ( where candles on both sides of a candle don't meet in the middle. )
Average True Range period and multiplier from 0.01 to 1 can be used to filter out small gaps.
Price is likely to return to these areas and they are possible support / resistance levels.
Combine with volume profile to detect low volume areas.
BB Mod + ForecastThis is a combination of two previous indicators; ALMA stdev band with fibs and Vector MACD.
Bollinger Band Mod fits the standard deviation on both sides of the center moving average ( ALMA +/- stdev / 2 ) and calculates Fibonacci ratios from stdev on both sides.
It is more averaging and more responsive at the same time compared to Bollinger Band.
Forecast is calculated from difference between origin ma ( ALMA from hl2 ) and six different period Hull moving averages averaged together and added to the center ma on both sides.
Fibonacci levels for 0.618 1.618 and 2.618 are added.
The dashed lines point towards the trend. Gives you a better idea of the current trend and momentum in the band.
Candle and BG Trend IdentifierThis indicator simply changes the background and color of candle based on the previous candle's close. If a candle closes high than the previous candle's high it will be indicated via green coloring. If a candle closes lower than the previous candle's low it will be indicated in red coloring. Additionally, grey colored candles appear when neither occur - often signifying consolidation.
These candles can be used to identify previous small lasting and long ranging trends. Areas that are heavily saturated with one specific color will likely indicate a trend.
If you are not able to see the colored candles, disable your main candle overlay in the top left by clicking on the eye icon.
Leavitt Convolution Acceleration [CC]The Leavitt Convolution Slope indicator was created by Jay Leavitt (Stocks and Commodities Oct 2019, page 11), who is most well-known for creating the Volume-Weighted Average Price indicator. This indicator didn't have a good explanation or description so I custom-coded most of it. The way it works is it will give trend spikes in the direction of the underlying trend. If you don't see a spike then it means that the stock isn't trending at the moment. One possible avenue to explore with this indicator is judging the size of the trend spike before you open a position in that direction (or the opposite direction if you are shorting). I added a normalization function using code from a good friend @loxx that I recommend leaving on but feel free to experiment with it. I have color coded the lines to turn light green for a standard buy signal or dark green for a strong buy signal and light red for a standard sell signal, and dark red for a strong sell signal.
This is another indicator in a series that I'm publishing to fulfill a special request from @ashok1961 so let me know if you ever have any special requests for me.
[JL] Fractals ATR BlockI decided to combine Fractal ROC , ATR Break, and Order Blocks to an Indicator
The Fractal ROC , ATR Break, and Order Blocks indicator combines three concepts to help traders identify potential trade opportunities and manage risk. By using a combination of Fractal ROC , ATR Break, and Order Blocks, traders can gain a deeper understanding of market dynamics and make more informed trading decisions.
Fractal ROC is a momentum-based indicator that calculates the rate of change of the price between fractals, which are turning points in the market. It is calculated by taking the difference between the closing price and the lowest price in the previous n+1 periods, and dividing it by the difference between the open price 2n periods ago and the lowest price in the previous n+1 periods. This calculation is done for both up and down fractals. When the Fractal ROC value is greater than the ROC Break Level (as determined by the input variable roclevel), it indicates a potential momentum shift in the market. This can be used to identify potential trade entries or exits, depending on your trading strategy.
ATR Break is an indicator that helps traders identify significant price movements in the market. It measures the distance between the price and the Average True Range (ATR), which is a measure of the volatility of the market. ATR Break is calculated by taking the difference between the close and high/low, and dividing it by the previous ATR value. This calculation is done for both up and down movements. When the ATR Break value is greater than the ATR Break Level (as determined by the input variable atrlevel), it indicates a significant move in the market. This can be used to identify potential breakouts or breakdowns, and can be used to set stop-loss and take-profit levels.
An Order Block is a price level where significant buying or selling activity has taken place. The order blocks made by ATR Break and Fractal ROC are drawn using boxes on the chart. When the ATR or Fractal ROC level is breached, a box is drawn with the high and low of the candle that breached the level as the top and bottom of the box, respectively. The box is then extended to the right until the end of the chart or until another ATR or Fractal ROC level is breached, at which point a new box is drawn. This allows traders to easily identify significant price movements and potential support and resistance levels on the chart. When an Order Block is identified, it can be used as a potential support or resistance level . If price approaches an Order Block from below, it is likely to bounce off this level and continue in an upward direction. Similarly, if price approaches an Order Block from above, it is likely to bounce off this level and continue in a downward direction. Traders can use these levels to identify potential trade entries or exits, as well as to set stop-loss and take-profit levels.
Overall, the Fractal ROC , ATR Break, and Order Blocks indicator is a powerful tool for traders who want to identify potential trade opportunities and manage risk. By combining these three concepts, traders can gain a deeper understanding of market dynamics and make more informed trading decisions. As with any indicator, it is important to use it in conjunction with other analysis tools and to have a clear trading plan in place.
Simple Market StructureThis indicator is meant for education and experimental purposes only.
Many Market Structure Script out there isn't open-sourced and some could be complicated to understand to modify the code. Hence, I published this code to make life easier for beginner programmer like me to modify the code to fit their custom indicator.
As I am not a expert or pro in coding it might not be as accurate as other reputable author.
Any experts or pros that is willing to contribute this code in the comment section below would be appreciated, I will modify and update the script accordingly as part of my learning journey.
It is useful to a certain extend to detect Market Structure using Swing High/Low in all market condition.
Here are some points that I am looking to improve / fix:
To fix certain horizontal lines that does not paint up to the point where it breaks through.
To add in labels when a market structure is broken.
Allow alerts to be sent when market structure is broken (Probably be done in the last few updates after knowing it is stable and as accurate as possible)
Any suggested improvement, please do let me know in the comment section below and I will try my best to implement it into the script.
Pin Candle DetectionPin candles are a variation of hammer candles that are useful in technical analysis . In particular, when combined with volume profile studies, they can be a powerful set up for long entries or other decision making.
For example, when looking at volume profiles, a long entry would be a fair value area (i.e. 40%) below the close of a pin candle. When combined with a support level , the set up is stronger.
While most scripts look for hammer candles, pin candles are somewhat different in that the length of the wick is significant.
This script and its parameters was built for ES futures 15 min chart in mind.
This script is unique in that it allows for the below parameters to be adjusted to suit other instruments and timeframes:
1. Fib level: Candle must close within a certain retracement level). My preference is 0.55. Some traders like 0.5, while others prefer 0.33
2. Wick length: Pin candles differ from pure hammers in that the length of the wick must be significant. My preference is 7 points on ES (as in $ and not ticks)
Add this script to your alerts to no longer miss these set ups.
Swing Indicator (2 before, 1 after) v2 with Dong-DangFeatures
Detection Swing (swing HIGH is the highest bar among 2 bars before and 1 bar after, and swing LOW is the lowest bar among 2 bars before and 1 bar after)
Dong-Dang (The line plot switch between a swing HIGH and LOW ==> represents the price movement)
Fixes
fix swing detection from the last version when there are 2 or more bars that have the same high or low price
======== ======== ========
ฟีเจอร์
การจับสวิง (จะเป็นสวิง HIGH ก็ต่อเมื่อแท่งนั้นสูงกว่า 2 แท่งก่อนหน้า และ 1 แท่งด้านหลัง, และจะเป็นสวิง LOW ก็ต่อเมื่อแท่งนั้นต่ำกว่า 2 แท่งก่อนหน้า และ 1 แท่งด้านหลัง)
ด๊องแด๊ง (คือเส้นที่ลากสลับไปมาระหว่างสวิง High และ Low ==> ใช้เพื่อดูการเคลื่อนที่ของราคา)
สิ่งที่แก้ไข
แก้ไขการจับสวิงจากเวอร์ชันก่อนหน้า ในกรณีที่มีแท่งเทียน 2 แท่ง หรือมากกว่า มีค่า high หรือ low เท่ากัน
======== ======== ========
Credit: Bravo Trade Academy
Strongest Supports And ResistancesDraws the best support and resistance lines. How it works:
1) Tries every possible line through lows, highs, opens, closes
2) Finds the total hit counts given the confidence interval as input to the candlesticks
3) Calculates the strength of every line according to hit count, total volumes on hits, and timestamps
4) Eliminates similar lines, confidence interval is set as input
5) Selects the strongest 20(changable as an input) lines and draws them on the graph.
Makes your work way easier!!!
Feel free to adjust the parameters for your own style!
Cheers!!
Strong Tight Closes in Strong UptrendThis indicator helps to visually identify "strong tight closes" in an uptrend. It serves to make it easier to spot not only tight but tight AND strong consolidations in an ongoing uptrend for a potential continuation entry. Please keep in mind the indicator counts with distance between Close values of 2 separate candles, that's why it's called "Tight Back to Back Candles". This doesn't identify "tight close" in a sense of very narrow range between Open and Close of a single candle, not any other volatility measures such as average true range etc.
Caution: This is not a complete strategy, it's only a visual tool for making potential continuation patterns easier to spot.
Conditions:
- Measure the difference between CLOSE values of two candles in percentages
- If the difference is lower than a certain threshold set by the user, (1.3% by default) plot a green cross below the latter candle
Filters:
- Low of both candles must be above 10EMA on the current timeframe
- Both Closes must be in the upper half of the candles' Low to High range
Happy BarsThis script works to help the trader quickly visualize specific moments in time, where certain price action bars are taking place.
Highlighting:
- inside bars
- outside bars
- inside inside bars
- inside outside bars
- outside outside bars
and allowing the trader to set alerts once the bar patterns are confirmed.