Mark FVGsMark FVGs is marking FVG (stands for Fair Value Gap, other name is Imbalance or IMB) on your chart so that you can instantly detect them
It supports:
- marking bullish and bearish partly filled or unfilled FVGs of the current timeframe
- marking bullish and bearish already filled FVGs of the current timeframe
- marking bullish and bearish FVGs of the any 4 timeframes on your current timeframe
technically it re-builds them on the last bar or as soon as new realtime bar is updated. it looks with 1k bars back to find the nearest specific number of FGVs
Adjustments:
- changing the maximum number of FVGs to display.
- changing the color of FVG area
- displaying already filled FVG of the current time frame
- changing the mode of displaying area it can either extended or fixed width
- displaying labels of other time frame FVGs
Gaps
Extreme Bars"Extreme Bars" is a simple but useful indicator that marks overbought and oversold candles. This indicator paints candles that fall far above the average red, and the candles that rise above the average green. Of course, they can change these colors if they want. "Extreme Bars" can be interpreted in many different ways. The starting points of colored candles can often be good support or resistance. In addition, it would be wise to close the positions opposite the colored candles and to maintain the positions compatible with the colored candles. It is also possible that the gaps formed by the colored candles will be closed in the future. The sensitivity of the indicator can be changed in the settings section.
Oxy CandlestickOxymoronic (oxy) candlesticks often appear at significant levels in a chart and can indicate increased probabilities of directional moves.
Typically, green candles are hollow and red candles are filled. An oxymoronic candle is colored bullishly but filled bearishly (solid green) or vice versa (hollow red).
Oxy flags occur when:
1) Price gaps up and closes lower than the open but above the last close. A solid green (or black) candle is bearish.
2) Price gaps down and closes higher than the open but below the last close. A hollow red candle is bullish.
An oxy candle indicates one of three things:
1) Price is going up (bullish oxy)
2) Price is going down (bearish oxy)
3) Price will return to this level (either)
#1 and #2 are the default meaning. If those don't play out then look for #3.
As is the case with most indicators, it is best not to use this indicator in isolation, but to combine it with other forms of analysis to increase your probabilities and to identify significant levels.
Fractal Break Imbalance / Fair Value Gap (FVG) / Liquidity VoidFractal Break Imbalance / Fair Value Gap (FVG) / Liquidity Void
Order imbalances in either direction, either excess buy or sell orders, reduce liquidity. The market will seek to fill gaps sooner or later. The script marks an imbalance / FVG after a fractal break. It also marks any other imbalance.
Default Colours:
Green - Imbalance after fractal break to the upside
Red - Imbalance after fractal break to the downside
Yellow - Other imbalances
How To Use:
Gaps can be used to determine possible entries and targets. Those familiar with liquidity raids, supply and demand, and ICT concepts may realise it's potential.
Indicator in use:
Unfilled GapsThis indicator displays gaps which have not been filled.
Notes:
- It shows only the unfilled gaps.
- You can edit the style and color of the gap lines.
- It will not work on charts with huge number of candles or gaps.
- It's based on someone else script which is mentioned in the code comments.
Overnight Gap AnalysisThere is a wide range of opinion on holding positions overnight due to gap risk. So, out of curiosity, I coded this analysis as a strategy to see what the result of only holding a position overnight on an asset would be. The results really surprised me. The script backtests 10+ years, and here are the findings:
Holding a position for 1 hour bar overnight on QQQ since January 2010 results in a 545% return. QQQ's entire return holding through the same period is 643%
The max equity drawdown on holding that position overnight is lower then the buy/hold drawdown on the underlying asset.
It doesn't matter if the last bar of the day is green or red, the results are similar.
It doesn't matter if it is a bull or bear market. Filtering the script to only trade when the price is above the 200-day moving average actually reduces its return from 545% to 301%, though it does also reduce drawdown.
I see similar patterns when applying the script to other index ETFs. Applying it to leveraged index ETFs can end up beating buy/hold of the underlying index.
Since this script holds through the 1st bar of the day, this could also speak to a day-opening price pattern
The default inputs are for the script to be applied to 1 hour charts only that have 7 bars on the chart per day. You can apply it to other chart types, but must follow the instructions below for it to work properly.
What the script is doing :
This script is buying the close of the last bar of the day and closing the trade at the close of the next bar. So, all trades are being held for 1 bar. By default, the script is setup for use on a 1hr chart that has 7 bars per day. If you try to apply it to a different timeframe, you will need to adjust the count of the last bar of the day with the script input. I.e. There are 7 bars per day on an hour chart on US Stocks/ETFs, so the input is set to 7 by default.
Other ways this script can be used :
This script can also test the result of holding a position over any 1 bar in the day using that same input. For instance, on an hour chart you can input 6 on the script input, and it will model buying the close of the 6th bar of the day while selling on the close of the next bar. I used this out of curiosity to model what only holding the last bar of the day would result in. On average, you lose money on the last bar every day.
The irony here is that the root cause of this last bar of the day losing may be people selling their positions at the end of day so that they aren't exposed to overnight gap risk.
Disclaimer: This is not financial advice. Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
Gap FinderThis indicator finds gaps based on User specified input % threshold in the indicator settings. Histogram plot shows gaps as vertical lines for easy detection. Enjoy!
Customizable Gap Finder++█ OVERVIEW
Customizable Gap Finder by ProfessorZoom with a partial close of a gap
█ CONCEPTS
1 — Gaps bullish or bearish
2 — Gaps can be filled
3 — Gaps can be partially close
4 — Some display options
█ OTHER SECTIONS
Thanks to The rational investor for teaching me this and ProfessorZoom because he writes 99% of the script.
Did you know the percentage of gaps filled ? If not, I recommand you to follow his courses, and I have no conflicts of interest.
GSI (Gap Size Indicator)The purpose of this indicator is to give a quick view of a gap size between two candles, and to detect any gap bigger than the trigger setting.
Options
Mode: Select the display mode (% or Value)
Variation Trigger: Defines the minimum gap size to give a signal, for both positive and negative sides. This option depends on the Mode setting
Show trigger lines: Enable/Disable the display of the Variation Trigger setting lines
Color signals only: When enabled, bars crossing the trigger value are still colored, but other are gray
Show signals only: When enabled, will only show bars corresponding to gaps crossing the trigger value
Notes
Basic alerts on Bullish , Bearish and All gaps are available.
Feel free to suggest any improvement.
Customizable Gap FinderThis is a fully customizable gap finder. You can change the color of just about anything, on top of hiding filled/old gaps. This is so you can spot those tiny gaps on something such as futures. Be sure to play around with the settings.
No gaps candlesThis indicator repaints the candles so that every candle's open price is the previous candle's close price. This helps visualize stocks and ETFs that have big gaps, usually between trading days.
You should hide visibility of the ticker for this to be displayed properly.
Imbalance FinderImbalance Finder
I struggled to always see it visually this marks whether there is or isn't imbalance
Very quick way of finding imbalance between bars
Ether (Ethereum) CME Gaps [NeoButane]Detects gaps in trading for CME's "Ether" cash-settled futures. This will show gaps as they happen on the 24/7 charts that crypto exchanges use. It is not usable on CME's tickers themselves, as gaps in trading are not displayed.
This indicator will only display if viewing an ETH chart.
More information on the CME ETH futures here:
www.cmegroup.com
Based on:
What's different: CME's BTC and ETH markets trade the same hours, but one may hit a limit breaker while there may be a case where the other does not.
BITCOIN CME FUTURES GAPSDisplays information about Bitcoin CME Futures Gaps over BTCUSD (or XBTUSD) charts.
You can configure a threshold percentage to only display gaps whose size is greater than that percentage. The gap precentage is calculated based on the current close price.
Gaps up are displayed in Orange, gaps down in Green
GAP Bands""
Introduction
Gap trading is a simple and disciplined approach to buying and shorting stocks. Essentially, one finds stocks that have a price gap from the previous close, then watches the first hour of trading to identify the trading range. Rising above that range signals a buy, while falling below it signals a short.
What is a Gap?
A gap is a change in price levels between the close and open of two consecutive days. Although most technical analysis manuals define the four types of gap patterns as Common, Breakaway, Continuation and Exhaustion, those labels are applied after the chart pattern is established. That is, the difference between any one type of gap from another is only distinguishable after the stock continues up or down in some fashion. Although those classifications are useful for a longer-term understanding of how a particular stock or sector reacts, they offer little guidance for trading.""" (Definition from StockCharts)
I plot gaps and add a band to them with volatility to make a decision about how important the current gap in terms of our price movement.
Daily GAP StatsI did not write the script from scratch but rather started editing code of an existing one. The original code came from a script called GAP DETECTOR by @Asch-
First up: I am a trader, not a programmer and therefore my code most likely is inefficient. If someone with more expertise would like to help and optimize it - feel free to get in touch, I am always happy to learn some new tricks. :)
This script does 2 things:
- It shows daily gaps stats based on user inputs
- It shows color coded labels on gap days with additional information in tooltips ( important: make sure to read 'known issues/limitations' at the end )
User Inputs
==========
Although the input dialog is pretty straight forward, I do a quick rundown:
- Length: max lookback time
- Gap Direction: self explanatory
- Show All Gaps | Cont Only | Reversal Only | Off:
This refers to the way labels are displayed on gap days (again: make sure to read known issues/limitations!)
- Show All Gaps: does what it says
- Cont Only: only shows gaps where price continued in the gap direction. If you filter for gap ups and chose 'Cont only' you will only see labels on gap days where price closed above the open (and vice versa if you scan for gap downs).
- Reversal Only: you will only see labels for closes below the open on gap up days (and the opposite on gap down days)
- Off: self explanatory
- Gap Measure in ATR/PCT: self explanatory, ATR is calculated over a 10d period
- Gap Size (Abs Values): no negative values allowed here. If you filter for gap downs and enter 3 it means it will show gaps where the stock fell more than 3 ATR/PCT on the open.
- RVOL Factor: along with significant gaps should come significant volume. RVOL = volume of the gap day / 20d average volume
- Viewing Options: Placing the stats label in the window is a bit tricky (see knonw issues/limitations) and I was not sure which way I liked better. See for yourself what works best for you.
Known Isusses/Limitations:
=======================
- Positioning of the stats table:
As to my knowledge, Tradingview only allows label positioning relative to price and not relative to the chart window. I tried to always display the gap stats table in the upper right corner, using 52wk high as y-coordinate. This works ok most of the time, but is not pretty. If anybody has some fancy way to tag the label in a fixed position, please get in touch.
- Max number of labels per script:
TradingView has a limitation that allows a maxium of ~50 labels per script. If there are more labels, TradingView will automatically cut the oldest ones, without any notification. I have found this behaviour to be rather inconsistent - sometimes it'll dump labels even if there are a lot fewer than 50. Hopefully TradingView will drop this limitation at one point in the future.
Important: The inconsistent display of the gap day labels has NO INFLUENCE on the calculations in the gap stats table - the count and the calculations are complete and correct!
Body Gap Detector
This script was inherited from "GAP DETECTOR" by Asch- and the modified version is being published with consent of the author.
This script identifies gap up or gap down between candle bodies (for the selected time frame). The original script has been reworked to consider Open/Close instead of the High/Low. It identifies "Gap" up/down and indicates them with markers drawn from "Open/Close" of one candle to the "Close/Open" of another.
The default setting is to consider the last 1500 candles. "Gap Up" is indicated by Green bars and "Gap Down" is indicated with Red bars.
How to detect last bar of day Simple way how to detect last bar of day and close all positions
UPD: day end can be different for yours because stocks market use another timezone
My VWAP Reversal + Pivot Points StandardThis indicator, with the addition of a standard VWAP indicator to the 5m chart, helps the operator when using a closing candle Price to initiate a VWAP Reversal strategy.
The strategy involves Price gapping up, look for a Close below the 1st 5m candle Low; else look for a Close above the 1st 5m candle High. On a break of VWAP, take the trade in the opposite direction of the gap, hence the VWAP Reversal. Not my own strat, credit to T3 Newsbeat, publicly posted on YouTube.
The Pivot Points Standard in the Pine 4 user manual, was the base source code, and leaving it here will allow me to remove the PP indicator I was using.
Candlestick Patterns by Boernerer v2New version 2 of my modifications of the original candlestick pattern script by Robert Waddell.
- Added window (= gaps) detection
- Added Bear/Bull Sash
- Added Bear/Bull Counter Attack
- Added Bear/Bull Seperating Line
- Modified candlestick ID code
- Added Lookback period instead of SMA (TLine) for trend detection
Candlestick Patterns + windows Mod by BoernererMy modifications for the candlestick pattern script by Robert Waddell.
Changelog
- Added window (= gaps) detection
- Added Bear/Bull Sash
- Modified candlestick ID code
- Candlesticks will only be displayed if above or below TLine
Originally created by Robert Waddell with special thanks to repo32 for his candlestick ID code, DavidR for EMA code and Chris Moody for barcolor code.
Enjoy and would love if you improve it further!
Gap Measure PercentMeasures the gaps between bars - bullish or bearish - as a percent of the underlying's price.
gaps&wicksA means for tracking price ranges for gap up/down and longer buying/selling tails. This may have some value for buying/selling opportunities based on the relative significance of the range. The look back period is adjustable and works for any time frame. If you have any success using it leave some feedback.
-Squam