Public Sentiment Oscillator This is a combination of 9 common use indicators turned into on single oscillator. These indicators are: 200 day moving average cross, 9/12 ema cross, 13/48 sma cross, rsi, stochastic, mfi, cci, macd, and open close trend. I have weighted the scores to be pretty even so that its balances each indicator in the sum. Because of the odd number of indicators, I have decided to normalized the score to 10. I think this has the effect of making it easier to read.
The score definition: oc_trend > 0 ? 1 : 0, fast_e > slow_e ? 1 : 0, fast_s > slow_s ? 1 : 0, rsi < 30 ? 0 : rsi > 30 and rsi < 70 ? 0.5 : rsi > 70 ? 1 : 0, macd1 > macd2 ? 0.5 : macd1 < macd2 ? 0 : 0, (hist >=0 ? (hist < hist ? 0.5 : 0.25) : (hist < hist ? 0.25 : 0)), stoch < 20 ? 0 : stoch > 20 and stoch < 80 ? 0.5 : stoch > 80 ? 1 : 0, source > ma200 ? 1 : ex <= ma200 ? 0 : 0, mfi < 20 ? 0 : mfi > 20 and mfi < 80 ? 0.5 : mfi > 80 ? 1 : 0, cci < -100 ? 0 : cci > -100 and cci < 100 ? 0.5 : cci > 100 ? 1 : 0
I hope you find this useful in your trades. Enjoy!
Sentiment
Stochastic Vix Fix SVIX (Tartigradia)The Stochastic Vix or Stochastic VixFix (SVIX), just like the Williams VixFix, is a realized volatility indicator, and can help in finding market bottoms as well as tops without requiring bollinger bands or any other construct, as the SVIX is bounded between 0-100 which allows for an objective thresholding regardless of the past.
Mathematically, SVIX is the complement of the original Stochastic Oscillator, with such a simple transform reproducing Williams' VixFix and the VIX index signals of high volatility and hence of market bottoms quite accurately but within a bounded 0-100 range. Having a predefined range allows to find markets bottoms without needing to compare to past prices using a bollinger band (Chris Moody on TradingView) nor a moving average (Hesta 2015), as a simple threshold condition (by default above 80) is sufficient to reliably signal interesting entry points at bottoming prices.
Having a predefined range allows to find markets bottoms without needing to compare to past prices using a bollinger band (Chris Moody on TradingView) nor a moving average (Hesta 2015), as a simple threshold condition (by default above 80) is sufficient to reliably signal interesting entry points at bottoming prices.
Indeed, as Williams describes in his paper, markets tend to find the lowest prices during times of highest volatility, which usually accompany times of highest fear.
Although the VixFix originally only indicates market bottoms, the Stochastic VixFix can also indicate good times to exit, when SVIX is at a low value (default: below 20), but just like the original VixFix and VIX index, exit signals are as usual much less reliable than long entries signals, because: 1) mature markets such as SP500 tend to increase over the long term, 2) when market fall, retail traders panic and hence volatility skyrockets and bottom is more reliably signalled, but at market tops, no one is panicking, price action only loses momentum because of liquidity drying up.
Compared to Hesta 2015 strategy of using a moving average over Williams' VixFix to generate entry signals, SVIX generates much fewer false positives during ranging markets, which drastically reduce Hesta 2015 strategy profitability as this incurs quite a lot of losses.
This indicator goes further than the original SVIX, by restoring the smoothed D and second-level smoothed D2 oscillators from the original Stochastic Oscillator, and use a 14-period ZLMA instead of the original 20-period SMA, to generate smoother yet responsive signals compared to using just the raw SVIX (by default, this is disabled, as the original raw SVIX is used to produce more entry signals).
Usage:
Set the timescale to daily or weekly preferably, to reduce false positives.
When the background is highlighted in green or when the highlight disappears, it is usually a good time to enter a long position.
Red background highlighting can be enabled to signal good exit zones, but these generate a lot of false positives.
To further reduce false positives, the SVIX_MA can be used to generate signals instead of the raw SVIX.
For more information on Williams' Vix Fix, which is a strategy published under public domain:
The VIX Fix, Larry Williams, Active Trader magazine, December 2007, web.archive.org
Fixing the VIX: An Indicator to Beat Fear, Amber Hestla-Barnhart, Journal of Technical Analysis, March 13, 2015, ssrn.com
For more information on the Stochastic Vix Fix (SVIX), published under Creative Commons:
Replicating the CBOE VIX using a synthetic volatility index trading algorithm, Dayne Cary and Gary van Vuuren, Cogent Economics & Finance, Volume 7, 2019, Issue 1, doi.org
Note: strangely, in the paper, the authors failed to mention that the SVIX is the complement of the original Stochastic Oscillator, instead reproducing just the original equation. The correct equation for the SVIX was retroengineered by comparing charts they published in the paper with charts generated by this pinescript indicator.
For a more complete indicator, see:
Williams Vix Fix OHLC candles plot indicator (Tartigradia)OHLC candles plot of the Williams VixFix indicator, which allows to draw trend lines.
Williams VixFix is a realized volatility indicator developed by Larry Williams, and can help in finding market bottoms.
Indeed, as Williams describe in his paper, markets tend to find the lowest prices during times of highest volatility, which usually accompany times of highest fear. The VixFix is calculated as how much the current low price statistically deviates from the maximum within a given look-back period.
The Williams VixFix indicator is usually presented as a curve or histogram. The novelty of this indicator is to present the data as a OHLC candles plot: whereas the original Williams VixFix calculation only involves the close value, we here use the open, high and low values as well. This led to some mathematical challenges because some of these calculations led to absurd values, so workarounds had to be found, but in the end I think the result was worth it, it reproduces the VIX chart quite well.
A great additional value of the OHLC chart is that it shows not just the close value, but all the values during the session: open, high and low in addition to close. This allows to draw trend lines and can provide additional information on momentum and sentiment. In addition, other indicators can be used on it, as if it was a price chart, such as RSI indicators (see RSI+ (alt) indicator for example).
For more information on the Vix Fix, which is a strategy published under public domain:
The VIX Fix, Larry Williams, Active Trader magazine, December 2007, web.archive.org
Fixing the VIX: An Indicator to Beat Fear, Amber Hestla-Barnhart, Journal of Technical Analysis, March 13, 2015, ssrn.com
Replicating the CBOE VIX using a synthetic volatility index trading algorithm, Dayne Cary and Gary van Vuuren, Cogent Economics & Finance, Volume 7, 2019, Issue 1, doi.org
This indicator includes only the Williams VixFix as an OHLC candles or bars plot, and price / vixfix candles plot, as well as the typical vixfix histogram. Indeed, it is much more practical for unbounded range indicators to be plotted in their own separate panel, hence why this indicator is released separately, so that it can work and be scaled adequately out of the box.
Note that the there are however no bottom buy signals. For a more complete indicator, which also includes the OHLC candles plots present here, but also bottom signals and Inverse VixFix (top signals), see:
Set Index symbol to SPX, and index_current = false, and timeframe Weekly, to reproduce the original VIX as close as possible by the VIXFIX (use the Add Symbol option, because you want to plot CBOE:VIX on the same timeframe as the current chart, which may include extended session / weekends). With the Weekly timeframe, off days / extended session days should not change much, but with lower timeframes this is important, because nights and weekends can change how the graph appears and seemingly make them different because of timing misalignment when in reality they are not when properly aligned.
ILM COT Financial Table - CFTCUse this indicator on Daily Timeframe
Please refer to the below link for CFTC Financials
www.cftc.gov
This script shows the Financial COT for the respective instrument by deriving the CFTC code.
Option is provided to override the CFTC code
User can also configure the historical CFTC data view
The script calculates the Long% vs Short% for various categories (Dealers/Asset Managers/Leveraged Funds/Other Reportables) and color codes the column appropriately.
The goal of this script is to show all the financial CFTC data on a single page to digest the data better in a tabular form
Fixed the default TradingView Library which has some errors with CFTC code mapping.
For example, SPX CFTC Code #13874+ which is the most important one where big players take positions is not there in the default Library.
Williams Vix Fix ultra complete indicator (Tartigradia)Williams VixFix is a realized volatility indicator developed by Larry Williams, and can help in finding market bottoms.
Indeed, as Williams describe in his paper, markets tend to find the lowest prices during times of highest volatility, which usually accompany times of highest fear. The VixFix is calculated as how much the current low price statistically deviates from the maximum within a given look-back period.
Although the VixFix originally only indicates market bottoms, its inverse may indicate market tops. As masa_crypto writes : "The inverse can be formulated by considering "how much the current high value statistically deviates from the minimum within a given look-back period." This transformation equates Vix_Fix_inverse. This indicator can be used for finding market tops, and therefore, is a good signal for a timing for taking a short position." However, in practice, the Inverse VixFix is much less reliable than the classical VixFix, but is nevertheless a good addition to get some additional context.
For more information on the Vix Fix, which is a strategy published under public domain:
* The VIX Fix, Larry Williams, Active Trader magazine, December 2007, web.archive.org
* Fixing the VIX: An Indicator to Beat Fear, Amber Hestla-Barnhart, Journal of Technical Analysis, March 13, 2015, ssrn.com
* Replicating the CBOE VIX using a synthetic volatility index trading algorithm, Dayne Cary and Gary van Vuuren, Cogent Economics & Finance, Volume 7, 2019, Issue 1, doi.org
Created By ChrisMoody on 12-26-2014...
V3 MAJOR Update on 1-05-2014
tista merged LazyBear's Black Dots filter in 2020:
Extended by Tartigradia in 10-2022:
* Can select a symbol different from current to calculate vixfix, allows to select SP:SPX to mimic the original VIX index.
* Inverse VixFix (from masa_crypto and web.archive.org)
* VixFix OHLC Bars plot
* Price / VixFix Candles plot (Pro Tip: draw trend lines to find good entry/exit points)
* Add ADX filtering, Minimaxis signals, Minimaxis filtering (from samgozman )
* Convert to pinescript v5
* Allow timeframe selection (MTF)
* Skip off days (more accurate reproduction of original VIX)
* Reorganized, cleaned up code, commented out parts, commented out or removed unused code (eg, some of the KC calculations)
* Changed default Bollinger Band settings to reduce false positives in crypto markets.
Set Index symbol to SPX, and index_current = false, and timeframe Weekly, to reproduce the original VIX as close as possible by the VIXFIX (use the Add Symbol option, because you want to plot CBOE:VIX on the same timeframe as the current chart, which may include extended session / weekends). With the Weekly timeframe, off days / extended session days should not change much, but with lower timeframes this is important, because nights and weekends can change how the graph appears and seemingly make them different because of timing misalignment when in reality they are not when properly aligned.
Daily Profile (Nephew_Sam_)From getting several requests to combine many of my indicators into one, this indicator plots everything you need for a Daily Profile.
1. Session = Current session + Daily dividers + day of the week
2. Open Lines = Plot the open of the day, midnight, week and month
3. Asian Range = Plots the asian range with an option for midpoint and extending lines
4. Previous OHLC = Plot the previous day/week/month OHLC
EVERY line/label/color/size/style is fully customizable in this indicator.
Important to adjust your timezone to get the correct data
Economic Calendar Events: FOMC, CPI, and moreThis script plots major events from the Economic Calendar that often correspond to major pivot points in various markets. It also includes built-in logic to retroactively adjust larger time intervals (i.e. greater than 1 hour) to be correctly aligned with the interval during which the event occurred.
Events are taken from the Economic Calendar and will be updated periodically at the following library:
The above library can be used to conveniently access date-related data for major Meetings, Releases, and Announcements as integer arrays, which can be used in other indicators. Currently, it has support for the following events:
FOMC Meetings
The FOMC meets eight times a year to determine the course of monetary policy. The FOMC's decisions are based on a review of economic and financial developments and its assessment of the likely effects of these developments on the economic outlook.
FOMC Minutes
The FOMC minutes are released three weeks after each FOMC meeting. The minutes provide a detailed account of the FOMC's discussion of economic and financial developments and its assessment of the likely effects of these developments on the economic outlook.
Producer Price Index (PPI) Releases
The Producer Price Index (PPI) measures changes in the price level of goods and services sold by domestic producers. The PPI is a weighted average of prices of a basket of goods and services, such as transportation, food, and medical care. PPI is a leading indicator of CPI.
Consumer Price Index (CPI) Releases
The Consumer Price Index (CPI) measures changes in the price level of goods and services purchased by households. The CPI is a weighted average of prices of a basket of consumer goods and services, such as transportation, food, and medical care. CPI is one of the most widely used measures of inflation.
Consumer Sentiment Index (CSI) Releases
The University of Michigan's Consumer Sentiment Index (CSI) is a measure of consumer attitudes about the economy. The CSI is based on a monthly survey of U.S. households and reflects the consumers' assessment of present and future economic conditions. The CSI is a leading indicator of consumer spending, which accounts for about two-thirds of U.S. economic activity.
Consumer Confidence Index (CCI) Releases
The Consumer Confidence Index is a survey that measures how optimistic or pessimistic consumers are regarding their expected financial situation.
Non-Farm Payroll (NFP) Releases
The Non-Farm Payroll (NFP) is a measure of the change in the number of employed persons, excluding farm workers and government employees. The NFP is a leading indicator of consumer spending, which accounts for about two-thirds of U.S. economic activity.
RSI Trend Veracity (RSI TV)The RSI only plots itself between a high and a low value. It does not show its bullish/bearish sentiment.
The RSI TV shows the sentiment and helps anticipate the RSI trend but not the price trend.
When the Trend Veracity Line is in green, there is bullish sentiment. When it is in red, there is bearish sentiment.
The closer the lines get to their extremities, the more the current trend of the RSI is exhausted.
It works quite well even in choppy markets. See notes in the picture for more details.
Double RSI TrendThis is my Double RSI Trend Indicator. It issues Buy and Sell signals based on the Supertrend and a double RSI . The RSIs cross near or at the same time as the Supertrend fires. It has the ability to change if you want signals based on the RSI cross on the same candle, one candle before, and two candles before. I find this one extremely good at catching reversals as long as you filter out some of the signals based on trend.
Trend Dominance Multi Timeframe [Misu]█ This indicator shows the repartition of bullish and bearish trends over a certain period in multiple timeframes. It's also showing the trending direction at the time.
█ Usages:
Trend dominance is expressed with two percentages: left is downtrend and right is uptrend. Cell colors turn green if dominance is up and red if it is down.
Knowing the trend dominance allows you to have a better overview of the market conditions.
You can use it to your advantage to favor long or short trades, reversal or breakout strategies, etc.
█ Features:
> Table colors
> Instant Trend Multitimeframe
> Trend Dominance Multitimeframe
█ Parameters:
> Length: Length is used to calculate ATR.
> Atr Multiplier: A factor used to balance the impact of the ATR on the Trend Bands calculation.
> UI Settings
Volume/Market ProfileVolume/Market Profile is a 2 in 1 Volume Profile and Market Profile Indicator.
This indicator is my own calculations for compiling a volume profile and market profile.
The profile is progressively calculated live as the chart develops.
I have made use of both Boxes AND Lines to allow me to display a finer granularity profile by displaying up to twice the max amount of lines allowed in tradingview.
I have spent a lot of time to make sure the values are getting appended exactly as intended so that I can assure this profile is operating as precisely as possible within the limitations of the data available.
To make my calculations easier to use in other places, I have made my volume profile a function that can be extracted and used whenever you need values from a volume profile.
Feel free to read through the script if you don't understand how this profile is developed. I have made a commentary of my volume profile function to help you understand what exactly happens to compile the profiles.
As mentioned before, This indicator doubles as a market profile. To view both at the same time you will need to add the indicator on your chart twice.
I have built in comprehensive customizations to allow you to display your profiles however fits your needs.
Timeframe: The aggregation period for profiles, to see a 1 week profile, change the timeframe to 1 week.
Note: You can add custom timeframes by adding a custom timeframe in your chart timeframe dropdown menu. When you add timeframes in this area, they appear as options within indicators with the timeframe input.
Sensitivity: Allows for greater or less granularity changes. The calculation method for granularity automatically changes depending on the range of your chart.
Note: Multiply this value by 100 and that will be the max range (in ticks) of your price before the indicator automatically adjusts to make the profile less granular. (ex. If price ranges $1, and 1 tick is $0.01, granularity will be 0.01 with a sensitivity of 1+)
Value Area %: % of total volume to display as the value zone. (_% of total profile values are contained within the value zone)
Calculate as Market Profile: Uses a 1 Instead of the candle volume, to display a Market Profile. (If selected POC -> TPOC)
Display Size: Sets the # of bars from the profile axis to the profile's max value. If set negative, profile will be displayed left of axis, if positive, profile will be displayed to the right of the axis.
Display Offset: Sets the # of bars in front(or behind) the current chart bar to set the axis of the profile. If negative, the axis will be to the left of the current chart bar, if positive the axis will be right of the current chart bar.
Display Historical POC/VAH/VAL: Choose to display historical poc,vah,val lines.
Colors: I'm not explaining colors.
Enjoy!
Sector RotationThis script is attempt to create and observe the real-time and historical performance of the all major sectors of Indian Market in one screen.
for Data Presentation I used Short sector names so that I can manage to get space and efficient presentable data.
Short Names and Actual Sector Names
BNF : CNX-BANKNIFTY
IT : CNX-IT
PRMA : CNX - PHARMA
FMCG : CNX-FMCG
AUTO : CNX-AUTO
MTAL : CNX-METAL
MDIA : CNX-MEDIA
RLTY : CNX-REALTY
IFRA : CNX-INFRA
ENGY : CNX-ENERGY
PSU-B : CNX-PSU-BANK
PVT-B : NIFTY-PVT-BANK
F-SRV : CNX-FINANCE
CONSM : CNX-CONSUMPTION
C-DUBL : NIFTY_CONSR_DURBL
You can use this script in 30-min, Daily, Weekly and Monthly Time Frames.
The green Square denotes the current Symbol Performance.
The Blue Border boxes are created when one sector intersects other sector.
In this Update following features are added
Now users have control over sectors, what are all the sectors you wanted to plot you can select from the input menu.
Currently user can highlight any one sector in different border color so that user can easily spot and track particular sector.
This thicker blue line denotes lowest and highest point of the current timeframe.
Liquidity Heatmap (Nephew_Sam_)Liquidity Heatmap
This indicator plots a heatmap of resting liquidity above and below swing lows and multiple timeframes
The darker the color is or the larger the zone is, the more liquidity is lying there. If you think there are too many zones, you can increase the timeframes in the settings or just disable it.
Liquidity simply means orders such as stoplosses, buy/sell stops.
Disclaimer: You are free to use this code but your should be open source too
[FrizLabz]PB OLvlsDisplay Market Open and/or Premarket Open
Labels are offset to the right of Lines
You can adjust the number of opens back to display
If you want to change the format of the label please read the tool tip
Hope you enjoy
FrizLabz
Minimalist Doji HighlighterThis minimalism focused indicator was designed specifically to highlight doji candles (gravestone, long-legged, and dragonfly) that generally signal indecision/neutrality within price structure to improve trading accessibility for the disabled/visually impaired, visual charting cues or pattern visibility, and educational/learning purposes.
HOW TO USE IT:
Highlight doji candles to improve visual cues on chart.
Default size of 0.15-0.02 works best, yet can be modified thus ensuring flexibility of use and experimentation.
Additionally, there is an option to add crosses above doji candles for additional visual cues; this feature is set to false by default to avoid cluttering charts.
MARKET USAGE:
All time frames and assets.
MARKET CONDITIONS:
All conditions.
KERPD Noise Filter - Kaufman Efficiency Ratio and Price DensityThis indicator combines Kaufman Efficiency Ratio (KER) and Price Density theories to create a unique market noise filter that is 'right on time' compared to using KER or Price Density alone. All data is normalized and merged into a single output. Additionally, this indicator provides the ability to consider background noise and background noise buoyancy to allow dynamic observation of noise level and asset specific calibration of the indicator (if desired).
The basic theory surrounding usage is that: higher values = lower noise, while lower values = higher noise in market.
Notes: NON-DIRECTIONAL Kaufman Efficiency Ratio used. Threshold period of 30 to 40 applies to Kaufman Efficiency Ratio systems if standard length of 20 is applied; maintained despite incorporation of Price Density normalized data.
TRADING USES:
-Trend strategies, mean reversion/reversal/contrarian strategies, and identification/avoidance of ranging market conditions.
-Trend strategy where KERPD is above a certain value; generally a trend is forming/continuing as noise levels fall in the market.
-Mean reversion/reversal/contrarian strategies when KERPD exits a trending condition and falls below a certain value (additional signal confluence confirming for a strong reversal in price required); generally a reversal is forming as noise levels increase in the market.
-A filter to screen out ranging/choppy conditions where breakouts are frequently fake-outs and or price fails to move significantly; noise level is high, in addition to the background buoyancy level.
-In an adaptive trading systems to assist in determining whether to apply a trend following algorithm or a mean reversion algorithm.
THEORY / THOUGHT SPACE:
The market is a jungle. When apex predators are present it often goes quiet (institutions moving price), when absent the jungle is loud.
There is always background noise that scales with the anticipation of the silence, which has features of buoyancy that act to calibrate the beginning of the silence and return to background noise conditions.
Trend traders hunt in low noise conditions. Reversion traders hunt in the onset of low noise into static conditions. Ranges can be avoided during high noise and buoyant background noise conditions.
Distance between the noise line and background noise can help inform decision making.
CALIBRATION:
- Set the Noise Threshold % color change line so that the color cut off is where your trend/reversion should begin.
- Set the Background Noise Buoyancy Calibration Decimal % to match the beginning/end of the color change Noise Threshold % line. Match the Background Noise Baseline Decimal %' to the number set for buoyancy.
- Additionally, create your own custom settings; 33/34 and 50 length also provides interesting results.
- A color change tape option can be enabled by un-commenting the lines at the bottom of this script.
Market Usage:
Stock, Crypto, Forex, and Others
Excellent for: NDQ, J225, US30, SPX
Market Conditions:
Trend, Reversal, Ranging
BTC Twitter SentimentBTC Twitter Sentiment - shows the total numbers of all negative, neutral and positive Bitcoin related tweets.
On default settings, the tweets are plotted in red (negative) white (neutral) as well as green (positive). The three charts are stacked so the total number of tweets is easily discernible.
Furthermore, there's an optional smoothing setting in the options.
The Twitter Sentiment data is provided daily by IntoTheBlock; Since data is only updated once a day the graph might look chunky on lower timeframes, even with smoothing.
CrypNuevo Market SessionsExperimental script showing a different background color per market session. The session hours and colors can be customized. Note that the session hours can overlap.
Based on a thread by CrypNuevo on Twitter.
TPO Profile with Day StatFirst of all I want to Thank @noop42 for creating this wonderful Market Profile chart in Pine script
I have made some changes to this scripts
This Script can auto calculate the TPO Size for NSE Symbols and MCX Crude oil.
This Script Will only calculate the TPO's for visible range only so that the script use less heap size.
I have added some of the day Statistics to enhance your visualization.
Limitations of this Script
Currently This Script can Plot Market Profile Chart only for Historical Data.
It Can only Plot Market Profile Charts in 30-Mins Time Frame only so that you can't use it for Composite Profile Analysis.
To plot Market Profile Chart in Real Time and Historical please use "Market Profile With TPO by Drother"
timing marketIntraday time cycle . it is valid for nifty and banknifty .just add this on daily basis . ignore previous day data
FOMC & CPI DatesThis indicator plots vertical lines at the scheduled times of US Federal Reserve's FOMC Meeting Dates.
Data is based on U.S. Federal Open Market Committee (FOMC) Meeting Minutes
BTC Miner Netflows with smoothingBTC Miner Netflows with smoothing - shows the difference between Miner Inflow and Miner Outflow.
Miner income, sales as well as holdings, are generally considered to have a huge market impact, by analyzing miner Netflows, users can gauge if overall miners are accumulating or selling; high positive values point to accumulation, while negative numbers indicate net selling.
Data queried from IntoTheBlock.