Combined Bitcoin CME Gaps and Weekend DaysScript Description: Combined Bitcoin CME Gaps and Weekend Days
Author: NeoButane (Bitcoin CME Gaps), JohnIsTrading (Day of Week),
Contributor : MikeTheRuleTA (Combined and optimizations)
This Pine Script indicator provides a combined view of Bitcoin CME gaps and customizable weekend day backgrounds on your chart. It’s designed to help traders visualize CME gaps along with customizable weekend day highlights.
Features:
CME Gaps Visualization:
Enable CME Gaps: Toggle the display of CME gaps on your chart.
Show Real vs. CME Price: Choose whether to display chart prices or CME prices for gap analysis.
Weekend Gaps Only: Filter to show only weekend gaps for a cleaner view (note: this may miss holidays).
CME Gaps Styling:
Weekend Background Highlighting:
Enable Weekend Background: Toggle the weekend day background highlight on or off.
Timezone Selection: Choose the relevant timezone for accurate weekend highlighting.
Customizable Weekend Colors: Define colors for Saturday and Sunday backgrounds.
How It Works:
CME Gaps: The script identifies gaps between CME and chart prices when the CME session is closed. It plots these gaps with customizable colors and line widths.
You can choose to see gaps based on CME prices or chart prices and decide whether to include only weekends.
Weekend Backgrounds: The script allows for background highlighting of weekends (Saturday and Sunday) on your chart. This can be enabled or disabled and customized with specific colors.
The timezone setting ensures that the background highlights match your local time settings.
Inputs:
CME Gaps Settings:
Enable CME Gaps
Show Real vs. CME Price
Only Show Weekend Gaps
CME Gaps Style:
Gap Fill Color Up
Gap Fill Color Down
Gap Fill Transparency
Weekend Settings:
Enable Weekend Background
Timezone
Enable Saturday
Saturday Color
Enable Sunday
Sunday Color
Usage:
Add this script to your TradingView chart to overlay CME gaps and weekend highlights.
Adjust the settings according to your preferences for a clearer view of gaps and customized weekend backgrounds.
This indicator provides a comprehensive tool for tracking CME gaps and understanding weekend market behaviors through visual enhancements on your trading charts.
Days
timeUtilsLibrary "timeUtils"
Utils for time series
tradingDaysTillEndOfMonth() Calculates how many full trading days left until the end of the current month. (It doesn't take into account market holidays)
Returns: int series of the remaining trading days until the end of the month.
insideRange()
Sessions & Days Of The WeekTraders tend to focus their energy on specific sessions or time periods. This indicator will plot the days of the week, and also highlight the following sessions: Frankfurt (2:00am - 11:00am EST), London (3:00am - 12:00pm EST), New York (8:00am - 5:00pm EST), Sydney (5:00pm - 2:00am EST), Tokyo (7:00pm - 4:00am EST).
It’s important to be aware that Session Open and Close times will vary based on the time of year, as countries shift over to daylight savings time.
FunctionDaysInMonthLibrary "FunctionDaysInMonth"
Method to find the number of days in a given month of year.
days_in_month(year, month) Method to find the number of days in a given month of year.
Parameters:
year : int, year of month, so we know if year is a leap year or not.
month : int, month number.
Returns: int
Daily lines (UTC)This is a simple script to add highlighted lines on the daily open.
It uses UTC as timezone.
90% DaysIndicator from the paper "IDENTIFYING BEAR MARKET BOTTOMS AND NEW BULL MARKETS"
This paper was the winner of the prestigious 2002 Charles H. Dow Award. Each year the Market Technicians Association, in alliance with Dow Jones and Company, presents an award for excellence in the field of Technical Analysis. The recipient of that award in 2002 was Paul Desmond, President of Lowry Research Corporation.
"Important market bottoms are preceded by, and result from, important market declines.
And, important market declines are, for the most part, a study in the extremes of human emotion.
The intensity of their emotions can be statistically measured through their purchases and sales. To
clarify, as prices initially begin to weaken, investor psychology slowly shifts from complacency to
concern, resulting in increased selling and an acceleration of the decline. As prices drop more
quickly, and the news becomes more negative, the psychology shifts from concern to fear. Sooner
or later, fear turns to panic, driving prices sharply lower, as investors strive to get out of the market
at any price. It is this panic stage that drives prices down to extreme discounts – often well below
book values – that is needed to set the stage for the next bull market. Thus, if an investor had a
method for identifying and measuring panic selling, at least half the job of spotting major market
bottoms would be at hand.
Over the years, a number of market analysts have attempted to define panic selling (often
referred to as a selling climax, or capitulation) in terms of extreme activity, such as unusually
active volume, a massive number of declining stocks, or a large number of new lows. But, those
definitions do not stand up under critical examination, because panic selling must be measured in
terms of intensity, rather than just activity. To formulate our definition of panic selling, we
reviewed the daily history of both the price changes and the volume of trading for every stock
traded on the New York Stock Exchange over a period of 69 years, from 1933 to present. We
broke the volume of trading down into two parts – Upside (buyers) Volume and Downside (sellers)
Volume. We also compiled the full and fractional dollars of price change for all NYSE-listed
stocks that advanced each day (Points Gained), as well as the full and fractional dollars of price
change for all NYSE-listed stocks that declined each day (Points Lost). These four daily totals –
Upside Volume and Points Gained, Downside Volume and Points Lost – represent the basic
components of Demand and Supply, and have been an integral part of the Lowry Analysis since
1938. (Note: an industrious statistician can compile these totals from the NYSE stock tables in
each day’s Wall Street Journal.)
In reviewing these numbers, we found that almost all periods of significant market decline
in the past 69 years have contained at least one, and usually more than one, day of panic selling in
which Downside Volume equaled 90.0% or more of the total of Upside Volume plus Downside
Volume, and Points Lost equaled 90.0% or more of the total of Points Gained plus Points Lost.
...
But, there is a second key ingredient to every major market bottom. It is essential to
recognize that days of panic selling cannot, by themselves, produce a market reversal, any more
than simply lowering the sale price on a house will suddenly produce an enthusiastic buyer. As the
Law of Supply and Demand would emphasize, it takes strong Demand, not just a reduction in
Supply, to cause prices to rise substantially. It does not matter how much prices are discounted; if
investors are not attracted to buy, even at deeply depressed levels, sellers will eventually be forced
to discount prices further still, until Demand is eventually rejuvenated. Thus, our 69-year record
shows that declines containing two or more 90% Downside Days usually persist, on a trend basis,
until investors eventually come rushing back in to snap up what they perceive to be the bargains of
the decade and, in the process, produce a 90% Upside Day (in which Points Gained equal 90.0% or
more of the sum of Points Gained plus Points Lost, and on which Upside Volume equals 90.0% or
more of the sum of Upside plus Downside Volume). These two events – panic selling (one or more
90% Downside Days) and panic buying (a 90% Upside Day, or on rare occasions, two back-toback 80% Upside Days)
– produce very powerful probabilities that a major trend reversal has
begun, and that the market’s Sweet Spot is ready to be savored."
Includes an option to display 90% days for NASDAQ, but these are much rarer and, oddly, there are no Upside Days.
*Includes an option for repainting -- default value is true, meaning the script will repaint the current bar.
False = Not Repainting = Value for the current bar is not repainted, but all past values are offset by 1 bar.
True = Repainting = Value for the current bar is repainted, but all past values are correct and not offset by 1 bar.
In both cases, all of the historical values are correct, it is just a matter of whether you prefer the current bar to be realistically painted and the historical bars offset by 1, or the current bar to be repainted and the historical data to match their respective price bars.
As explained by TradingView,`f_security()` is for coders who want to offer their users a repainting/no-repainting version of the HTF data.
Multi-time-Frame number of days in the chartHelps to see the number of days in any default timeframe chart. (Not yet tested with custom time frames!)
Please like and favorite this script if you like it!
Any donations of tradingview coins to help me buy a tradingview pro membership would also be highly appreciated! Thank you!
DayLowDayLow(x) tracks the days since a new low on a chart. I like to use this indicator to track trends up and down. I use a double DayLow indicator: DayLow(5) Red Line + DayLow(6) shaded red This is a short term indicator to let new know a stocks weakness early on the chart.
Correction Percent and Days SinceS
Use this script to see the depths of corrections and also to see how long it has been since a correction.
I published this script because the last time the SNP has gone this long without a 5% correction was 1996 excluding bear markets of course.
NOTE: This script is a 2 in 1. In order to see correction depth only use the first 3 plot settings as visible.
In order to see the days since a correction use the last two plot settings.