FunctionPatternFrequencyLibrary "FunctionPatternFrequency"
Counts the word or integer number pattern frequency on a array.
reference:
rosettacode.org
count(pattern)
counts the number a pattern is repeated.
Parameters:
pattern : : array : array with patterns to be counted.
Returns:
array : list of unique patterns.
array : list of counters per pattern.
usage:
count(array.from('a','b','c','a','b','a'))
count(pattern)
counts the number a pattern is repeated.
Parameters:
pattern : : array : array with patterns to be counted.
Returns:
array : list of unique patterns.
array : list of counters per pattern.
usage:
count(array.from(1,2,3,1,2,1))
W-m-pattern
FunctionDynamicTimeWarpingLibrary "FunctionDynamicTimeWarping"
"In time series analysis, dynamic time warping (DTW) is an algorithm for
measuring similarity between two temporal sequences, which may vary in
speed. For instance, similarities in walking could be detected using DTW,
even if one person was walking faster than the other, or if there were
accelerations and decelerations during the course of an observation.
DTW has been applied to temporal sequences of video, audio, and graphics
data — indeed, any data that can be turned into a linear sequence can be
analyzed with DTW. A well-known application has been automatic speech
recognition, to cope with different speaking speeds. Other applications
include speaker recognition and online signature recognition.
It can also be used in partial shape matching applications."
"Dynamic time warping is used in finance and econometrics to assess the
quality of the prediction versus real-world data."
~~ wikipedia
reference:
en.wikipedia.org
towardsdatascience.com
github.com
cost_matrix(a, b, w)
Dynamic Time Warping procedure.
Parameters:
a : array, data series.
b : array, data series.
w : int , minimum window size.
Returns: matrix optimum match matrix.
traceback(M)
perform a backtrace on the cost matrix and retrieve optimal paths and cost between arrays.
Parameters:
M : matrix, cost matrix.
Returns: tuple:
array aligned 1st array of indices.
array aligned 2nd array of indices.
float final cost.
reference:
github.com
report(a, b, w)
report ordered arrays, cost and cost matrix.
Parameters:
a : array, data series.
b : array, data series.
w : int , minimum window size.
Returns: string report.
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.
SpyGuyTrendTrackerWorking on official documentation at the moment!
As soon as I have that ready I will update this description to incorporate that information.
Basic knowledge:
The clouds are differentiated by EMA lengths and distortion values
Yellow: Short Term
Red: Mid Term
Blue Long Term
I will get finalized documentation ASAP, until then, have fun backtesting and creating your own strategies / ideas while using this indicator!
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.
FunctionPatternDecompositionLibrary "FunctionPatternDecomposition"
Methods for decomposing price into common grid/matrix patterns.
series_to_array(source, length) Helper for converting series to array.
Parameters:
source : float, data series.
length : int, size.
Returns: float array.
smooth_data_2d(data, rate) Smooth data sample into 2d points.
Parameters:
data : float array, source data.
rate : float, default=0.25, the rate of smoothness to apply.
Returns: tuple with 2 float arrays.
thin_points(data_x, data_y, rate) Thin the number of points.
Parameters:
data_x : float array, points x value.
data_y : float array, points y value.
rate : float, default=2.0, minimum threshold rate of sample stdev to accept points.
Returns: tuple with 2 float arrays.
extract_point_direction(data_x, data_y) Extract the direction each point faces.
Parameters:
data_x : float array, points x value.
data_y : float array, points y value.
Returns: float array.
find_corners(data_x, data_y, rate) ...
Parameters:
data_x : float array, points x value.
data_y : float array, points y value.
rate : float, minimum threshold rate of data y stdev.
Returns: tuple with 2 float arrays.
grid_coordinates(data_x, data_y, m_size) transforms points data to a constrained sized matrix format.
Parameters:
data_x : float array, points x value.
data_y : float array, points y value.
m_size : int, default=10, size of the matrix.
Returns: flat 2d pseudo matrix.
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
Boom Hunter XLBoom Hunter XL is a professional trading tool designed to expose perfect entries and incredible exits. This complete ground up rebuild of Boom Hunter Pro is an absolute essential for any professional trader or anyone serious about trading. Boom Hunter XL includes many upgrades to the Pro version such as volume pressure analysis, improved pressure dots, two new support and resistance lines and volume breakout detection. It also has options to display current volume and average volume it the top right corner.
A new and improved Volume Pressure Analysis exclusive to Boom Hunter XL can be turned on or off in the settings. This provides relative volume information highlighting anomalies and key movements. It also shows volume pressure. Sometimes when crossing a support or resistance line it takes a lot of volume to move price just a little. When price action crosses or bounces off a SR line it requires very little volume to move the price a lot. What this means is traders can visually see price action getting pulled in or pushed away from a SR line. The current bar shows live directional pressure. Volume pressure is used to confirm entries and continuations.
Red wave is the main support resistance line dictating short term trend direction. Enter trades after the oscillator crosses through or even better with pressure dots or volume pressure. If the oscillator is above the red wave it is an up trend and if it is below its a down trend.
The gray wave shows medium term support/resistance and general trend. This line is much harder to cross. Price action can easily bounce within this wave or get rejected.
The strongest SR lines are the top and bottom gray lines. The resistance line will bottom out under pressure and expose a low point. Likewise the support line will roof and expose a high point.
When there is extreme pressure the gray line will drag. This signal suggests that price action will will pullback and retest and push again. Avoid entering trades in these moments as the true bottom/top has not been exposed. Following price action along longer timeframe charts will help find the true low/high.
Tracking traditional patterns makes it easy to find the next breakout and direction.
Bear patterns
Bull patterns
Volume breakouts
Drawing support and resistance lines
Example of some of the signals:
Combo 2/20 EMA & 3 Day Pattern This is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
This startegy based on 3-day pattern reversal described in "Are Three-Bar
Patterns Reliable For Stocks" article by Thomas Bulkowski, presented in
January,2000 issue of Stocks&Commodities magazine.
That pattern conforms to the following rules:
- It uses daily prices, not intraday or weekly prices;
- The middle day of the three-day pattern has the lowest low of the three days, with no ties allowed;
- The last day must have a close above the prior day's high, with no ties allowed;
- Each day must have a nonzero trading range.
WARNING:
- For purpose educate only
- This script to change bars colors.
Auto Harmonic Pattern - PRO [AlgoScopes] V1Harmonic Patterns is a powerful tool for identifying potential reversal areas in the financial markets. Auto Harmonic Pattern Pro it is based on the work of Scott Carney, a renowned trader and author who developed the concept of harmonic patterns.
Scott Carney's extensive research and contributions have greatly enhanced our understanding of market patterns and their application in trading. Auto Harmonic Pattern Pro is adapted from Scott Carney's original work on harmonic patterns, as well as other sources that have contributed to the recognition and understanding of harmonic patterns beyond Carney's initial research.
Auto Harmonic Pattern Pro offers traders a valuable tool for identifying potential reversal zones in the markets. We would like to express our gratitude to Scott Carney for his pioneering work in developing harmonic patterns, as well as to the various contributors and sources that have expanded our knowledge and understanding of harmonic patterns beyond Carney's original research.
Remember to always practice proper risk management and combine the indicator's signals with other technical analysis tools for a comprehensive trading approach.
For more information about Scott Carney and his work on harmonic patterns, you can find additional resources on his official website.
💠 ABOUT THE SCRIPT
💎 DISPLAY
⚬ The following things are displayed by default on the chart
🔸 Live patterns in trade with XABCD labels. (filled major triangle)
🔸 Entry, Stop and Target levels on chart for all live patterns. Target level are dimmed along with reducing size when they become irrelevant
🔸 Open Trades Stat table - Show patterns ID, patterns name, status for patterns, size&age, Entry, I.Stop, T.Stop and Targets (TP1 - TP4).
⚬ Highlighted present stop (and/or trailing stop if is enabled) and next target
⚬ When there are multiple patterns on chart, Entry, Stop, and Target labels & lines & PRZ* boxes are created with specific distance from each other to provide clarity to the users
*(potential reversal zone)
⬜ SETTINGS
⚬ Let's talk about some of the settings. Almost all of these settings have already been optimized and tested over time, but for some tickers it might be better to do a new test.
💎 ZIGZAG
🔸 Length - Default is set to 8. User can change settings but it is a good idea to keep with fibonacci (5, 13, 21, 34, 55 etc)
🔸 Depth - This setting is for how many pivots indicator scan to find harmonic pattern. By default it is set as 200
🔸 Recursive Algorithm - Enabled will use recursive instead standard zigzag
💎 HARMONIC PATTERN SETTINGS
🔸 Trade Direction - Default is set to show all (bearish and bullish) harmonic patterns. Can be filtered to bullish or bearish direction.
🔸 Error Percent - Default is 8. That is error percent tolerance from perfect pattern ratio.
🔸 Maximum patterns - Maximum patterns allowed on chart at any time
⚬ When it reaches the maximum patterns and the indicator finds a new one, the old patterns will be removed
- (important for algo traders because alerts for those removed patterns will no longer be a trigger)
🔸 Pattern size
⚬ Without filter will show all patterns (regardless of size)
⚬ Show only patterns for user preference size (no more two patterns because is smaller of 280 bars)
🔸 External Filter - It can be used to filter harmonic patterns. You can build your own custom trend based scripts and use it with AHP to filter trades.
⚬ The structure of the external script must be
1 for Long/Bullish patterns
-1 for Short/Bearish patterns
2 for all (Long and Short patterns)
0 Trade is not allowed
🔸 Filter Pattern Starts
⚬ When Filter starts is enabled pattern will start for logical pivot (see example)
⚬ Disabled filter will show more patterns (still can be very profitable)
💎 STOP & ENTRY & TRAILING STOP
🔸 Trail Entry Price - If Entry is still not reached and the price is still in PRZ zone, at the new high/low will adjust Entry.
⚬ Open Stats table will show the first Entry (when patterns were found) as well as the last corrected Entry (when patterns reached Entry level).
⚬ Disable this option Entry will remain at the level when patterns are found.
🔸 Enable Targets (awaiting entry) - enabled will show potential Targets for "awaiting entry" patterns (not active patterns because they have not yet reached Entry).
⚬ The Open stats table will show all other information, risk %, R:R etc).
⚬ Risky trade but with very good R:R (not recommended for inexperienced traders, very high risk of trading hitting Stop before reaching a Target)
🔸 Stop Distance - By default is set to 5. That is percent from the last low/high when the pattern reaches Entry. Stop trail from price till pattern reached Entry level.
🔸 Entry Distance - By default is set to 16. Same for SL that is percent distance from live price. You can increase/decrease percent but remember you have to give space between live price and the entry.
⚬ If entry is close to price, trade will become active too quickly
⚬ Remember if you change Stop Distance as well as Entry Distance to check Risk : Reward (recommended R:R for the first target is about 1:1)
🔸 Trailing Type - Options for trailing type, Continuous, Stepped, Breakeven and Disabled.
⚬ Continuous - When the price reaches "Trailing Active" (initial level for activating the trailing stop), T.Stop will start from Entry or Initial Stop (based on "Trailing Starts") and follow the price by Distance or Percent (based on "Trailing by").
- example one (trailing starts from Initial Stop when TP1 reached by distance/price on picture 1 and by percent on picture 2)
- example two (trailing starts from Entry when TP1 reached by distance/price on picture 1 and by percent on picture 2)
⚬ Stepped - when price reaches Trailing Active (initial level for activating the trailing stop), T.Stop will move to the previous level
- (If "Trailing Active" is set to Target2, then T.Stop will move to Target1 when price reached TP2)
⚬ Breakeven - when price reaches Trailing Active (initial level for activating the trailing stop), T.Stop will move to Entry and stay there the entire time for that harmonic trade
- (till reached all targets or reached T.Stop)
🔸 Trailing Active - When will the Trailing Stop be activated ("Trailing Type" must be enabled)
🔸 Trailing by - Distance or Percent
⚬ Distance - T.Stop will follow live price by initial distance
⚬ Percent - T.Stop will follow live price by initial percent
🔸 Trailing Starts - Entry or Initial Stop
⚬ Entry - T.Stop will start trailing from Entry level
⚬ I.Stop - T.Stop will start trailing from initial Stop level
- (Check Continuous picture for information)
💎 TARGET
🔸 Base - The level from which the calculation for Targets is made.
🔸 Target 1/Target 4 dropdown - Targets are set by default and set in the dropdown most often used for those targets.
🔸 Target 1/Target 4 custom - If the desired ratio is not in the dropdown, then it is possible to manually enter the desired ratio.
⚬ (If you want to change some of the targets, maybe to confluence with support/resistance)
💎 PATTERNS
🔸 Harmonic Patterns Type
⚬ Enable/Disable harmonic patterns by Type of patterns (for Classic and Anti patterns)
⚬ By default all patterns are enabled (for standard patterns). Users can control and select/deselect all Classic, Anti or Non Standard patterns but also disable individual patterns.
⚬ For some patterns (like Shark and Navarro 200) we change PRZ or place in different Type groups. That is just cosmetic things.
🔸 Classic - This includes all and most popular Harmonic Patterns.
⚬ Gartley (Type I)
⚬ Bat (Type I)
⚬ Butterfly (Type II)
⚬ Crab (Type II)
⚬ Deep Crab (Type II)
⚬ Cypher (Type II)
⚬ Shark (Type III)
⚬ Nenstar (Type IV)
🔸 Anti Patterns
⚬ Anti Nenstar (Type I)
⚬ Anti Shark (Type II)
⚬ Anti Cypher (Type II)
⚬ Anti Crab (Type II)
⚬ Anti Butterfly (Type III)
⚬ Anti Bat (Type IV)
⚬ Anti Gartley (Type IV)
⚬ Navarro 200 (Type IV)
🔸 Non Standard -
⚬ White Swan
⚬ Black Swan
⚬ 3 Drive
⚬ Anti 3 Drive
⚬ Wolfe
⚬ Snorm
⚬ 121 Pattern
⚬ 5-0 Pattern
⚬ Sea Pony
⚬ Leonardo
💎 PATTERN DISPLAY OPTION
🔸 Pattern Lines Size - thickness for harmonic patterns
🔸 Pattern Lines Type - type for harmonic pattern lines (solid, dotted, dashed)
🔸 Fill XAB/BCD - major harmonic triangle
🔸 Fill ABC/XBD - minor harmonic triangle
🔸 Enable XABCD Label - labels for harmonic pattern
🔸 XABCD Label Size - size for harmonic xabcd labels
🔸 Enable Ratio Label & Line - lines and labels that connect harmonic patterns levels and that show the patterns ratio
🔸 Ratio Label Size - ratio labels size
⚬ Lines for pattern ratio are set by default dashed and can’t be changed.
💎 PRZ & ENTRY | STOP | TARGET SETTINGS
🔸 Entry & Stop & Target Labels - by default is set to small (opt small & normal)
🔸 Entry & Stop & Target Lines - by default is set to show lines & labels & price (opt lines & labels & price or lines & labels or disable all)
🔸 PRZ Box size - size in bars for PRZ box
⚬ Added option when it is not readable on chart pattern names or entry/stop/targets offset
⚬ Maximum (last pattern) can be drawn up to 500 bars in future or you will get error for script (use this option only when you need)
🔸 PRZ Box Type of Spacing - distance between PRZ boxes. "Auto" will make the maximum distance when there are more than 3 patterns on the chart for better visibility
- (the maximum can be projected up to 500 bars in the future)
🔸 PRZ Box Manual Spacing - manual distance between PRZ boxes if is “PRZ Box Type of Spacing” set to manual
💎 STATS AND DISPLAY
⚬ These settings can be used to manage display of open and close statistic tables
🔸 Open Trades - By default is enabled and set to the top right position.
🔸 Closed Trades - By default is disabled and set to bottom left position.
⚬ The size of the table can be changed (by default it is set to small)
🔸 Enable Tool Tip for Table - can be enabled/disabled. Shows important information for each section related to Open or Closed tables.
⚬ Recommended enabled until everything related to tables is understood, and later disabled (it starts to get annoying when you accidentally cross the tables with the mouse and tooltip box pop up)
💎 OPEN STATS
🔸 Percentage - show percentage for Targets and Stops
🔸 Risk/Reward - show patterns risk to reward for each Targets
🔸 Size/Age - show patterns size (from X to D in bars) and patterns age (distance in bars when patterns “In Trade”)
🔸 Live % & R:R - enabled will show live % and R:R if you take trade in that moment
💎 CLOSED STATS
🔸 Percentage - show stats by percent instead of numbers
🔸 Display Mode - Closed trade table have three display option, Compact, Detailed and Selective
⚬ Compact - show stats for Long/Bullish and Short/Bearish patterns
⚬ Selective - show stats just for active patterns
⚬ Detailed - show stats for each enabled patterns
- All stats is for “Backtest Bars” if enabled.
- I removed some things from the previous indicator (R:R as well as trailing R:R and win rate) because I think they are not relevant in Closed Table for trade or for statistics (Open Table have that)
💎 PATTERN | CHART COLOR THEME
⚬ By default it is set to Light color theme. Color theme will affect pattern lines, XABCD labels, ratio lines and label, entry/sl/targets labels and text in the open statistics table.
🔸 Dark Theme / Light Theme - Users can change any default individual color for dark or light theme (transparency too).
⚬ Light/Dark Theme suits dark or light chart background or user can change all color to preferred trade style.
⚬ Users have extra control to change all color to preferred trade style.
💎 ALERTS
⚬ Alerts - These settings help users to choose the type of alerts they want to receive.
🔸 New - New Harmonic Pattern is identified
🔸 Entry - Harmonic Pattern reached Entry level
🔸 Target 1/Target4 - Alert when patterns reached on of Target levels
🔸 Closure - Harmonic Pattern trade is closed. Reached all Targets or Stop or Trailing Stop (if is enabled)
🔸 Long & Short placeholders - Enabled will change for alerts Bullish/Bearish text for Long/Short text
⚬ example of custom alerts with some placeholders
💎 BACKTEST WINDOW
🔸 Backtest bars - Enabled will scan patterns for that bar range (default is set to 5000)
🔷 TOOL TIP
⚬ In setting you have help from tooltip to give you almost all this information for easy understanding. Hover mouse above tool tip and windows with info will appear.
⚬ On the chart, tool tip is added for each individual Harmonic pattern to show extra information (pattern ratio, type of harmonic and where often that pattern appears in Elliott wave fractal)
⚬ Tooltip for tables will also provide all the information related to Open and Closed tables. Disabled tooltip for tables will hide all information, but the tooltip for patterns will still remain.
🔴 Possible Errors
⚬ If a mistake is made in the settings and, for example, TP2 is set to 0.618 ratio and TP3 is changed to 0.5 ratio
- (the larger target is set to a smaller ratio than the smaller target), a red text will appear over most charts to indicate the error.
⚬ If Trailing Type is enabled and "Trailing Active" and "Trailing Starts" are set to the same level (Entry), a red text will appear on the charts to indicate an error
- (change "Trailing Active" to a higher level, TP1, or lower "Trailing Starts " to "I.Start")
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.
SMART4TRADER-INDEX PATTERN BREAKOUT MULTIThis indicator is designed to analyze the breakdown of previous values of the candles, not only on the selected tool, but also on others. The indicator is well used on the indices of the stock market. In the default indicator, recommended indexes are configured.
The indicator summarizes the results of the analysis of all tools and shows in the form of columns that are above and \ or below the zero line. Additionally, the indicator has two horizontal lines above zero (green) and two horizontal lines below zero (red). The breakdown of these nearest to zero lines signals the possible beginning of the move towards which the column is directed. If the column reached the left line, this means that a very strong trend is noticeable on all the tools selected in the settings.
Additionally, the indicator has a blue line that shows the average value of the columns both above and below the zero line. And also added Hull Moving Average Period (9).
BUY signal:
HIGH > HIGH(1) и LOW > LOW(1)
SELL signal:
HIGH < HIGH(1) и LOW < LOW(1) и LOW < LOW(2)
--------------------------------------------------------
Этот индикатор предназначен для анализа пробития предыдущих значений свечей, не только на выбранном инструменте, но и на других. Индикатор хорошо использовать на индексах фондового рынка. В индикаторе по умолчанию настроены рекомендуемые индексы для анализа.
Индикатор суммирует результаты анализа всех инструментов и показывает в виде столбиков, которые находиться выше и\или ниже нулевой линии. Дополнительно на индикаторе есть две горизонтальные линии выше нуля (зеленый) и две горизонтальные линии ниже нуля (красный). Пробитие этих ближайших к нулю линий сигнализирует о возможном начале движения в сторону, в которую направлен столбик. Если столбик достиг крайней линии, то это значит, что очень сильный тренд заметен на всех инструментах выбранных в настройках.
Дополнительно в индикаторе есть синяя линия, которая показывает среднее значение столбиков как выше, так и ниже нулевой линии. А также добавлена HULL MOVING AVERAGE период (9).
Сигнал на покупку:
HIGH > HIGH(1) и LOW > LOW(1)
Сигнал на продажу:
HIGH < HIGH(1) и LOW < LOW(1) и LOW < LOW(2)
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.
Harmonic Patterns ProHello All,
We need to make things better & better to solve the puzzle and I try to do my best on this way for the community. now I am here with my Harmonic Patterns Pro script.
Harmonic Pattern recognition is the basic and primary ability any trader develops in technical analysis. Harmonic pattern recognition takes extensive practice and repetitive exposure. in general chart patterns are categorized into “continuous” and “reversal” patterns. Harmonic patterns construct geometric pattern structures using Fibonacci sequences. These harmonic structures identified as specified harmonic patterns provide unique opportunities for traders, such as potential price movements and key turning or trend reversal points. This script is developed to find following patterns by using the options you set. I have to say that this is not a strategy and you should not use this script blindly, instead, I strongly recommend you to create your own strategy using this script with other tools/indicators, such moving averages, Support/Resistance levels, volume indicators, sentiment indicators etc.
- Following Harmonic Patterns are available in this version:
-->Gartley
-->Butterfly
-->Bat
-->Crab
-->Shark
-->Cypher
-->Alternate Bat
-->Deep Crab
-->5-0
-->3-Drive
-->AB=CD
-->Descending Triangle
-->Ascending Triangle
-->Symmetrical Triangle
-->Double Top
-->Double Bottom
How the script works and finds harmonic patterns:
- It uses zigzag like other harmonic pattern script but there is a difference. this scripts searches up to 200 bars, finds/creates up to 200 XABCD using zigzag waves and searches predefined harmonic patterns
- It can find multiple harmonic patterns on a candles with different sizes and lengths
- Each pattern is shown using its own color (you can set 8 different colors)
- it shows Entry, Target1, Target2 and Stop-loss levels for each found Patterns
- It shows pattern validation zones for each found pattern
- it has all-in-one alerts. you set the alerts you want in the indicator options and you create only 1 alert for each symbol.
- it has prediction future and it can show many predicted patterns at the same time, each predicted patterns validations zones are shown separately
- While on real-time bar it searches and shows patterns for the visible area
it has followng alerts: . these in all-in-one alerts. it means that you choose the alerts in the options and enables any of them and then create only one for each symbol. and you get eany alert you choose. (" Any alert() function call "). in this version "Any alert() function call" alert is only alert you can use, if I get some requests I can try to other alerts as well.
New Pattern Found
Pattern Updated
Entered Position
Reached Target
Stop-loss
Validation zone is calculated using XABC points any pattern by using Y-Axis error rate. so if you increase Y-Axis error rate then the script can find much more Harmonic patterns.
X-Axis Error Rate is used for a few pattern such AB=CD for the distance of AB wave and CD wave.
The script can show Recommended Entry, Target 1, Target 2 and stop-loss levels for each active patterns. of course you can use these levels or you can set your own levels. you can see the screenshot below.
The script can show statistics panel. when statistic panel is enabled then no pattern is shown on the chart, the script shows ONLY statistics panel. This was done because of complexity of the script.
If you enables Prediction then pattern checks all possible XABC formations in the last 200 bars and finds/shows predicted patterns if there is any.
if you "replaying" then the script searches patterns only for last bar (if any update on zigzag on last bar), not for historical ones. you should take care while you use "Replay" feature of Tradingview
Now lets see the options:
Minimum ZigZag Period: this is minimum Zigzag Period to create new Zigzag wave. default value is 10 and minimum value is 4
Y-Axis Error Rate %: this is the error rate to create validation zones for each pattern, there is almost no perfect pattern, so we try to create a zone using error rate
X-Axis Error Rate % : this is used for a few pattern (such AB=CD) to check wave lengths on time basis
Minimum Pattern Length: This is Minimum Length for the Patterns to be searched. in Number of Bars
Maximum Pattern Length : This is Maximum Lengths for the Patterns to be searched. in Number of Bars
Max Number of XABCD to search: Maximum Number of ABCD to search pattern on each move, there are many possible XABCDs on the chart, this limitation is the number for how many of them will be searched
Find Patterns for: is the option about taking position. there are three options: "Long and Short", "Only Long", "Only Short"
Max Patterns on Each Bar: Maximum Number of Patterns that can be found on each bar, by default it's 3
Keep Pattern Until: you have two option "Target1" and "Target2". when a pattern found and if it reach any of these targets it is accepted as it's reached target and removed. this is also used inthe statictics panel!
Show Recommended Entries & Targets: if enabled then the script can show "Recommended" Entry, target1, target2 and stop-loss leves. you can use these levels or you can use your own calculation for each pattern
Entry = % of Target 2 : Entry Level for each pattern is calculated using the distance between D positon of the pattern and target 2. by default it's 16%, you can set it as you wish
Entry&Target Line Style: you can set line style for entry/target/stop-loss levels
Show Pattern Validation Zones: as explained above, for each pattern validation zone is created using error rate (Y-axis error rate). you can see it for each pattern
Source for Invalidation: this source is used for validation zones. there is two options: Close or High/Low. this source is used while invalidated the pattern. by default it used "close" price as source
Line Style: this is line style for validation zones, solid, dashed or dotted
Pattern Prediction/Possible Patterns: if you enable this option then the script calculates/searches possbile patterns and shows their levels in a label if there is one or more
Show Label & Zone: this is about how you want to see predictions, there are two choices: "Show Only Label", "Show Label & Zone"
Show Statistics Panel : if you enable this option then the script starts searching all harmonic patterns from the first bar for the last bar and keeps statistics for all of them and the shows in a table. you can see screenshot below
Panel Position: you can set panel location of statistics panel using this option
Show Rates Between Waves: if you enable this option then rate between the waves are shown. by default it's enabled
Keep Last Pattern on the Chart : if you enable this option then even if pattern is invalidated/reach target/stop-loss it stays on the chart until new pattern is found. by default it's enabled
Line Style : line style for the last pattern on the chart
Patterns to Search: you have options to enable/disable the patterns listed above to find&show, you can enable/disable any pattern in the list. by default all patterns are enabled except AB=CD pattern
in the ALERTS menu you have many options to enable/disable the alerts you want. Alerts contain Symbol name, Pattern name, Direction as Long/Short, Recommended Entry, Targets, SL levels.
- New Pattern Found
- Pattern Updated
- Entered Position
- Reached Target
- Stop-loss
Show Zig Zag: if you want to see Zig Zag then you should enable this option, and you can set the colors for the Zig zag. by default it's disabled.
and some other options for coloring and line styles of the patterns..
This is how XABCD points found using zigzag waves, I tried to explain it in the video below:
Validation zones and Entry, Target1, Target2 and Stop-loss levels:
Each pattern has its own color, you can see which levels, letters, lines etc belongs to which pattern:
Pattern prediction: you can enable it and change its background color:
How Statistics panel looks like. if there is active pattern then it's shown in different color in the table
This screenshot shows how the script finds and shows multiple patterns on a candle:
And some examples for triangles and Double top/bottom patterns:
Symmetrical triangle:
Ascending triangle:
Double bottom
and many others..
While using different time frames the script can find same patterns, in the following screenshots you can see how same patterns found on 5 and 10 min chart. of course this depends on the Zigzag Period
in this video, the idea and the indicator options is explained:
I can say that this is very complex script and it takes very long time to develop. I used my all programming ability and Pine ability to develop it. I hope you like it and make a lot of profit.
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for the documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Enjoy!
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.
Catalogador Binarias Padron MHI DejaVuTradesQuadrant patterns with 1 minute cataloging.
This script simulates the quadrants between candles from minute 1 to 5.
set your time frame to 1M.
Ready, now we have our quadrants and we will do the analysis of these patterns using them.
Green circles indicate winning trades, and blue circles Martingale steps.
Counting candles within the quadrants (time frame m1 )
MHI
There are several variants of MHI . In our cataloguer we offer 3 variants. MHI 1, 2 and 3.
The analysis is carried out from the last three candles in the last quadrant. And the entry is made: on the first candle of the current quadrant ( MHI 1), on the second candle of the current quadrant ( MHI 2) and on the third candle of the current quadrant ( MHI 3).
MHI 1
Entry into the first candle after the quadrant analysis. First martingale (in case of loss) in the second candle and second martingale (in case of two losses) in the third candle.
MHI 2
Entry into the second candle after the quadrant analysis. First martingale (in case of loss) on the third candle and second martingale (in case of two losses) on the fourth candle.
MHI 3
Entry into the third candle after the quadrant analysis. First martingale (in case of loss) on the fourth candle and second martingale (in case of two losses) on the fifth candle.
The million dollar pattern
It is an analysis very similar to that of the MHI , with the difference that it is in the entire quadrant.
The million analysis consists of looking at all the candles in the last quadrant and entering the first candle of the current quadrant saying that that first candle will be the same color as most of the last quadrant.
In cases where we have the same number of candles (3 red and 3 green) we do not trade! And the cataloger will not count these operations.
Three Neighbors Pattern
The analysis of the pattern of the three neighbors will always be in the third candle of the quadrant. Either in M5 or M1 . And it consists of observing the third candle and entering the following ones saying that it will be the same.
Pattern C3
The C3 pattern is also an analysis in the candlestick count. We will enter the first
quadrant candle saying that it will be equal to the first candle of the last quadrant.
In the case of 1 martingale we will enter the third candle saying that it will be equal to the third candle of the last quadrant.
And finally, in need of a second martingale, the entry will be in the fifth candle saying that it will be similar to the fifth of the last candle.
Moonwalker Pattern
The moonwalker pattern is also a quadrant pattern. Our entries will be in the first, second and third candles of the current quadrant.
The analysis is performed on the third, second and first candle of the last quadrant.
The entry of the first candle will be observed in the third candle of the last quadrant, being the opposite color to that observed. Being necessary a martingale, we make our entry into the second candle that claims the opposite color to the second candle in the last quadrant. Finally, our second martingale will be on the third candle of the current quadrant with analysis in which the color will be opposite to the first candle of the last quadrant.