NSDT Fair Value GapThis script is our version of the "Fair Value Gap".
A Fair Value Gap is nothing more than a series of 3 candles with a gap between a candle high/low and a candle high/low two candles prior.
For example:
A Gap Up - the Low of a candle is higher than the High of two candles back.
A Gap Down - the High of a candle is lower than the Low of two candles back.
Typically, on a Gap Up, the trader would wait for the price to re-enter the Gap, and take a Long position.
Typically, on a Gap Down, the trader would wait for the price to re-enter the Gap, and take a Short position.
We found that simply trading through the Gaps (fill the gap) produced a better result. So we reversed the procedure and the colors to show our suggested direction.
We have added inputs so the trader can determine the size of the Gaps to be plotted on the chart. A minimum and maximum can be set.
The number of Gaps to be displayed can be adjusted.
There is a option to remove Gaps that had been filled, to help keep a clean chart.
W-m-pattern
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:
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
Tailored-Custom Hamonic Patterns█ OVERVIEW
We have included by default 3 known Patterns. The Bat, the Butterfly and the Gartley. But have you ever wondered how effective other,
not yet known models could be? Don't ask yourself the question anymore, it's time to find out for yourself! You have the option to customize
your own Patterns with the Backtesting tool and set Retracement Ratios and Targets for your own Patterns. In addition to this, in order to determine
the Trend at a glance and make Pattern detection more efficient, we have linked the calculation of Patterns to Bands of several types to choose
from (Bollinger, Keltner, Donchian) that you can select from a drop-down menu in the settings and play with the Multiplier
and the Adaptive Length of the Patterns to see how it affects the success rate in the Backtesting table.
█ HOW DOES IT WORK?
- Harmonic Patterns
-Pattern Names, Colors, Style etc… Everything is customizable.
-Dynamic Adaptative Length with Min/Max Length.
- XAB/ABC Ratio
-Min/Max XAB/ABC Configurable Ratio for each Pattern to create your own Patterns.
(This is really the particular option of this Indicator, because it allows you to be able to Backtest in real time
after having played at configuring your own Ratios)
- Bands
-Contrary to the original logic of the HeWhoMustNotBeNamed script, here when the price breaks out of the upper Bands
(example, Bollinger band, Keltner Channel or Donchian Channel) , with a predetermined Minimum and Maximum Length and Multiplier, we can consider
the Trend to be Bearish (and not Bullish) and similarly when the price breaks down in the lower band, we can consider the Trend
to be Bullish (not Bearish) . We have also added the middle line of the Channels (which can be useful for 'Scalper' type Traders.
-The Length of the Bands Filter is directly related to the Dynamic Length of the Patterns.
-You can use a drop-down menu to select from the following Bands Filters :
SMA, EMA, HMA, RMA, WMA, VWMA, HIGH/LOW, LINREG, MEDIAN.
-Sticky and Adaptive Bands options has been included.
- Projections
-BD/CD Projection Ratio configurable for each Pattern.
(Projections are visible as Dotted Lines which we can choose to Extend or not)
- Targets
-Target, PRZ and Stop Levels are set to optimal values based on individual Patterns. (The PRZ Level corresponds to point D
of the detected Pattern so its value should always be 0) but you can change the Targets value (defined in %) as you wish.
Again here, you have the option to fully configure the Style and Extend the Lines or not.
- Backtesting Table
-As said previously, with the possibility of testing the Success Rate of each of the 3 Customizable Patterns,
this option is part of the logic of this Indicator.
- Alerts
-We originally believe that this Indicator does not even need Alerts. But we still decided to include at least one Alert
that you can set for when a new Pattern is detected.
█ NOTES
Thanks to HeWhoMustNotBeNamed for his permission to reuse some part of his zigzag scripts.
Remember to only make a decision once you are sure of your analysis. Good trading sessions to everyone and don't forget,
risk management remains the most important!
FOREX MASTER PATTERN Companion ToolWhat This Indicator Does
The Forex Master Pattern uses candlesticks, which provide more information than line, OHLC or area charts. For this reason, candlestick patterns are a useful tool for gauging price movements on all time frames. While there are many candlestick patterns, there is one which is particularly useful...
The Engulfing Pattern
An engulfing pattern provides an excellent trading opportunity because it can be easily spotted and the price action indicates a strong and immediate change in direction. In a downtrend, an up candle real body will completely engulf the prior down candle real body (bullish engulfing). In an uptrend a down candle real body will completely engulf the prior up candle real body (bearish engulfing).
Used in conjunction with the FOREX Master Pattern value line, the Engulfing Pattern can assist the trader with reversal timing or trend confirmation during the expansion and trend phases.
As shown in the screenshot below. Engulfing Candles usually precede a sharp move in price in the direction of the engulfing candle.
As shown in the screenshot below, when the Show Lines option is ON while using the indicator, both red and green lines are drawn on the chart automatically when engulfing candles form. These lines are projected forward 100 bars and tend to be reliable support and resistance areas. These areas are typically hidden from view.
In addition to the Show Lines option, the indicator (by default) creates boxes around trading zones that are created when an engulfing candle is formed. (There is an option to hide these from view if desired).
As seen in the screenshot below, these areas / zones are wider than a line and encompass a resistance / support zone rather than a specific price. Liquidity is usually high in these areas and a lot of selling / buying occurs here. These zones are drawn in advance out into the future giving the trader an idea of where price will revert to eventually.
A combination of LINES and AREAS can be used giving the user a better idea of where within the zone price will go.
As seen on the screenshot below, this combination provides a pretty accurate indication of the reversal point well in advance.
As seen in the screenshot below, when a ZONE / AREA has been fully breached (crossed) by price, the area is deactivated an no longer continues forward on the chart. Until price breaches an area, it remains valid and continues on the chart until and only if it is breached by price.
The Indicator is fully customizable.
The use can change the color of the engulfing candles, the color of the zones, transparency etc. You can turn OFF or ON any of the features such as lines, zones, bar coloring, and plotted arrows.
I really hope you get value from this indicator and... HAPPY TRADING!!
1-2-3 Pattern (Expo)█ Overview
The 1-2-3 pattern is the most basic and important formation in the market. Almost every great market move has started with this formation. That is why you must use this pattern to detect the next big trend. In fact, every trader has used the 1-2-3 formation to detect a trend change without realizing it.
Our 1-2-3 Pattern (Expo) indicator helps traders quickly identify the 1-2-3 Reversal Pattern automatically. By analyzing the price action data, the indicator shows the pattern in real-time. When the pattern is discovered, the 1-2-3 Pattern (Expo) Indicator notifies you via its built-in alert feature! Catching the upcoming big move can't be that much simpler.
█ How to use
The 1-2-3 pattern is used to spot trend reversals. The pattern indicates that a trend is coming to an end and a new one is forming.
-----------------
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!
Fake breakHi Traders,
I've developed an indicator which can detect fake-breaks on the chart.
In the following you'll find the definition of the fake break candles and also you will find how to recognize it on the chart with practical examples.
What is the fake break pattern?
Sometimes support and resistance lines broke with a full body and strong candles that gives us the idea of sharp movements on the chart but suddenly the next candle returns all the path of the previous candle. in this case we can say fake break is happening on the chart.
This indicator detect fake break patterns based on two criteria:
1. It uses AverageTrueRange indicator to measure the strength of the pattern.
2. The returning candle should engulf minimum 75% of the break candle.
This indicator plot 2 terms in the name of "FB-D" and "FB-U" that are abbreviations of the "Fake Break Down" and "Fake Break Up".
You can also set alerts to get notified when fake breakout happens on the chart.
Notice: This pattern is only acceptable in valid support and resistance zones and you can not rely on it everywhere on the chart (specially in the middle of the waves).
Notice: The source code of this indicator is open and you are allowed to use it on your scripts by mentioning the name of author.
Disclaimer: This is not a financial advice or any signal to buy or sell, the goal of developing such an indicator is to use for educational purposes.
VWAP/EMA50/EMA200We script this one for combining VWAP , EMA50 and EMA200. The tool is fantastic if traders know how VWAP , EMA work? Just adding this script in your favorite and work like charm:
VWAP: How to trade with that
- One of the simplest uses of the VWAP is gauging support and/or resistance.
- A trader who is long a stock can use the VWAP as a target exit if its trading below.
- A stock trading over intraday VWAP may be bullish , while a stock trading under may be bearish .
EMA 50/EMA200: How to trade with that timeframe 50-day or 200-day period
- Identify the trend of market in longterm
- Golden-cross (short term EMA cross above longterm EMA ) is call golden-cross signals. It is opportunity for buying.
- Deal-cross ( short term EMA cross below longterm EMA ) is call dead-cross signals. It is opportunity for selling.
- Identify support levels
- Identify resistance levels
Let me know if you see anything else that should be added/changed.
Fibonacci Timing PatternThe Fibonacci Timing Pattern is a price-based counter that seeks to determine short-term and medium-term reversals in price action. It is based on the following set of conditions:
* For a bullish Fibonacci timing signal: The market must shape 8 consecutive close prices where each close price is lower than the close prices from 3 and 5 periods ago.
* For a bearish Fibonacci timing signal: The market must shape 8 consecutive close prices where each close price is higher than the close prices from 3 and 5 periods ago.
The signals of the pattern are ideally used in a sideways market or used in tandem with the trend (bullish signals are taken in a bullish market and bearish signals are taken in a bearish market).
K's Reversal Indicator IK's reversal indicator I is a special combination between Bollinger bands and the MACD oscillator. It is a contrarian indicator that depends on the following conditions:
• A buy signal is generated whenever the current market price is below the 100-period lower Bollinger band while simultaneously, the MACD value must be above its signal line. At the same time, the previous MACD value must be below its previous signal line.
• A sell (short) signal is generated whenever the current market price is above the 100-period upper Bollinger band while simultaneously, the MACD value must be below its signal line. At the same time, the previous MACD value must be above its previous signal line.
The way to use K's reversal indicator is to combine it with your already long/short bias in a sideways/range market in order to maximize the probability of success.
Limitations of the indicator include the following:
• There are no clear exit rules that work well on average across the markets. Even though K’s reversal indicator gives contrarian signals, it does not show when to exit the positions.
• As with other indicators, it underperforms on some markets and is not to be used everywhere.
• False signals tend to occur during trending markets but there is no proven way to detect a false signal.
Candilator RSI [AstrideUnicorn]OVERVIEW
The name Candilator comes from blending the words "candlestick" and "oscillator". And as the name suggests, this indicator is a good old RSI plotted as a candlestick chart. To produce a candlestick chart, Candilator RSI calculates four RSI's based on the open, high, low, and close time series. It also has a candlestick patterns detection feature.
HOW TO USE
You can use Candilator RSI as a normal RSI to analyze momentum, detect overbought and oversold markets, and find the oscillator's divergences with the price. You can also get creative and apply all sorts of technical analysis to the RSI candlestick chart, including candlestick patterns analysis.
Candilator RSI can automatically scan the price for some candlestick patterns in the overbought and oversold zones. This feature can help detect price reversals early.
SETTINGS
The indicator settings are divided into two groups: Main Settings and Pattern Detection. In the Main Settings, you can find standard RSI settings. In the Pattern Detection part, you can turn on and off the automatic search for a particular candlestick pattern.
Manual Backtest - Flat the ChartThis script is an utility tool for manual backtesting.
The main problem in backtesting a discretionary strategy is the bias of knowing the future result of the market, in this way all the market will be crushed into a flat line, this way you can avoid bias.
The way to use this indicator is easy and made by 4 step:
Step 1 : add to an asset you won't backtest and put the auto scale on
Step 2 : go to the asset you will backtest and scroll left until the date you want to start
Step 3 : use the replay function of tradingview (15 min chart won't go back more than 18 month)
Step 4: toggle off the indicator or remove from the chart (untill next asset to backtest)
That's not a complex indicator but is what you need to do a fair backtesting
Rational Root TimelineThis script is based on RationalRoot's spiral btc chart. Since I dont know how to make spirals in pinescript I just flattened it out into a readable chart. All this shows is the log price for btc over a 4 year timeframe. I found it interesting how well things line up with this idea. The white circle just shows the current day price location. You need to be on the Daily timeframe to view this correctly.
Doji Hunter█ OVERVIEW
This script is built to search for 8 different Doji candlestick patterns in markets and makes them appear on screen with bar coloring and creating color-coded labels/shapes. It will identify the following variants based upon user input for various rules to abide by:
Gapping Up
Gapping Down
Gravestone
Dragonfly
Long-Legged
Rickshaw Man
Northern (Doji in uptrend)
Southern (Doji in downtrend)
Note: for the remainder of this description, the types for inputs will be marked by italic text.
█ OPTIONS
This script features a wide range of options available to the user to modify how it functions. The first set of inputs dictate how the trend analysis is done with moving averages. The second and third sets of inputs dictate specific rules for how Doji candles are analyzed and the colors used for when they appear.
█ INPUTS (short)
1 — Moving Average Rules:
The Northern and Southern Doji variants require some trend analysis which will be done by Moving Averages. The inputs in this section change various things about the moving average(s) to be used. In the second section of inputs, there is one boolean option that will nullify the need for trend detection and consolidates the Northern and Southern Doji variants into one.
2/3 — Doji Rules and Colors:
The next two sections of inputs correspond to the various rules that dictate how various doji variants will be analyzed, as well as the colors that correspond to each variant. The colors will also apply to each of the labels/shapes used.
4 — Diagnostics:
The last boolean will allow the user to see extra detail with regards to how and when dojis are detected. Note: This is not a part of any prior section and is simply included as a last functional item to the list of all inputs.
An example of multiple labels being shown on screen for various types of Dojis (DJI 1D chart):
█ INPUTS (extended)
1 — Moving Average Rules:
This section consists of 10 different inputs specific to the rules on how the moving average functions for trend analysis.
"Trend Rule" ( string list) determines which Moving Average will be used for trend detection. It has 3 options: "MA 1", "MA 2", or "BOTH". The second input "Trend Source" determines which OHLC (or combination) value to use in comparison to either MA 1 or MA 2 (EX: Trend Rule -> "MA 1" and Trend Source -> "close": if close > MA 1 -> uptrend, downtrend otherwise). If "BOTH" is selected then "Trend Source" is ignored and added nuance in the script ensures that the shorter MA being above the longer MA yields an uptrend (downtrend otherwise).
The next 8 inputs focus on 4 different parts of both MA 1 and 2.
Length ( integer(s) )
Color
Switch between SMA/EMA ( boolean(s) )
Source for MA
Note: Additional attention to detail has been made here as trend direction is ignored if "BOTH" is selected for the MA Rules and the lengths of both Moving Averages are set to be the same.
2/3 — Doji Rules and Colors:
The next two sections include 19 inputs that are related to how this script will analyze and identify the different variants of Doji candles.
"Identify Pattern On Close" ( boolean ) modifies which candles are to be used for determining when Doji candles are recognized. This changes an offset used for historical reference on some global variables which will force the script to only identify patterns after the current candle has closed.
"Doji Body Tolerance" ( float ) tells the script the maximum % the candle body may be of the high-low range to be considered a Doji candle.
"Doji Wick Sample" ( integer ) defines how many prior candles to sample from in calculating the current average upper and lower wick sizes.
"Simplify Northern/Southern Dojis" ( boolean ) makes this script ignore trend direction for Doji detection and consolidates Northern and Southern Dojis into being recognized as the same. This has an added effect of removing the plotted moving averages from the screen.
"Northern/Southern Display" ( string list ) that has multiple options for how Northern and Southern Dojis will be displayed on screen. Because of how labels may be extremely taxing on TradingView's servers to display, the default setting is "shapes" where Northern and Southern (N/S) Dojis will be marked with a colored triangle at the top of the candle. If "Simplify Northern/Southern Dojis" is true, all N/S Dojis will be marked with an x-cross instead. Other options include "labels" which enables the use of labels accompanied by their respective tooltip and color, or "none" where N/S Dojis will be only noticeable by their changed barcolor.
"Allow Gravestone/Dragonfly Shadows" ( boolean ) allows a bit of additional nuance to the definition of Gravestone or Dragonfly Dojis with small shadows.
"Gravestone/Dragonfly Shadow Tolerance" ( float ) defines the maximum % that the lower wick/upper wick (respectively) may be relative to the high-low range for Gravestone or Dragonfly Dojis to still be considered valid.
"Doji Long Wick Setting" ( string list) is a list of settings for three different ways of confirming if a Doji is Long-Legged. The settings are "one", "two", and "average". These define how many wick lengths of a candle need to exceed the calculated average wick lengths (EX: "both" -> upper wick length > upper wick average and lower wick length > lower wick average). The "average" setting will combine the lengths of both wicks and both prior wick averages, divide both of these sums by 2 and compare them instead.
"Doji Long Wick Tolerance" ( float ) defines how large compared to the averages that wick lengths need to be in order for them to be considered "Long-Legged" (EX: 1.50 -> upper/lower wick needs to exceed 150% the average of previous upper/lower wicks).
"Rickshaw Man Body Placement Tolerance" ( float ) defines how close to the high-low range's midpoint the candle body's midpoint needs to be in order for it to be considered a Rickshaw Man Doji candle instead.
The remaining 9 inputs define the colors to use for differentiating between all Doji variants this script will recognize.
█ USAGE
My hope for this script is that users find this easy to use/understand and will tinker with the input values to better identify Doji candlesticks across a wide range of markets.
Suggestions for changes in the future are welcome.
Volatility OscillatorThis tool displays relative volatility and directional trend. Excellent way to pickup diversions and reversals. Length can be lowered to 11 or 13 in settings to show price range.
Can be used to identify patterns such as parallel channels and likely direction of price action as pictured below.
Swing Failure Pattern Inquisitor SFP Inquisitor
v0.2a
coded by Bogdan Vaida
Code for Swing High, Swing Low and Swing Failure Pattern.
Note that we're still in the alpha version, bugs may appear.
Note that the number you set in your Swing History variable
will also be the minimum delay you see until the apples appear.
This is because we're checking the forward "history" too.
The SFP will only check for these conditions:
- high above Swing History high and close below it
- low below Swing History high and close above it
In some cases you may see an apple before the SFP that "doesn't fit"
with the SFP conditions. That's because that apple was drawn later and
the SFP actually appeared because of the previous apple .
20 candles later.
Legend:
🍏 - swing high
🍎 - swing low
🧺 - candle where the last swing was driven from
🍌 - swing failure pattern
🍎🍌 - hungry scenario: swing low but also a SFP compared to the last swing
Wedge MakerThis tool is used to draw wedges. Traders can choose which pivot points to draw lines from in settings. Wedge Maker does not automatically detect current wedge and is required to be tweaked in settings.
Test: Pattern RecognitionEXPERIMENTAL:
a test on how to compare price at different frequency's with static patterns.
Zidni Vertical Run Down Vertical Run UpVertical Run Down and Vertical Run Up based on Tom Bulkowski Chart Pattern with elaboration in percentage of the drop and up.
Bullish Piercing ScannerA piercing pattern is known in technical analysis to be a potential signal for a bullish reversal. The formation in its strictest form is rather rare, but tends to perform better the longer the downtrend in front of it. When technical studies such as RSI, Stochastic or MACD are showing a bullish divergence at the same time a piercing pattern appears, it strengthens the likelihood that this two-day pattern is meaningful.
This is a two-candle pattern. The previous candle must be bearish, the recent candle must open below the close of the previous candle, the recent candle must close above the middle of the previous candle. You can adjust the closing and opening gap between the two candles within this scanner's settings (price).