lib_session_gapsLibrary "lib_session_gaps"
simple lib to calculate the gaps between sessions
time_gap()
calculates the time gap between this and previous session (in case of irregular end of previous session, considering extended sessions)
Returns: the time gap between this and previous session in ms (time - time_close )
bar_gap()
calculates the bars missing between this and previous session (in case of irregular end of previous session, considering extended sessions)
Returns: the bars virtually missing between this and previous session (time gap / bar size in ms)
Detection
Johnny's Trend Lines, Supports and ResistancesInspired and based on ismailcarlik's Trend Lines, Supports and Resistances.
Additions include an overall upgrade to Pinescript v5, changes in the way resistance and support levels are calculated, improved visual queues, and additional customization options.
This indicator is meticulously crafted to provide traders with visual tools for identifying trend lines, support, and resistance levels, enhancing the decision-making process in trading activities.
Features and Functionality
Trend Lines: The indicator allows users to enable or disable trend lines, adjust the number of points to check for establishing a trend, and set parameters for trend validation, including the maximum violation and exceptions for the last bars.
Support and Resistance: It offers tools to identify and visualize key support and resistance levels based on recent pivot points. This includes adjustable parameters for the maximum violations allowed and the exclusion of recent bars from the analysis.
Pivot Points: Users can define the pivot length for calculating highs and lows, which helps in marking significant pivot points that are instrumental in trend analysis.
Alerts and Notifications: The indicator is equipped with customizable alerts for trend line breaches and pivot point formations, which can be set to trigger at different frequencies based on user preference.
How It Works
Input Flexibility: Users can adjust various settings like the length of trend lines and pivot points, enabling or disabling specific features like marking pivots, and managing alert settings directly from the indicator’s input panel.
Dynamic Analysis: By analyzing the price action relative to the calculated trend lines and pivot points, the indicator dynamically identifies potential trend reversals, continuations, and significant price levels.
Visualization: It plots trend lines and marks support and resistance levels directly on the chart, with options to extend these lines and add labels for better clarity. Violated trend lines can be visually differentiated by changing their style and width.
Practical Application
Trend Line Strategy: Traders can use the trend lines to determine the strength of the current market trend and to spot potential reversal points.
Support and Resistance Strategy: By marking where the price has historically faced resistance or found support, traders can plan entry and exit points, set stop-loss orders, or identify breakout opportunities.
Pivot Points Strategy: Pivot points serve as vital indicators for intraday trading or long-term trend analysis, providing insights into potential support and resistance levels.
Customization and Alerts
Custom Alerts: Traders can set alerts for when the price crosses trend lines or when new support or resistance levels are formed, helping them stay informed of critical market movements without having to continuously monitor the charts.
Visual Customization: Users can personalize the appearance of trend lines and labels, choosing from a variety of colors and styles to match their chart setup or preferences.
"Johnny's Trend Lines, Supports and Resistances" is an essential tool for traders who rely on technical analysis, offering detailed insights and real-time updates on market conditions, trend strength, and potential price barriers.
lib_colorLibrary "lib_color"
offset_mono(original, offset, transparency)
get offset color
Parameters:
original (simple color) : original color
offset (float) : offset for new color
transparency (float) : transparency for new color
Returns: offset color
lib_colorsLibrary "lib_colors"
offset_mono(original, offset, transparency)
get offset color
Parameters:
original (simple color) : original color
offset (float) : offset for new color
transparency (float) : transparency for new color
Returns: offset color
Divergence Finder [Multigrain]█ OVERVIEW
This indicator is a divergence finder, designed to be overlayed on top of any oscillator. By utilizing an Exponential Moving Average, rather than built-in pivot functions, this allows for insignificant pivots of the oscillator to be filtered out. Additionally, by sampling more than just the previous oscillator pivot, this allows for divergences to be found that would otherwise be overlooked through other methods.
█ CONCEPTS
Interim Price Threshold
A new metric used when determining valid divergences is the Interim Price Threshold (IPT). The IPT is the maximum percent delta the price is allowed to "poke-through" the divergent line at any given time.
Interim Oscillator Threshold
Similar to the Interim Price Threshold, the Interim Oscillator Threshold (IOT) is the maximum percent delta the oscillator is allowed to "poke-through" the divergent line at any given time.
Dynamic Midline
Commonly a static midline is utilized when determining whether a divergence may be bullish or bearish. By utilizing the built-in percentile nearest rank function, the midline is automatically and dynamically determined based on the previous 250 bars. As a result certain divergences which may otherwise be overlooked will be discovered.
█ SETTINGS
Oscillator Source: The oscillator in which you want find divergences from. Default to a MACD oscillator when unchanged.
Price Source: The price source in which you want to find divergences from.
Moving Average Length: The length of the exponential moving average used when determining the pivot points of the selected oscillator.
█ USAGES
Divergence in technical analysis can indicate a significant bullish or bearish price move. A bullish divergence occurs when an asset's price makes a new low while an indicator begins to rise. A bearish divergence occurs when the price makes a new high but the indicator under consideration makes a lower high.
intersectLibrary "intersect"
Find Line Intersection X/Y coordinates.
Simple to use, will find intersection if it exists on the segments
if the line segments do not cross on segment, an 'na' value will be returned
if you plot new items with the output coords, they still plot.
avoid this by setting a na(x) condition before plotting new items
get(l1, l2, ( optional _round) )
line intersection coordinates
Parameters:
l1 : (line) first line
l2 : (line) second line
_round : True to make an INT for plotting
if not used, will not round ( overload loophole)
Returns: with x as int if bool is used
OJLJ Elliott Waves detector (Free)This script is made to identify Elliot Waves by setting a zigzag line as principal source, it identifies patterns with the most common rules, in the chart you will see a number in each wave detected, a wave could have the characteristics to be two different waves so it will be plotted the options that could be, To identify which one is most trustable I suggest to use the Fibonacci levels options as an additional note this is a free update to my existing script.
Features:
+ All waves ? (Option to show just the 5 Wave patterns recognition)
+ Draw zigzag line (Option to show the zigzag line)
+ Supports Multiple instruments, from FOREX to Stocks
+ It works on all the timeframes
+ Show Fib levels (Option to show the Fibonacci levels)
+ Fibonacci levels fit test (Green crosses mark were should a Bull wave be to fit with a Fibonacci Level While the purple crosses show were should the wave fit to be a bear trend, the more closer with the point of the wave the most trustable Example, a 5 Wave Bull could also be a 2 Bear Wave, if the green cross is closer to the orange point of the wave then is a 5 Wave Bull, if the purple cross is closer to the orange point)
+ A background color also show when a 5 pattern is identified
+ The way to plot the zigzag can be changed with 3 Input options
Characteristics to add in future updates (Please if you like it you can support me with coins):
+ Detect more than 1 cycle at the same time
+ Use a volume indicator to identify how many volume was traded in each wave
+ Implement the use of the EWO ( Elliot Wave Oscillator)
+ Improve the display
+ Identify ABC patterns
+ Add triangles and Zigzag formations
Dump Detector - Stochastic RSIDump Detecter uses Stochastic RSI to detect dumps/downtrends. Can be used as an exit trigger for long bots or an entry trigger for short bots. Change settings to lower timeframe for scalping. Pump signals can be turned on with tickbox.
Default Settings are not the usual Stochastic RSI setup and have been tuned to bitcoin 3hr chart:
Timeframe = 3hrs
smoothK = 3
smoothD = 3
lengthRSI = 6
lengthStoch = 27
src = close
LordPepe Stochastic SignalsThis is the Lord Pepe. Howdy. Basic buy/sell indicator to accumulate along a downtrend and release your stack during the uptrend and oversold levels of the stochastic. The buys should be used to stack, and sells indicate levels of profit taking, they do not signal a long term reversal, only < 25% of stack should be released on "OB" signals.
OB - overbought (sell)
OS - oversold (buy)
WaveTrend Oscillator + Divergence + Direction Detection +AlertsMake this version of the famous WaveTrend indicator has the following characteristics:
- WaveTrend direction detection
- Customizable overbought and oversold level (set by default just like the original version)
- Possibility to modify the length of the channel (set by default same as the original version)
- Possibility of modifying mobile period (set by default same as the original version)
- Show ONLY overbought sales.
- Show all sales.
- Show ONLY purchases in oversold.
- Show all purchases.
- See histogram.
- See half signal.
- Paint Bars.
- Modification of colors.
Alerts:
The indicator has the following alerts:
- Sales in oversold
- All Sales
- Purchases in oversold
- All Purchases
- Purchases / Overbought sales / Sales
- All Sales / Purchases
- Change WT Direction
NOTE: This single indicator should not be taken as a trading strategy is only a tool for the trader that gives a sense of depth market and potential opportunities for purchase / sale which must be evaluated in the context generally used this indicator to look for positions in areas of overbought / sell, also for detecting differences, other aspects such as the direction of Wavetrend, levels, histogram, etc, also provide useful information.
Release Notes: Add a field to change reaction and color change direction WT, is set to 1 as fast (default), better greater number address filter but is slower.
Release Notes: Add a Hidden Divergences detector and Regulars (bulls and the bears), from setup can activate them, also can turn off the labels and leave only the lines, configure it to your liking.
NOTE: SCRIPT IN SPANISH
BH - Candlestick Pattern DetectionThis is a script to help the beginners locate the candle patterns. It has a nice code that can be used in other scripts too. Easy to use with separated functions, simple patterns and complex patterns detections.
I have done some updates at the Candlestick Patterns Identified script by @repo32. Was a good start of my ideia. Tks for sharing repo.
It will be always under constant development but I want to share this first version to know what can be done to get better, improve, get more desired patterns, know what are you guys using that could be helpful.
I still need to check if all patterns are correct.
Any comments, help and suggestions will be appreciated.
Marcos Issler @ Isslerman
Trend Detection IndexTrend Detection Index indicator script.
This indicator was originally developed by M.H. Pee (Stocks & Commodities V. 19:10 (54-61): Trend Detection Index).
Price Divergence Detector V3 revised by JustUncleLThis is a revised version of the original "Price Divergence Detector by RicardoSantos".
Description:
Price Divergence detection for various methods : RSI, MACD, STOCH, VOLUME, ACC-DIST, FISHER, CCI, BB %B and Ehlers IdealRSI. Both Hidden and Regular Divergences are detected.
Mofidifications:
Revision 3.0 by JustUncleL
Added option to disable/enable Hidden and Regular Divergence
Added new divergence method BB %B (close only)
Added new divergence mothos Ehlers IdealRSI (close only)
Revision 2.0 - by RicardoSantos
References:
Information on Divergence Trading:
www.babypips.com
www.incrediblecharts.com (BB %B)
[RS]Accumulation and Distribution Divergence V0EXPERIMENTAL: Accumulation and Distribution Divergence detection.
[RS]MACD Divergence V0EXPERIMENTAL:
MACD Divergence detection.
looks like macd is more prone for missing the extremes in price then the rsi due to lag.
FREE INDICATOR: POLARIZED FRACTAL EFFICIENCYLooking for something other than a moving average to help determine not only a trend's strength, but also it's direction? Try PFE!
PFE was developed by Hans Hannula that was invented to determine price efficiency over a user-defined time period.
The Polarized Fractal Efficiency indicator is, in the essence, an exponentially smoothed ratio of the length of two lines: (1) of a straight line between today’s close and the close Period days ago, and (2) of a broken line connecting all Close points between today and Period days ago. The indicator output varies between -100 and 100. The theory behind this indicator is that if it is >50 (or <-50) then the market is likely to reverse its trend from positive to negative (or from negative to positive).
Other usage:
Securities with a PFE greater than zero are deemed to be trending up, while a reading of less than zero indicates the trend is down. The strengh of the trend is measured by the position of the PFE relative to the zero line. As a general rule, the further the PFE value is away from zero, the stronger and more efficient the given trend is. A PFE value that fluctuates around the zero line could indicate that the supply and demand for the security are in balance and price may trade sideways.
As with all indicators, finding something that works well along side this would be the most beneficial way to use it.
Perhaps something like the Choppiness Index (related idea below) could do the trick.
Grab the source code here: pastebin.com
Installation video by @ChrisMoody here : blog.tradingview.com