Return Line Uptrends [theEccentricTrader]█ OVERVIEW
This indicator simply plots multi-part return line uptrends and should be used in conjunction with my Downtrends, Uptrends and Return Line Downtrends indicators as a visual aid to my Trend Counter indicator.
█ 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.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend, or higher peak, and continues until a new downtrend, or lower peak, completes the trend.
• A multi-part downtrend begins with the formation of a new downtrend, or lower peak, and continues until a new return line uptrend, or higher peak, completes the trend.
• A multi-part uptrend begins with the formation of a new uptrend, or higher trough, and continues until a new return line downtrend, or lower trough, completes the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend, or lower trough, and continues until a new uptrend, or higher trough, completes the trend.
█ FEATURES
Plots
Green up-arrows, with the number of the trend part, denote return line uptrends.
█ 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.
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.
Chart patterns
Trend Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed 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.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend, or higher peak, and continues until a new downtrend, or lower peak, completes the trend.
• A multi-part downtrend begins with the formation of a new downtrend, or lower peak, and continues until a new return line uptrend, or higher peak, completes the trend.
• A multi-part uptrend begins with the formation of a new uptrend, or higher trough, and continues until a new return line downtrend, or lower trough, completes the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend, or lower trough, and continues until a new uptrend, or higher trough, completes the trend.
█ FEATURES
Inputs
Start Date
End Date
Position
Text Size
Show Sample Period
Table
The table is colour coded, consists of seven columns and, as many as, forty-one rows. Blue cells denote the multi-part trend scenarios, green cells denote the corresponding return line uptrend and uptrend scenarios and red cells denote the corresponding downtrend and return line downtrend scenarios.
The trend scenarios are listed in the first column with their corresponding total counts to the right, in the second and fifth columns. The last row in column one, displays the sample period which can be adjusted or hidden via indicator settings.
The third and sixth columns display the trend scenarios as percentage of total 1-part trends. And columns four and seven display the total trend scenarios as percentages of the, last, or preceding trend part. For example 4-part trends as a percentages of 3-part trends. This offers more insight into what might happen next at any given point in time.
Plots
For a visual aid to this indicator please use in conjunction with my Return Line Uptrends, Downtrends, Uptrends and Return Line Downtrends indicators which can all be found on my profile page under scripts, or in community scripts under the same names. Unfortunately, I could not fit all the plots with the correct offsets into one script so I had to make a separate indicator for each trend type. I decided against labels as this would limit the visual data points to 500.
Green up-arrows, with the number of the trend part, denote return line uptrends and uptrends. Red down-arrows, with the number of the trend part, denote downtrends and return line downtrends.
█ HOW TO USE
This 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 current trend will continue or fail, based on the current trend 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.
FVGs & CEs + Alerts: simple & efficient methodFair Value Gap indicator: Paints FVGs and their midlines (CEs). Stops painting when CE is hit, or when fully filled; user choice of threshold. This threshold is also used in the Alert conditions.
~~Plotted here on ES1! (CME), on the 15m timeframe~~
-A FVG represents a 'naked' body where the wicks/tails on either side do not meet. This can be seen as a type of 'gap', which price will have a tendency to want to re-fill (in part or in full).
-The midline (CE, or 'Consequent encroachment') of FVGs also tend to show price sensitivity.
-This indicator paints all FVGs until priced into, and should give an idea of which are more meaningful and which are best ignored (based on context: location, Time of day, market structure, etc).
-This is a simpler and more efficient method of painting Fair value gaps which auto-stop painting when price reaches them.
//Aims of Publishing:
-Education of ICT concepts of Fair Value Gaps and their midlines (CEs): To easily see via forward testing or backtesting, the sensitivity that price shows to these areas & levels.
-Demonstration of a much more efficient way of plotting FVGs which terminate at price, thanks to a modification of @Bjorgums's clever looping method referenced below.
//Settings:
-Toggle on/off upward and downward FVGs independently(blue and orange by default).
-Toggle on/off midline (CE).
-Standard color/line formatting options.
-Choose Threshold: CE of FVG or Full Fill of FVG: This will determine both the 'stop-painting' trigger and the 'Alert' trigger.
-Choose number of days lookback to control how many historical FVGs paint on chart.
//On alerts:
-Simple choice of 2 alerts:
~~One for price crossing into/above the nearest untouched 'premium' FVG above ( orange ). Trigger is user choice of CE or full fill.
~~Another for price crossing into/below the nearest untouched 'discount' FVG below (blue). Trigger is user choice of CE or full fill.
-Alerts set via the three dots in indicator status line.
//Cautionary notes:
-Do not use the alerts blindly to find trades. Wait until you have identified a good FVG above/below which you think price may show sensitivity to
-Usage on very low timeframes can cause unexpected results with alerts: due to new FVGs forming in realtime the Alert will always trigger at the most recent FVG above/ below having its threshold hit.
-Big thank you to @Bjorgum for his fantastic extendAndRemove method. Modified here for use with boxes and to integrate Alerts.
-Also Credit to ICT (inner circle trader) for the concepts used here: Fair value gaps and their Consequent Encroachment (CE).
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
Opening Range with FibsThe indicator uses a time range and another instrument for time reference, so that it works in the time zone you care about. I have set the default to SPX500USD since it is in EST ( SPX , ES and many futures are on Chicago time and opening range gets confused). You can change the reference instrument in the settings.
You can also change the multipliers and use other values instead of 1.272 and 1.618 for Fib extensions.
TradingView has a limit as to how many objects an indicator can create so if you want to go back further for visual backtesting - use the replay tool - it will be able to draw up to the time you selected within its limits.
Let me know if you need anything else...
Happy Trading!
Pre-market Highs & Lows on regular trading hours (RTH) chartShows pre-market highs and lows on RTH or ETH chart
-Pre-market duration user input (default is 16 'bar hours'; covering the time from S&P RTH close at 4pm >> 9:30am RTH open next day
-Displays on both RTH and ETH charts
-Written for ES (ES1! or e.g ESM2023), but tested and working on SPY, SPX
-Works across timeframes
Example usage on Electronic trading hours (ETH) chart; showing the 'bar hours' user input lookback duration visually
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.
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:
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.
Trend Line Trendlines are easily recognizable lines that traders draw on charts to connect a series of prices together or show some data's best fit. The resulting line is then used to give the trader a good idea of the direction in which an investment's value might move.
A trendline is a line drawn over pivot highs or under pivot lows to show the prevailing direction of price. Trendlines are a visual representation of support and resistance in any time frame. They show direction and speed of price, and also describe patterns during periods of price contraction.
Key Takeaways
Trendlines indicate the best fit of some data using a single line.
A single trendline can be applied to a chart to give a clearer picture of the trend.
The time period being analyzed and the exact points used to create a trendline vary from trader to trader.
The trendline is among the most important tools used by technical analysts. Instead of looking at past business performance or other fundamentals, technical analysts look for trends in price action. A trendline helps technical analysts determine the current direction in market prices. Technical analysts believe the trend is your friend, and identifying this trend is the first step in the process of making a good trade.
To create a trendline, an analyst must have at least two points on a price chart. Some analysts like to use different time frames such as one minute or five minutes. Others look at daily charts or weekly charts. Some analysts put aside time altogether, choosing to view trends based on tick intervals rather than intervals of time. What makes trendlines so universal in usage and appeal is they can be used to help identify trends regardless of the time period, time frame or interval used.
Gaps [Kioseff Trading]Hello!
This script "Gaps" is a continuation and improvement on a subset indicator included in the "Quartile Volume; Volume Aggregation; US Range Bars; Gaps)" script!
As advised by @thebearfib, the "Gaps" indicator is now standalone!
Features
Stat: Avg. Bars to Fill Up Gap
Stat: Avg. Bars to Fill Down Gap
Stat: Cumulative Up Gap % Increase
Stat: Cumulative Down Gap % Increase
Stat: Avg Up Gap % Increase
Stat: Avg Down Gap % Decrease
Nearest Unfilled Up Gaps and Down Gaps Displayed in Table
% Price Move Requirement, Including Dollar Amount, for Nearest Unfilled Gaps to Fill
Gaps Marked on Chart, Including Partially Filled Gaps and The % Amount a Partially Filled Gap Has Been Violated
Gaps Chart
The image above shows the data tables included in the indicator!
Settings
The image above shows various settings for the indicator!
The image above shows how partially filled gaps are marked using the default settings.
Exceeded price areas are shaded darker; however, by selecting the "No Partially Filled Gaps" option, the indicator will treat partially filled gaps differently.
The image above shows alternative behavior! Instead of the gap changing color it narrows in size.
The image above shows the indicator's behavior when selecting to show gap data in labels.
Therefore, when a gap is small and the box text is imperceptible, you can select to show the data in a label.
Additionally, you can select to display a "Gaps Chart".
The image above shows this feature enabled. The gaps chart shows the sequence of price gaps for the asset as candlesticks.
Thank you for checking this out; if you'd like other features included please let me know!
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
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
Daily Opening GAPPlots the daily opening gap as a box. As price moves into the box the size of the box is reduced until the gap is closed and the box no longer extends forward.
There are options to include middle lines for the center of the gap, as well as quartile lines.
While there are plenty of opening gap scripts out there none that I found tracked the closing of the gap over time.
Typical Sweeps: Pivot high/low boxes. Grade sweeps, Handles/PipsTool to show typical pip-grade/ handle-grade sweep distance above pivot highs and pivot lows
-In consolidation/ranging periods (i.e. most of the time); Highs/Lows may by swept by fairly consistent distances in typical stop raids.
-Idea is from ICT teaching on typical Pip-grade sweeps in FX (10,20,30pips). Designed to work on FX, Indices, Commodities, Bitcoin.
-Above chart shows S&P; sweeping below and then above by 5 handles.
///inputs///
~choose sweep distance handles ($) or pips: will auto-calculate depending on the asset: FX= pips; Indices/stocks/commodities = handles ($)
--(2,5,10,20,30,50,100, 500, 1000)
~choose pivot lookback: larger number for more significant swing highs/lows
~choose number of historical boxes to display
~toggle on/off Pivot high boxes and Pivot low boxes independently
~extend boxes fully to the right (default is not extend)
~toggle on/off text
~text & box formatting options
Bitcoin, hourly chart; Pivot lookback = 15; $100 sweep boxes:
Eur/Usd; 15m chart; Pivot lookback = 30; 10pip sweep boxes; Boxes extended fully to the right:
Breakout Identifier + Pivots with pos/neg/neu candlesBreakout Identifier is an indicator that displays breakouts which can be used to help a trader buy or sell. This is a volatility-based indicator that has customizable inputs. Each signal is also plotted with a pivot which can help to trade within a range or determine a trap.
To edit the gap between each signals change signal integer, goes by price.
BG colors are also assigned to candles as negative, positive, or neutral which are colored as follows:
Green = high > high of previous candle
Red = low < low of previous candle
Silver = neither of these options
Weekly Opening GAPThis indicator will plot the weekly opening gap on the chart. The gap will be carried forward until it is closed or the max line count is reached. Additionally the 1/4 levels inside the gap are plotted on the chart as weekly gaps can be large.
The weekly opening gap levels can act as targets and rejection points.
Optionally the script can also carry forward the top and bottom lines of the weekly opening gap for up to the 10 prior gaps. These lines are not removed when the gap is closed.
Role Reversal Detection Alert [MsF]Japanese below / 日本語説明は英文の後にあります。
-------------------------
When you draw a horizontal line on the W top or W bottom and be waiting for roll reversal, have you ever missed it when it rebounded at the horizontal line? It is a helpful indicator to prevent such oversight.
After the candle touches the horizontal line (including the touch of the leg), and then the candle body passes the alert judgment horizontal line, it will be alert.
The horizon line and the alert judment horizon line should be entered as parameters.
- Parameter
Input Horizontal Value: Enter the horizontal value
Band Range by pips : Enter the offset from horizontal line by pips
-------------------------
WトップやWボトムに水平線を引いてロールリバーサルを待ってる時に見事水平線で反発したのに見逃すことはありませんか?
そんな見落としを防止するためのお助け的なインジケーターです。
メイン水平線にローソク(ひげ含む)タッチ後、からアラート判定水平線を実体で抜けた場合にアラートを発報します。
メイン水平線とアラート判定水平線はそれぞれパラメータで入力する必要があります。
<パラメータ>
Input Horizontal Value:メイン水平線の価格を入力します
Band Range by pips :メイン水平線からアラート判定水平線のオフセットをpipsで入力します
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.
Random Price Action Visible Chartplots randomly generated price (closing basis) from LHS of the chart. Re-plots each time you scroll
-just a curiosity really; perhaps a lesson in seeing patterns where there are none; 'fooled by randomness' etc.
-always anchors/starts from the real close of the asset on the visible Left hand side of the chart.
-adjust ATR as you like (bigger = probably more reliable/realistic).
-adjust ATRmultiple as you like (discretionary; basically how many ATR ranges above/below last bar's random close, will the maximum random value above/below be; default is 1.5x (arbitrary).
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.
2B Reversal Pattern (Expo)█ Overview
The 2B reversal pattern , also called the "spring pattern", is a popular chart pattern professional traders use to identify potential trend reversals. It occurs when the price appears to be breaking down or up and then suddenly bounces back up/down, forming a "spring" or "false breakout" pattern. This pattern indicates that the trend is losing momentum and that a reversal is coming.
In a bearish market , the "spring pattern" occurs when the price of an asset breaks below a support level, causing many traders to sell their positions and causing the price to drop even further. However, the selling pressure eases at some point, and the price begins to rebound, "springing" back above the support level. This rebound creates a long opportunity for traders who can enter the market at a lower price.
In a bullish market , the "spring pattern" occurs when the price of an asset breaks above a resistance level, causing many traders to buy into the asset and drive the price up even further. However, the buying pressure eases at some point, and the price begins to decline, "springing" below the resistance level. This decline creates a selling opportunity for traders who can short the market at a higher price.
█ What are the benefits of using the 2B Reversal Pattern?
The benefits of using the 2B Reversal pattern as a trader include identifying potential buying or selling opportunities with reduced risk. By waiting for the price to "spring back" to the initial breakout level, traders can avoid entering the market too soon and minimize the risk of potential losses.
█ How to use
Traders can use the 2B reversal pattern to identify reversals. If the pattern occurs after an uptrend, traders may sell their long positions or enter a short position, anticipating a reversal to a downtrend. If the pattern occurs after a downtrend, traders may sell their short positions or enter a long position, anticipating a reversal to an uptrend.
█ Consolidation Strategy
First, traders should identify a period of price consolidation or a trading range where the price has been trading sideways for some time. The key feature of the "spring pattern" is a sudden, sharp move downward/upwards through the lower/upper boundary of this trading range, often accompanied by high volume.
However, instead of continuing to move lower/higher, the price then quickly recovers and moves back into the trading range, often on low volume. This quick recovery is the "spring" part of the pattern and suggests that the market has rejected the lower/higher price and that buying/selling pressure is building.
Traders may use the "spring pattern" as a signal to buy/sell the asset, suggesting strong demand/supply for the stock at the lower/higher price level. However, as with all trading strategies, it is important to use other indicators and to manage risk to minimize potential losses carefully.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
DR IDR Trading Areas [CHE]Inspired by the indicator DR/IDR V1 from TheMas7er www.tradingview.com I programmed this variant myself. I have observed that the trading times RDR (Regular Daytime), ADR (Afternoon Daytime) and ODR (Overnight Daytime) can be reasonably averaged. This average then serves as a support and resistance line in the subsequent Lines Time. If the Close value falls below this average, the background in this indicator is colored red and if the Close value rises above this average, the background in this indicator is colored green.
This Pine script is an indicator for trading areas that allows the user to define different trading periods for a symbol based on specific times. It plots three lines on the chart representing the average price movements during each of the defined trading periods, RDR (Regular Daytime), ADR (Afternoon Daytime), and ODR (Overnight Daytime). The script also shades the chart to highlight when the current price is above or below each of the three lines, and it draws dotted lines and labels to mark the start of each trading period. The indicator
is customizable, allowing the user to adjust the time periods and the UTC timezone offset.
For more information on TheMas7er Trading Strategy's DR/IDR V1, please refer to the original indicator.
Best regards
Chervolino