Fear N GreedOverview
The goal of this script was to apply the concept of Herd Mentality. While one voice may seem unique, when you combine all the voices together they average out and show an overall emotion of the herd. We should be able to apply this concept to indicators, giving us the Fear and Greed of the markets.
How to Use
Buy when there is fear and sell when there is greed. Pay attention to changes in direction of the indicator. If the data is fearful and the data is starting to change direction, it signals that it's probably a good time to buy because greed is slowly starting to enter the market. You can use this indicator in any time frame, just check the past data to determine how useful it will be for that specific period.
Options
Smoothing : This will smooth the data. Try to stay around 5-15. High values will cause the indicator to lag
Line Width : Visually changes the width of the data line
Top Band +- : Moves the top band up or down
Bot Band +- : Moves the bottom band up or down
Mid Band Width : Adjusts the width of the middle region
Fear Alert Level >= : Sets when the alert will start to trigger
Greed Alert Level >= : Sets when the alert will start to trigger
Indicators
There are multiple indicators used in this script. I used the Stochastic RSI to measure strength in the market. This combines well with the MACD indicator by giving you really good entry and exit points. There is an indicator combining money flow and rate of return to give a basic emotion of the data. I also included breadth and momentum and several others to help gauge the direction of the market. I then normalize all of the indicators between 0-100 so that I can get an overall average, smooth the noise, and ultimately plot the data.
Bands
While making this script I noticed flowing regions of the data that would act as support and resistance so I did my best to calculate where they might fall. I essentially take the high and low data points from various lengths averaging them and then apply a smoothing filter to the band. I then noticed that between the bands there was a significant region that acted as a middle resistance and support. I decided the best way to make this region was to take the average high + average low of the data and divide it by 2 to get the center region. The reason I did this instead of just using the mid point of the bands was because when the data stays in a similar region it creates resistance, so it's more accurate to base the mid point on a shorter time frame rather than the overall bands of higher timeframes.
Alerts
Alerts are set up based on the change in data direction. If you set Fear as the alert for Fear Alert >= it will wait for a change in direction if the data is greater than or equal to the selected Fear level.
When setting alerts, make sure to use Once Per Bar Close as the option. There are 3 alert types: Fear Alert, Greed Alert, and Fear and Greed Alert. Fear and Greed Alert will combine the alerts into one message so that it's usable for free accounts. Fear Alert and Greed Alert will only message for those specific positions.
Fearandgreed
Guerilla Fear/Greed Index StrategyThis strategy combines NAAIM Exposure Index and the Equity Put/Call Ratio into Fear/Greed Index that oscillates between 0 and 100.
It smooths all of these values and enters a trade when Fear reaches a certain threshold and exits when Greed reaches a certain threshold.
I don't really know if this is a great indicator or not, but the results on various indexes are pretty good, especially NASDAQ:TQQQ .
Was inspired by the knowledge gained following RolandoSantos .
Fear/Greed IndexMy goal was to create something akin to the Fear & Greed Index ( money.cnn.com ) that CNN and others do.
A Fear/Greed Index can be used by any trader or investor but I believe it's best viewed with a contrarian's eye--
When the market appears to be signalling Extreme Fear, that is a good place to start buying from emotional players who want to sell no matter the price
When signalling Extreme Greed, that may be a good place to start taking profits off or getting hedged, as there may be too much exuberance in the air
Important to note and remember, however, is that there can often times be fear in the air for good reasons! I like to see this as if we dip into extreme fear and return shortly after, the fear may warrant constraint from buying, or returning back to extreme greed may be a very strong market extension
The script draws from several other tickers which I have read and personally observed to be decent macro correlations for the stock market (specifically the SP500). For the state of each of these metrics I gave a rating, good or bad, then added them together and put it into your standard Stochastic.
These macro correlations include--
The % of stocks in the SP500 above multiple Simple Moving Average lengths
VIX and its term-structure (contango, backwardation)
Treasury Bonds
Gold
Junk/High Yield Bonds
The Put/Call Ratio
The SP500 Options Skew
Advancing and Declining Issues
On some of these I opted to use a function for the Relative Momentum Index instead of RSI, as the RMI oscillates better (in my opinion). I also used a Band-Pass Filter/Double EMA for smoothing the results of the stochastic.
A LOT of these numbers were made to my own observation and discretion and can get out-dated over time. With that said, PLEASE feel free to revise, fine tune, modify this as you wish to optimize yours. And please let me know if I have made any mistakes here or something should be added.
Simplified Crypto Fear & Greed DisplayA more simplified view of a Fear & Greed index.
This script has been made public because it uses Trading Psychology - Fear & Greed Index by DGT as the basis/inspiration for it.
I've re-imagined the visuals in order to display F&G data differently to the more traditional versions of the indicator floating around, as well as adapting it's calculations and reference assets for use with Crypto markets.
It's aim is to show the current status / mindset of market participants at a quick glance.
When there is a lot of fear in the market it is usually a good time to look for buying opportunities.
On the flip side you can use it to spot selling opportunities when there is too much greed / FOMO in the markets.
This indicator has the option for Traditional and Crypto markets.
The Traditional option uses the tickers VIX and GOLD as part of it's calculations, where as Crypto uses BVOL24H and BTC.D in order to base it's decisions off of more relevant data.
There are also 10 levels of smoothing so play around with that to get the desired result. Depending on the asset you are looking at, smoothing of 1 or 2 may work much better than 5+
Have a play around, customize it, use it and let me know what you think.
Trading Psychology - Fear & Greed Index by DGTPsychology of a Market Cycle - Where are we in the cycle?
Before proceeding with the question "where", let's first have a quick look at "What is market psychology?"
Market psychology is the idea that the movements of a market reflect the emotional state of its participants. It is one of the main topics of behavioral economics - an interdisciplinary field that investigates the various factors that precede economic decisions. Many believe that emotions are the main driving force behind the shifts of financial markets and that the overall fluctuating investor sentiment is what creates the so-called psychological market cycles - which is also dynamic.
Stages of Investor Emotions:
* Optimism – A positive outlook encourages us about the future, leading us to buy stocks.
* Excitement – Having seen some of our initial ideas work, we begin considering what our market success could allow us to accomplish.
* Thrill – At this point we investors cannot believe our success and begin to comment on how smart we are.
* Euphoria – This marks the point of maximum financial risk. Having seen every decision result in quick, easy profits, we begin to ignore risk and expect every trade to become profitable.
* Anxiety – For the first time the market moves against us. Having never stared at unrealized losses, we tell ourselves we are long-term investors and that all our ideas will eventually work.
* Denial – When markets have not rebounded, yet we do not know how to respond, we begin denying either that we made poor choices or that things will not improve shortly.
* Fear – The market realities become confusing. We believe the stocks we own will never move in our favor.
* Desperation – Not knowing how to act, we grasp at any idea that will allow us to get back to breakeven.
* Panic – Having exhausted all ideas, we are at a loss for what to do next.
* Capitulation – Deciding our portfolio will never increase again, we sell all our stocks to avoid any future losses.
* Despondency – After exiting the markets we do not want to buy stocks ever again. This often marks the moment of greatest financial opportunity.
* Depression – Not knowing how we could be so foolish, we are left trying to understand our actions.
* Hope – Eventually we return to the realization that markets move in cycles, and we begin looking for our next opportunity.
* Relief – Having bought a stock that turned profitable, we renew our faith that there is a future in investing.
It's hard to predict with certainty where we exactly are in the market cycle, we can only make an educated guess as to the rough stage based on data available. And here comes the study "Trading Psychology - Fear & Greed Index"
Factors taken into account in this study include:
1-Price Momentum : Price Divergence/Convergence versus its Slow Moving Average
2-Strenght : Rate of Return (RoR) also called Return on Investment (ROI) is a performance measure used to evaluate the efficiency of an investment, net gain or loss of an investment over a specified time period, the rate of change in price movement over a period of time to help investors determine the strength
3-Money Flow : Chaikin Money Flow (CMF) is a technical analysis indicator used to measure Money Flow Volume over a set period of time. CMF can be used as a way to further quantify changes in buying and selling pressure and can help to anticipate future changes and therefore trading opportunities. CMF calculations is based on Accumulation/Distribution
4-Market Volatility : CBOE Volatility Index (VIX), the Volatility Index, or VIX, is a real-time market index that represents the market's expectation of 30-day forward-looking volatility. Derived from the price inputs of the S&P 500 index options, it provides a measure of market risk and investors' sentiments. It is also known by other names like "Fear Gauge" or "Fear Index." Investors, research analysts and portfolio managers look to VIX values as a way to measure market risk, fear and stress before they take investment decisions
5-Safe Haven Demand : in this study GOLD demand is assumed
What to look for :
*Fear and Greed Index as explained above,
*Divergencies
Tool tip of the label displayed provides details of references
Conclusion:
As investors, we always get caught up in the day to day price movements, and lose sight of the bigger picture. The biggest crashes happen not when investors are cautious and fearful, it's when they're euphoric and expecting financial instruments to continue going higher. So as we continue investing, don’t forget to stop and ask yourself, where in the chart do you think we are right now? The Market Psychology Cycle shines light on how emotions evolve, fear and greed index can come in handy, provided that it is not the only tool used to make investment decisions. It is easy to look back at market cycles and recognize how the overall psychology changed. Analyzing previous data makes it obvious what actions and decisions would have been the most profitable. However, it is much harder to understand how the market is changing as it goes - and even harder to predict what comes next. Many investors use technical analysis (TA) to attempt to anticipate where the market is likely to go. Investors are advised to keep tabs on fear for potential buying the dips opportunities and view periods of greed as a potential indicator that financial instruments might be overvalued.
Warren Buffett's quote, buy when others are fearful, and sell when others are greedy
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
Disclaimer : The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Fear And Greed IndicatorThe Fear And Greed Indicator is a very popular indicator on the Bloomberg platform and since I didn't have actual source code to work with, this is a very close approximation of that indicator. Let me know if you spot any discrepancies with the original and I will do my best to fix them.
For buy and sell signals it is pretty straightforward. Just buy when the green (greed) is in control and sell when the fear (red) is in control
This was a special request so let me know if you want to see more scripts from me or if you want something custom!