Expansion Finder by nnamWhat this Indicator Does
This indicator helps the trader locate expansion and contraction areas in an easy visual way.
When the asset moves from a contraction phase into an expansion phase, the bars change color (customizable). This allows the trader to recognize areas of contraction and avoid trading them. Once a Bar Range moves outside of the average range as specified by the user, the bar will change color informing the trader that the current bar and by default the market, is moving into an expansion phase from a contraction phase.
The indicator works well for those traders that use the Forex Master Pattern to locate Value Lines and Value Areas on the chart giving them an opportunity to draw in these areas with ease.
As shown in the screenshot below, the boxes are manually drawn after the trader locates an easily identifiable area of contraction.
The Indicator makes it easy to find longer areas of contraction and ignore the noise of smaller contractions.
Customizable Settings allow the trader to define the lookback range that determines the number of bars to base the average.
A "multiplier" setting allows the trader to easily adjust the Average by changing the average using a simple calculation.
Example, if the average multiplier is set to "1", the average will be used.
Using the standard average is not always the best way to define these contractions, so traders can set the average to a higher or lower number by using the multiplier, thus changing the calculation but maintaining a consistent number across the chart.
Example: If the average is not plotting the contraction correctly, the trader can manually adjust the multiplier down to 0.5 thus adjusting the average in half or increase the multiplier to 2 thus doubling the average.
As seen in the screenshot below, this changes the number of expansion bars visible on the chart.
Below you can see Value Areas and Value Lines drawn in. These lines assist the trader in defining important levels for future trading.
I hope this Indicator helps you locate value areas and value lines on charts in an easy way.
Any questions or concerns or suggestions, please do not hesitate to reach out.
Happy Trading !!!!
Candlestick analysis
Smart QQE ModSmart QQE - Chart Overlay
Smart QQE shows QQE Trend and RSI plot on chart to determine the trend direction and eliminate false signals.
QQE is obtained from original code by Glaz and rescaled to fit on chart. RSI 50 level acts as Zero which is plotted as a Bollinger on chart.
This is not a Bollinger band . its an RSI channel with levels 0-100 plotted around the mid band. The RSI Mid Band is calculated based on RSI value.
Trend:
Price above RSI Mid band is uptrend
Price below RSI Mid band is Down Trend
The Green line - Discount Zone - 0-RSI level - Oversold Zone
The Red Line - Premium Zone - 100 - RSI level - Overbought Zone
Buy / Sell signals
QQE Buy and Sell signals are plotted based on crossovers of RSI and Fast RSI crossovers.
QQE trend is colored based on the crossover.
Candle color:
candle color determines the Original QQE Trend.
Blue - QQE line above Threshold level in Buy Zone
Pink - QQE line below Threshold level in Sell Zone
Entries are to be made with proper confirmation.
HULL MA is provided as a MA Ribbon for additional confirmation. This MA can be changed to various forms Like EMA , SMA , WMA , HMA , RMA the open and close of the MA are plotted so it determines the exact Trend reversal of the price.
Credits to @Glaz QQE Threshold
NSDT Lattice WebThis script creates a "web" by connecting different points of candles. All configurable by the trader.
There are 4 basic parts to a candle:
Open, High, Low, and Close
With this script, you can connect any point of one candle in the past to any point of another current candle.
For example:
High to High, High to Low, High to Open, High to close
Low to High, Low to Low, Low to Open, Low to Close
Open to High, Open to Low, Open to Open, Open to Close
Close to High, Close to Low, Close to Open, Close to Close
The script will change the line colors based on whether the current plot is higher or lower than the previous plot.
Try out different connection points to see what works for you. Connecting High to High and Low to Low, might easily show you when the market is making higher highs or lower lows, indicating a potential movement.
Run it on replay at a higher speed and see how it may potentially help identify area of congestion or trends.
Big 8 Intraday TICKAt the start of each trading day (0930 EST), this indicator calculates the intraday price difference between open and close for the eight largest market cap stocks (AAPL, AMZN, GOOGLE, META, MSFT, NFLX, NVDA, and TSLA), assigns a +/-1 for each, and then plots the cumulative change. An EMA has been added for smoothing purposes that is set to 5 but can be changed. Please note indicator is best used on lower timeframes (15 min or less) and has no applicability to time frames above 1 hour.
The thought behind this indicator is those eight major stocks drive a majority of intraday price change in indices like SPY and QQQ that are heavily weighted towards these stocks, therefore they should be a leading indicator in price change. You can often catch a move in SPY or QQQ one to two bars (on 1 min chart) ahead of the actual move because you see this indicator moving strong to one direction.
It's not perfect as there are divergences you will see when you compare historical charts, but oftentimes those divergences ultimately lead to significant price swings in the same direction as this indicator, so recommend being on watch to pull the trigger when you see those and price confirms.
You can use this indicator in a few ways:
1. Confirmation that your current trade is in the same direction as this indicator
2. Use the zero cross as a trigger for put or call entry
3. Focusing only on calls/longs if the value is above 0, or only puts/shorts if the value is below zero. Just be sure to keep an eye on reversals.
If you have recommendations on how to improve, let me know and I'll do my best to make changes.
Negative Correlation SignalsThank you to Hendrik Fuchs who coded this for me - I highly recommend you...
The AUDUSD/EURUSD has a negative correlation with the DXY as does the GBPJPY/USDJPY have with the JPYX. This indicator is very simple and uses opposite candle pinbars (pinbar/doji structure can be set by you) of the two instruments on the chart whilst the stochastic RSI should be above 80 for overbought on the one but below 20 on the other for oversold (or vice versa) to generate a signal.
This indicator works as follow:
1. Choose an instrument that has an opposing negatively correlated instrument (EURUSD & DXY, GBPJPY & JPYX, US100 & VIX, etc.)
2. Add indicator to the chart and open settings.
3. Open the settings and add the correct instruments (default is set to GBPJPY & JPYX).
4. Enter your desired Stochastic RSI & candle formation settings.
You will see buy and sell signals appear on the charts. Alerts are possible (Any alert() function call). Does not repaint after close of candle. Better on higher timeframes but can also be used for scalping. Best used as confluence or as part of a trend trading system.
There are obviously many many variations that I have not even thought off - please let us know in the comment section if you find settings/timeframes/instruments that work particularly well.
Anchored SMAThis is not your usual single moving average (SMA) indicator. It is an anchored SMA indicator. The anchored SMA does what other SMAs cannot--it stays at an anchored timeframe and presents that SMA relative to the timeframe you are in. For example, standard SMA indicators adjust to the timeframe you are viewing in your chart. So if you set it to a 20 day SMA while in the 1 Day timeframe, when you switch to the 5 minute timeframe, your 20 day SMA now becomes a 100 minute SMA indicator--that is it is only calculating the SMA for 20 ticks at 5 minutes each rather than holding the 20 day indicator at the higher timeframe. However, with the anchored SMA, the indicator would have held at the 20 day SMA while you were in the 5 minute timeframe.
The default setting is for the anchored SMA is the five day SMA. This can be adjusted in the settings to be any amount of ticks in any timeframe you choose from 1 minute to 1 week. The indicator does not hold accurately at timeframes outside of this range. The accompanying chart is the SPX in the 15 minute timeframe with the default anchored SMA settings in blue and the standard 200 tick SMA in black. Now, you could manually adjust the ticks to 130 SMA to fit the same blue line, but why do so when the anchored SMA does it for you?
This brings us to a very important note--this indicator is set to standard market hours at 6.5 hours per day. This means this indicator would not give the same results in markets with different hours, such as futures, FOREX, or Crypto markets. This only holds for equity markets. However, that is not to say it cannot be used in these other markets, it's that it wouldn't be the same result. Anyway, enjoy!
Sniper EntryThis source code is an implementation of a TradingView indicator called "Sniper Entry". The purpose of this indicator is to identify potential entry points for trades based on certain candlestick patterns and the Stochastic oscillator.
The indicator calculates the Stochastic oscillator based on the close, high, and low prices of the asset over a period of 14 bars. It then uses this oscillator to generate buy and sell signals.
For a buy signal to be generated, the Stochastic oscillator must cross above the oversold level of 20, and the current candle must either be a bullish pin bar or a bullish engulfing pattern. For a sell signal to be generated, the Stochastic oscillator must cross below the overbought level of 80, and the current candle must either be a bearish pin bar or a bearish engulfing pattern.
The indicator also calculates the stop loss and target levels for both buy and sell trades. The stop loss is calculated based on the low or high of the candle that generated the signal, depending on whether it's a buy or sell signal. The target is calculated based on the risk/reward ratio, which is set to 3 in this implementation. The lot size is also set to 0.01, and the starting capital is set to 100.
The indicator then plots the buy and sell signals, the stop loss and target levels, and the Stochastic oscillator on the chart.
It's important to note that this is just one example of a trading indicator, and its effectiveness may vary depending on market conditions and the asset being traded. It's also important to perform your own analysis and use proper risk management techniques when making trades based on any indicator or strategy.
Engulfing Pinbar [serkany88]This is an experimental candlestick pattern that combines pinbars and engulfing patterns as my own implementation. These signals can be used as a possible reversal points based on timeframe used or set wick size. Of course these signals should never be used on their own but rather can be used as another confluence of possible entry signal.
Functional and Manual alerts provided with simple and clean code.
TLDR: Use as a possible reversal point for your entries in combination with your trend and volatility filters. Green means possible bullish move, Red means possible bearish move.
BTC Performance Table / BTC Seasonality Visualization
This script visualizes Bitcoins "seasonality", in form of a colored table (based on the idea from "BigBangTheory")
The history table shows you which months do statistically perform better/worse in comparison to other months.
How to use this script:
Choose ticker "BLX" ("BraveNewCoin Liquid Index for Bitcoin").
Set the charts time frame to weekly or daily. Tables position on the screen and its colors are configurable.
Table explanation:
Cells show whether a gain or a loss occured from month to month, since BTC came out in 2010.
The price difference, between monthly open and monthly close, determines the cell color (negative -> red, positive -> green).
The year column shows total gain (green) or loss (red) for that particular year.
Each value is presented as a rounded percentage number.
How this script works:
The script calculates the price difference between each monthly and yearly open and close, storing those numbers inside arrays.
Then it populates the table, by using those numbers and doing the cell coloring (there will be a yellow cell, in case no change should occur).
German Short-Description
Prozentuale Übersicht in Tabellenform, der monatlichen, sowie jährlichen, Performance des Bitcoin (basierend auf der Idee von "BigBangTheory").
Hierdurch wird die "Saisonalität" des Bitcoin sichtbar. D.h. welche Monate des Jahres, im Vergleich zu anderen Monaten, statistisch gesehen öfter positiv/negativ schließen.
Zwecks vollständiger Darstellung muss der Ticker "BLX" ("BraveNewCoin Liquid Index for Bitcoin") im weekly oder daily time frame aktiv sein.
Strat Dashboard [TFO]The Strat Dashboard tracks up to 10 signals while highlighting common strat reversal patterns, the SSS 50% rule, timeframe continuity, and some additional criteria with VWAP and moving averages.
With the strat, all price action bars/candles are simplified into 3 total possibilities: 1 (inside bar), 2 (a bar that takes the previous bar's high OR low), and 3 (outside bar). The first table column for Last X Candles shows the most recent candles according to this notation, for example, 1 - 2D - 2U. This would mean we had an inside bar, followed by a bar that took the previous bar's low, followed then by a bar that took the previous bar's high. Note that the colors in this column are set according to whether the current bar's close exceeds the previous bar's high/low. By default, these colors are green if above the previous bar's highs, or red if below the previous bar's lows. If the current close is in between the previous candle's high and low (even after already taking the prior high or low), no color will be applied.
The SSS 50% column shows a yes or no value for whether the current bar aligns with the SSS 50% rule, where a bar has taken either the previous high or low, and has since reversed to at least the midway point of the previous bar's height - essentially anticipating a 2 that may become a 3 (outside bar).
Timeframe continuity (TFC) shows a yes or no value for when the current candle on multiple timeframes are all green or red (above the open price or below the open price, respectively). For example, if you were looking at the current 15m, 1h, and 1D bars, and they were all above the open price, you could say there's TFC between all three timeframes. As of the initial release, you can select up to 3 different timeframes. The table values will only be true when all selected timeframes are in alignment. When setting alerts, first deselect the timeframes if you don't want TFC logic to impact alerts.
The "Last" column shows the last strat reversal pattern that was confirmed (after the last bar closes). Waiting for a candle close is the safer option since a 2 can turn into a 3; however for higher timeframes, it may be beneficial to make an update to this indicator in which you can have live alerts as well (not waiting for a candle close). You can select which strat reversals you want to be shown from the settings. Various strat reversals may be selected for alerts of type "Any"; for example, if setting up an alert for "Any" strat reversal on Symbol 1, then this alert will go off when any of the *selected* strat reversals occur for that specific symbol. Deselect any strat reversals that you don't want to be included in these alerts.
Lastly, the EMA and VWAP columns simply show whether price is above or below said value. This tracks the current candle close, and may repaint/change several times if the current bar is oscillating above and below these values.
OPG IndicatorThis indicator calculates the Opening Price Gap (OPG) between yesterday's close and today's open.
If the OPG is smaller than -0.03%, open a long position with take profit at yesterday's close.
If the OPG is greater than 0.03%, open a short position with take profit at yesterday's close.
Close all positions at midday.
Failed Breakdown Detection'Failed Breakdowns' are a popular set up for long entries.
In short, the set up requires:
1) A significant low is made ('initial low')
2) Initial low is undercut with a new low
3) Price action then 'reclaims' the initial low by moving +8-10 points from the initial low
This script aims at detecting such set ups. It was coded with the ES Futures 15 minute chart in mind but may be useful on other instruments and time frames.
Business Logic:
1) Uses pivot lows to detect 'significant' initial lows
2) Uses amplitude threshold to detect a new low beneath the initial low; used /u/ben_zen script for this
3) Looks for a valid reclaim - a green candle that occurs within 10 bars of the new low
4) Price must reclaim at least 8 points for the set up to be valid
5) If a signal is detected, the initial low value (pivot low) is stored in array that prevents duplicate signals from being generated.
6) FBD Signal is plotted on the chart with "X"
7) Pivot low detection is plotted on the chart with "P" and a label
8) New lows are plotted on the chart with a blue triangle
Notes:
User input
- My preference is to use the defaults as is, but as always feel free to experiment
- Can modify pivot length but in my experience 10/10 work best for pivot lows
- New low detection - 55 bars and 0.05 amplitude work well based on visual checks of signals
- Can modify the number of points needed to reclaim a low, and the # of bars limit under which this must occur.
Alerts:
- Alerts are available for detection of new lows and detection of failed breakdowns
- Alerts are also available for these signals but only during 7:30PM-4PM EST - 'prime time' US trading hours
Limitations:
- Current version of the script only compares new lows to the most recent pivot low, does not look at anything prior to that
- Best used as a discretionary signal
Visit /u/ben_zen's Profile:
www.tradingview.com
Profile Link www.tradingview.com
Volume Trend AnalysisThe VTA indicator is a trend analysis indicator based on trading volume and candlestick charts, used to determine the states of bullish strength, bearish strength, and market balance. When the bullish volume gradually increases while the bearish volume gradually decreases or remains steady, the market is in a state of bullish strength; when the bearish volume gradually increases while the bullish volume gradually decreases or remains steady, the market is in a state of bearish strength; when both the bullish and bearish volumes remain steady, the market is in a state of market balance.
The VTA indicator can help traders better determine market trends, select appropriate entry and exit points.
VIB / GIB v1.0The VIB / GIB indicator
V1 ----- 13 Feb 2023 ------------ Inital release.
This gives the user the ability to easily display VIB(Volume ImBalances) and GIB(Gap ImBalances) on their chart.
Volume imbalances (VIB) are created when there is a price difference between the close of a candle and the opening of the next candle. This price difference can be used as a level of support or resistance in future trading.
A Gap imbalance (GIB) has the same principles as a VIB, but also has the feature that no wick closes through the gap, showing an even more powerful imbalance in the market at that point.
GIBs and VIBs can be individually switched on or off via the settings, and optional icons can also be activated or not to show where the imbalance took place.
Please note that this is purely an indicator that should be used with other confluence before making trading decisions.
mentfx Triple MThis indicator colors the wick of a candle on any timeframe based on whether the following rules are met:
A colored wick below a candle indicates that the candles low was lower than the previous candles low, and the body of the candle closed above the previous candles low.
A colored wick above a candle indicates that the candles high was higher than the previous candles high, and the body of the candle closed below the previous candles high.
The idea behind this indicator is to fractally see a distribution (colored wick above a candle) or an accumulation (colored wick below a candle) as a confirmation once you have established a directional trend or turning point. This indicator will color any wick that meets these conditions. This indicator is meant more so as an entry confirmation, coupling it with your understanding of turning points, or likely points that price will continue in a direction - this can provide a nice confirmation.
Range DetectionThis is a simple indicator to find the sideways market or ranging market.
It is mainly focused on BTCUSD as BTCUSD doesn’t make big moves each and every candle. It makes big breakouts with one candle and then goes sideways for a longer period of time.
So, this indicator identifies those big candles and plots high and lows of those big candles using lines. New range is created only when new candles close above or below previous major candles high or low.
Stochastic Oversold / Overbought Multi Time Frame on CandleAt the suggestion of a friend, I prepared this educational indicator to show how to use a Multi time frames on the chart based on the color of The Candle.
This Script calculates the stochastic oscillator for multiple timeframes and displays the overbought/oversold signals on the chart with color coding.
The stochastic oscillator is a momentum indicator that compares a security's closing price to its high-low range over a set number of periods. The indicator oscillates between 0 and 100, with readings above 80 considered overbought and readings below 20 considered oversold.
The indicator has the following input parameters:
%K Length: the number of periods used to calculate the stochastic oscillator (default is 14).
%K Smoothing: the number of periods used to smooth the stochastic oscillator (default is 1).
Three timeframes: The timeframes for which the stochastic oscillator is calculated can be set as 15-minute, 1-hour, or 4-hour intervals. For each timeframe, the user can choose to display the indicator (or not) and set the color of the candle. The user can also set the overbought and oversold levels (default is 80 and 20, respectively).
The indicator calculates the stochastic oscillator using the ta.stoch function from the built-in ta library in PineScript. It then uses the ta.sma function to smooth the stochastic oscillator if specified. Finally, the indicator uses the TimeframFuction to calculate the stochastic oscillator for different timeframes, which is then displayed on the chart using the barcolor function. The color of the candle is set based on whether the stochastic oscillator is overbought or oversold, as determined by the overbought/oversold levels specified by the user.
Note: This code is example for you to use multi timeframe in your indicator or Strategy , also prevent Repainting Calculation
wick CE; plot candle wick and tail midpoint lines-Simple little tool to plot the wick CE: an ICT concept, consequent encroachment i.e. the midpoint line of a wick or tail; it being a potentially sensitive level (depending on context).
-Wrote this to save me time drawing out fib retracement to locate the precise level of the wick CE. Example usage: show indicator, add horizontal ray over favored wick CE level, hide indicator.
~choose how many consecutive bars back to plot wick CE lines.
~choose how many bars forward to extend the wick CE lines.
Volume scaled Price + auto colour change light/dark mode🔶 OVERVIEW
🔹 This script shows price in a similar style as volume . To accomplish this we use the body of the candle ( close - open ), which is placed on a zero line.
This can be useful when comparing volume ~ price .
🔹 3 options are included to show additional lines, to make comparisons easier:
· Percentile nearest rank
· Bollinger Bands (BB)
· Simple Moving Average (SMA)
🔶 SETTINGS
🔹 Option : choose whether to show price (candles) or volume . Adding 2 versions of this indicator on the chart enables you to compare these 2 options:
🔹 Lines:
· (Percentile nearest rank (only the setting mult is used for this option).
· Bollinger Bands (BB) (only the setting % perc. nearest rank is used for this option).
· Simple Moving Average (SMA )
All 3 options will use length , this is the amount of bars used for calculations.
🔹 Show wick will show you... wicks :)
🔶 PERCENTILE NEAREST RANK
🔹 This script has 2 extra types of background color
dvP = volume > volume and z < z and z < prP_ and volume > prV
· In this case:
· volume is higher than previous volume ( volume > volume )
· volume is above 90th percentile rank ( volume > prV )
· price is lower than previous price ( z < z )
· price is below 10th percentile rank ( z < prP_ )
dvV = volume < volume and z > z and z > prP and volume < prV_
· The second type background color is reversed ( volume lower, price higher)
🔶 AUTOMATIC COLOUR CHANGE WHEN SWITCHING DARK/LIGHT MODE
🔹 chart.bg_color returns the color of the chart’s background from the "Chart settings/Appearance/Background" field, while chart.fg_color returns a color providing optimal contrast with chart.bg_color .
· Following technique gives you the possibility to pick your own colour for either dark/light time.
· We first retrieve separately the red, green and blue component of the measured chart.bg_color
r = color.r(chart.bg_color)
g = color.g(chart.bg_color)
b = color.b(chart.bg_color)
The following assumption states when all 3 colour components' values are below 80, we are in the dark mode:
isDark = r < 80 and g < 80 and b < 80
Now we can use isDark to automatically show your own dark/light mode colours (chosen at settings), dependable on the mode:
Cheers!
Height of CandleVery simple indicator that shows the height of each candle (high-low) in histogram format. Can be used to compare the current candle with previous ones.
Urika Confirmation IndicatorThe Urika Confirmation (UC) Indicator helps a user make a better decision about areas to enter the market for a trade. The indicated incorporates the highs and the lows of the price for a specific period. The information is depicted on this two-line indicator to show the direction of the price. The gap between the two lines is a cloud for determining the current position of the trade and staying in a trend.
The two lines in the indicator are a signal line and a slow line: the price is likely bullish if the signal line crosses above the slow line while likely bearish if the signal line crosses below the slow line. One can enter a trade if the price is above the cloud while the signal line crosses above the slow line, This is an indication that the commodity or stock is bullish and vice versa for bearish. One can avoid trading when the price is in the cloud.
UC Calculations:
The signal line is the average high and low of the prices using the fast-length input.
The slow length is the average of the past previous high and low prices using the slow-length input.
Ways to Use the UC Indicator:
It is convenient to use the indicator with Relative Strength Indicator. If the signal line crosses above the slow line -->> Bullish possibility (buy if RSI >= 55). It is a false buy/long signal if the cross occurs while RSI is below 55.
If the slow line crosses above the signal line -->> Bearish possibility (short if RSI <= 45). It is a false short signal if the cross occurs while RSI is above 45.
The indicator can be used at all timeframes. The user can use different settings to suit their way of trading.
The indicator uses the concept of the Ichimoku Indicator to provide users with
Three Bar Gap (Simple Price Action - with 1 line plot)This script is tailored towards experienced traders who prefer to view raw price charts during live execution. It searches for a three-bar pattern of what is colloquially called "fair value gap", or "imbalance" and uses a single line to plot the results. The goal is to display price in a way that is as simple as possible so that chart readers who don't prefer to add indicators on their screen will still find this indicator as an acceptable option to consider for.
From a code perspective, this script explores a new PineScript feature called UDT (user-defined types). This is an incredible update because it brings developers one step close to having the ability to create abstract data types.
█ What is price action?
Experienced traders will tell you that the chart that they use for live execution is raw, clean, and uses no indicators. They say they execute on price action, so what exactly is price action?
There is no formal definition to it, but one can agree that it implies the process of analyzing price without considering the fundamentals, without needing to know what the news was about, and without needing to know any of the Greeks (except for the desire to “seek alpha” Ha.haa...). This is not to say that price action traders are executing in their own vacuums without the need to know what is happening around the world. Surely fundamentals and financial models can be used beforehand for developing a bias for what is being traded, but it’s price-first at the moment of execution. That said, Factor (A) is Price.
Factor (B) is time-perception, it’s how the trader reads the tape. How the trader perceives price to change with respect to time is valuable information. Interpretation of "time" will be elaborated in the next section that talks about candlestick patterns detected by this script.
Putting this together, price action means the analysis of price movement by only considering (A) price, and (B) time, to predict which direction the market will move. A speculative trader is timing the market with the expectation to make a quick in-and-out profit; she/she is using price action. On the other hand, a long term investor holding a diversified portfolio with a strategy based on modern portfolio theory combined with fundamental analysis (at this point candlesticks are irrelevant) but has one additional criteria of, say, can only go Long on a stock when it has closed Green on Daily; he/she is also considered to be executing on price action.
█ Candlestick patterns
This script calculates the displacement of highs and lows over three consecutive bars.
A) Down move = When High of the recent confirmed bar is lower than the Low of the previous-previous candle
B) Up move = When Low of the recent confirmed bar is higher than the High of the previous-previous candle
(Note that its the confirmed bar that is being talked about, so it does not repaint)
An ATR filter will be applied to reduce the number of lines generated as many times they might just be associated with minor price changes.
Interpretations:
When price moves quickly across three bars, it can be thought that it has gapped. Although the candle in the middle appears to be solid, it’s not from a conceptual perspective. This is because time itself is arbitrary; timeframes don’t necessarily have to be fixed intervals. Take stocks with regular trading hours for example, if price makes a breakaway gap and you bundle the after-hours and pre-market sessions together as one candle, never minding that intervals should be fixed, then you will see the exact three-bar-gap patterns. Similar happens during intraday sessions on lower timeframes, if you zoom-in closer, you’ll see that ticks within the middle candle are sparsely dispersed. This is why it's called a gap.
█ Parameters with fixed inputs & assumptions used:
ATR is used for filtering out minor movements that will likely be deemed as irrelevant by trader for the purpose of live execution. The following inputs are required:
A) ATR lookback period
B) Multiplier
The product of ATR(len=A) and B produces a threshold for minimum distance that price must gap by. Initially, it was proposed to be only based on one ATR, but often an ATR is too wide and using it will filter out too many lines. Because of this observation, a multiplier (Parameter B) has been introduced to allow users to apply fractional ATR as a threshold.
█ Applications:
For trend followers: Follow the direction of the gap. Entering above recent high/low points above/below the first impulse with a stop-limit order is a viable tactic.
For contrarians fading a trend: The mid-point is a good point of reference for predicting potential areas of support/resistance.
InsideBar2.0Inside Bar: Inside Bar is defined as, " when candle body range falls within previous day candle body".
Some of us take the whole prices range . Here i have taken only the price range of the body of tehecandle.
I have created an indicator to identify Inside bras and draw target levels on both the sides. Traders can easily convert it into a strategy and checkout the success rate.
This script is written to identify InsideBar and then plot target 1 and target 2 irrespective the direction of following candles.
Inside Bar is here defined clearly when the whole body( Not high/Low, but Open and Close Only of the candle falls within the whole body of previous candle
Few static Variables are declared for one time use to store the following values
MotherCandle Index
High and Low of MotherCandle
Target 1 equal to size of the body of mother candle
Target 2 equal twice the size of Mother Candle
Depending upon the direction of the trend and breakout of the MotherCandle boundaries, target lines and labels are drawn.
Line.delete function is used to delete all the previous lines to keep the chart clean and not draw line on all every inside-bar detected in the past.
Label.delete function is used to delete all the previous labels for Target levels to clearly show current target levels.
barcolor() function is used to change the inside bar candle changed to "Yellow" .