Major and Minor Trend Indicator by Nikhil34a V 2.2Title: Major and Minor Trend Indicator by Nikhil34a V 2.2
Description:
The Major and Minor Trend Indicator v2.2 is a comprehensive technical analysis script designed for use with the TradingView platform. This powerful tool is developed in Pine Script version 5 and helps traders identify potential buying and selling opportunities in the stock market.
Features:
SMA Trend Analysis: The script calculates two Simple Moving Averages (SMAs) with user-defined lengths for major and minor trends. It displays these SMAs on the chart, allowing traders to visualize the prevailing trends easily.
Surge Detection: The indicator can detect buying and selling surges based on specific conditions, such as volume, RSI, MACD, and stochastic indicators. Both Buying and Selling surges are marked in black on the chart.
Option Buy Zone Detection: The script identifies the option buy zone based on SMA crossovers, RSI, and MACD values. The buy zone is categorized as "CE Zone" or "PE Zone" and displayed in the table along with the trigger time.
Two-Day High and Low Range: The script calculates the highest high and lowest low of the previous two trading days and plots them on the chart. The area between these points is shaded in semi-transparent green and red colors.
Crossover Analysis: The script analyzes moving average crossovers on multiple timeframes (2-minute, 3-minute, and 5-minute) and displays buy and sell signals accordingly.
Trend Identification: The script identifies the major and minor trends as either bullish or bearish, providing valuable insights into the overall market sentiment.
Usage:
Customize Major and Minor SMA Periods: Adjust the lengths of major and minor SMAs through input parameters to suit your trading preferences.
Enable/Disable Moving Averages: Choose which SMAs to display on the chart by toggling the "showXMA" input options.
Set Surge and Option Buy Zone Thresholds: Modify the surgeThreshold, volumeThreshold, RSIThreshold, and StochThreshold inputs to refine the surge and buy zone detection.
Analyze Crossover Signals: Monitor the crossover signals in the table, categorized by timeframes (2-minute, 3-minute, and 5-minute).
Explore Market Bias and Distance to 2-Day High/Low: The table provides information on market bias, current price movement relative to the previous two-day high and low, and the option buy zone status.
Additional Use Cases:
Surge Indicator:
The script includes a Surge Indicator that detects sudden buying or selling surges in the market. When a buying surge is identified, the "BSurge" label will appear below the corresponding candle with black text on a white background. Similarly, a selling surge will display the "SSurge" label in white text on a black background. These indicators help traders quickly spot strong buying or selling activities that may influence their trading decisions. These surges can be used to identify sudden premium dump zones.
Option Buy Zone:
The Option Buy Zone is an essential feature that identifies potential zones for buying call options (CE Zone) or put options (PE Zone) based on specific technical conditions. The indicator evaluates SMA crossovers, RSI, and MACD values to determine the current market sentiment. When the option buy zone is triggered, the script will display the respective zone ("CE Zone" or "PE Zone") in the table, highlighted with a white background. Additionally, the time when the buy zone was triggered will be shown under the "Option Buy Zone Trigger Time" column.
Price Movement Relative to 2-Day High/Low:
The script calculates the highest high and lowest low of the previous two trading days (high2DaysAgo and low2DaysAgo) and plots these points on the chart. The area between these two points is shaded in semi-transparent green and red colors. The green region indicates the price range between the highpricetoconsider (highest high of the previous two days) and the lower value between highPreviousDay and high2DaysAgo. Similarly, the red region represents the price range between the lowpricetoconsider (lowest low of the previous two days) and the higher value between lowPreviousDay and low2DaysAgo.
Entry Time and Current Zone:
The script identifies potential entry times for trades within the option buy zone. When a valid buy zone trigger occurs, the script calculates the entryTime by adding the durationInMinutes (user-defined) to the startTime. The entryTime will be displayed in the "Entry Time" column of the table. Depending on the comparison between optionbuyzonetriggertime and entryTime, the background color of the entry time will change. If optionbuyzonetriggertime is greater than entryTime, the background color will be yellow, indicating that a new trigger has occurred before the specified duration. Otherwise, the background color will be green, suggesting that the entry time is still within the defined duration.
Current Zone Indicator:
The script further categorizes the current zone as either "CE Zone" (call option zone) or "PE Zone" (put option zone). When the market is trending upwards and the minor SMA is above the major SMA, the currentZone will be set to "CE Zone." Conversely, when the market is trending downwards and the minor SMA is below the major SMA, the currentZone will be "PE Zone." This information is displayed in the "Current Zone" column of the table.
These additional use cases empower traders with valuable insights into market trends, buying and selling surges, option buy zones, and potential entry times. Traders can combine this information with their analysis and risk management strategies to make informed and confident trading decisions.
Note:
The script is optimized for identifying trends and potential trade opportunities. It is crucial to perform additional analysis and risk management before executing any trades based on the provided signals.
Happy Trading!
Fundamental Analysis
GBTC Cost Equivalent per BTCGBTC Cost Equivalent per BTC, dynamically updates BTC holdings per share of GBTC daily
GBTC Discount/Premium to NAVGBTC Discount/Premium to NAV, dynamically adjust BTC holdings per share daily
Earnings Yield SpreadThe Earnings Yield Spread might offer an investor some insight into areas of value.
Earnings yield is the ratio of Diluted earnings per share over the trailing twelve months (TTM) to the company’s share price. Earnings yield shows how much the company has earned per share as a percentage of its share price. It shows investors how much yield they are getting in earnings in return for owning the stock at its current share price. (Thank you, TradingView)
One might wonder how the earnings yield on their investment compares to the yield on a US 10 year treasury bond. The Earnings Yield Spread indicator will read above zero if the stock in question earnings yield is higher than US10Y and will read below zero if the stock in question earnings yield is lower than the US10Y.
Earnings yield is relative to the stock in question, so comparisons should be drawn to its own historical reading and not to other symbols.
Quarterly EarningsThis script displays quarterly earnings per share (EPS) and sales data, and their year-on-year percentage change.
The script builds upon the Volume Price and Fundamentals script by Mohit_Kakkar08 and improves upon the array functions to keep the code light-weight & the output as accurate as possible. This script uses diluted EPS data for calculating the quarterly earnings. New quarters are auto-generated by the script as the earnings data gets updated in Tradingview every quarter.
Features:
⦿ View quarterly earnings per share (EPS) and sales data.
⦿ The percentage change is a YoY (year on year) comparison of the current quarter to the same quarter of the previous year.
⦿ Option to change the data from Quarterly (FQ) to Yearly (FY) .
⦿ Long mode : Option to increase the number of previous quarters displayed in the table (default is the past 4 quarters) to any number.
⦿ Location & size of the table can be changed.
⦿ Option for a 1-click dark mode
⦿ Option for a ' Mini mode ' where the values are replaced by traffic lights for a quick visual:
🟢 or 🔵 YoY increase in earnings/sales
🔴 or 🟣 YoY decrease in earnings/sales
🟡 or 🟠 YoY earnings/sales unchanged
⚪️ No data available
⦿ The top-left cell has the option to display either the free float (FF) or the marketcap (Mcap) of the stock.
Please note that sometimes the Tradingview data reflected in the script output might differ a bit from MarketSmith. Also make sure you are viewing the 'consolidated' data there.
This script was developed as a collaboration between me & @EquityCraze .
Earnings Yield & Dividend Yield (vs SP500, treasury, IG)# What's this script?
I created this because I wanted to compare the Earnings/Dividend yield of SP500 and the symbol with the time period of the chart.
Plot the following yields.
Earnings Yield of S&P500.
Calculated using S&P 500 Earnings by Month provided by Nasdaq date link.
(data.nasdaq.com)
Dividend Yield of S&P500.
Calculated using S&P 500 Dividend by Month provided by Nasdaq date link.
(data.nasdaq.com)
Earnings Yield of the displayed symbol.
Dividend Yield of the displayed symbol.
Treasury constant maturity rate. default is 10Y(FRED:DGS10).
Investment grade corporate bond yields by Moody's.
Grades from Aaa to Baa are represented by color bands.
Investment grade bond yields by BofA.
Grades from AAA to BBB are represented by color bands.
-----------
◇これなに?
request.quandl()を用いてSP500の益回りと配当利回りが得られますが
月間データなのでチャートの時間間隔でみたかったのと、
SP500とシンボルの益回りや配当利回りを比較したかったのでつくりました。
下記を表示します
- SP500の益回りと配当利回り
- 表示シンボルの益回りや配当利回り
- 設定画面で指定した財務省債券(デフォルトは10年)
- 投資適格社債(MoodysとBofAでかなり違ったので両方)をカラーバンドで表示
かんたんなものですけど、おやくにたてればさいわいです
Global Yield SpreadThe Global Yield Spread is a simple indicator that can help to identify economic wellbeing and thus allows traders and investors alike to derive a rough estimation onto where the market is likely to go.
----------
Please note that things like Yield Spread generally influence the market only over longer time horizons of a couple weeks to many months.
Also be aware that the Yield Spread is only capable of measuring the Yields on Bonds and is thus limited to only changes that are reflected in the interest rates on the Bonds.
----------
The Normal Yield Spread is widely recognized for it's signal abilities for recessions or general economic well being...
However, since the rates have decreased drastically in the US something else has been proposed: The Global Yield Spread
As the normal US Yield Spread is loosing signal capacity because the US government can easily borrow money from overseas,
thus reducing the need to increase interest rates.
By monitoring and analyzing the Global Yield spread, traders and investors can gain insights into relative valuations, economic movements, market sentiment, and opportunities.
It can help inform their investment decisions and strategies, allowing them to allocate capital more effectively and potentially generate better returns.
You have options to visually represent a diversity of Countries and their according Yield Spreads.
Furthermore there are Global Yield Spreads for:
10Y-03MY
10Y-02Y
30Y-10Y
The Average Global Yield Spread encompasses the 3 options above to get an average reading.
EPS GrowthA graph to display EPS growth with a trailing simple moving average of the last 4 and 8 periods.
Periods of earnings recessions have a dark red background.
Periods of earnings expansion have a dark green background.
A buy signal/sell signal is generated if the actual period earnings beat the estimates.
Upgraded WatermarkThis mimics the built in watermark feature, but adds the ability to change location as well as see an equities sector and industry group.
Bitcoin Economics Adaptive MultipleBEAM (Bitcoin Economics Adaptive Multiple) is an indicator that assesses the valuation of Bitcoin by dividing the current price of Bitcoin by a moving average of past prices. Its purpose is to provide insights into whether Bitcoin is under or overvalued at any given time. The thresholds for the buy and sell zones in BEAM are adjustable, allowing users to customize the indicator based on their preferences and trading strategies.
BEAM categorizes Bitcoin's valuation into two distinct zones: the green buy zone and the red sell zone.
Green Buy Zone:
The green buy zone in BEAM indicates that Bitcoin is potentially undervalued. Traders and investors may interpret this zone as a favorable buying opportunity. The threshold for the buy zone can be adjusted to suit individual preferences or trading strategies.
Red Sell Zone:
The red sell zone in BEAM suggests that Bitcoin is potentially overvalued. Traders and investors may consider selling their Bitcoin holdings during this zone to secure profits or manage risk. The threshold for the sell zone is adjustable, allowing users to adapt the indicator based on their trading preferences.
Methodology:
BEAM calculates the indicator value using the following formula:
beam = math.log(close / ta.sma(close, math.min(count, 1400))) / 2.5
The calculation involves taking the natural logarithm of the ratio between the current price of Bitcoin and a simple moving average of past prices. The moving average period used is a minimum of the specified count or 1400, providing a suitable historical reference for valuation assessment.
The resulting value of BEAM provides a standardized measure that can be compared across different time periods. By adjusting the thresholds for the buy and sell zones, users can customize BEAM to their preferred levels of undervaluation and overvaluation.
Utility:
BEAM serves as a tool for investors in the Bitcoin market, offering insights into Bitcoin's valuation and potential buying or selling opportunities. By monitoring BEAM, market participants can gauge whether Bitcoin is potentially undervalued or overvalued, helping them make informed decisions regarding their Bitcoin positions.
It is important to note that BEAM should be used in conjunction with other technical and fundamental analysis tools to validate signals and avoid relying solely on this indicator for trading decisions. Additionally, traders and investors are encouraged to adjust the threshold values based on their specific trading strategies, risk tolerance, and market conditions.
Credit: The BEAM (Bitcoin Economics Adaptive Multiple) indicator was originally developed by BitcoinEcon
ATR profit and loss linesWhat is ATR?
Taking a candlestick, the following 3 transactions are calculated:
1-The difference between the high of the day and the low of the day
2-The difference between today's high and yesterday's close
3-The difference between today's low and yesterday's close
Atr takes the average of these 14-day candlesticks after making their calculations and it predicts how high or low a candle can go and these give us support and resistance helps with points
If you have noticed a rise in your chart and have no idea how high it will go, you can use Atr profit and loss lines.
The red zone is the stop point, the blue zones are the snow zones.
Must be used with macd. macd is validator.
There is an increase in your chart, you opened the atr profit and loss lines upwards and if macd gives you an increase, it is recommended that you enter the trade at that time. It is recommended to increase your loss line 1 step in the direction of profit every 2 profit breaks on atr profit and loss lines.
ATR Nedir?
Bir mum barı ele alınarak şu 3 işlem hesaplanır:
1-Günün yükseği ile günün düşüğü farkı
2-Günün yükseği ile dünün kapanışının farkı
3-Günün düşüğü ile dünkü kapanışın farkı
ATR ise 14 günlük bu mum barlarının hesaplarını yaptıktan sonra ortalamasını alır ve bir mumum ne kadar yükselip düşebileceği konusunda tahmin verir ve bunlar bize destek ve direnç noktaları konusunda yardımcı olur
Eğer grafiğinizde bir yükseliş farketmişseniz ne kadar yükseleceği konusunda fikriniz yoksa Atr kar zarar çizgilerini kullanabilirsiniz.
Kırmızı bölge durdurma noktası,mavi bölgeler kar bölgeleridir.
Macd ile birlikte kullanılmalıdır.macd doğrulayıcıdır.
Grafiğinizde yükseliş var,atr kar zarar çizgilerini yukarı yönlü açtınız ve macd size yükseliş veriyorsa işte o sırada işleme girmeniz tavsiye edilir.atr kar zarar çizgilerinde her 2 kar kırılımında bir zarar çizginizi kar yönünde 1 kademe arttırmanız önerilir
Bitcoin Limited Growth ModelThe Bitcoin Limeted Growth is a model proposed by QuantMario that offers an alternative approach to estimating Bitcoin's price based on the Stock-to-Flow (S2F) ratio. This model takes into account the limitations of the traditional S2F model and introduces refinements to enhance its analysis.
The S2F model is commonly used to analyze Bitcoin's price by considering the scarcity of the asset, measured by the stock (existing supply) relative to the flow (new supply). However, the LGS-S2F Bitcoin Price Formula recognizes the need for improvements and presents an updated perspective on Bitcoin's price dynamics.
Invalidation of the Normal S2F Model:
The normal S2F model has faced criticisms and challenges. One of the limitations is its assumption of a linear relationship between the S2F ratio and Bitcoin's price, overlooking potential nonlinearities and other market dynamics. Additionally, the normal S2F model does not account for external influences, such as market sentiment, regulatory developments, and technological advancements, which can significantly impact Bitcoin's price.
Addressing the Issues:
The LGS-S2F Bitcoin Price Formula introduces refinements to address the limitations of the traditional S2F model. These refinements aim to provide a more comprehensive analysis of Bitcoin's price dynamics:
Nonlinearity: The LGS-S2F model recognizes that the relationship between the S2F ratio and Bitcoin's price may not be linear. It incorporates a logistic growth function that considers the diminishing returns of scarcity and the saturation of market demand.
Data Analysis: The LGS-S2F model employs statistical analysis and data-driven techniques to validate its predictions. It leverages historical data and econometric modeling to support its analysis of Bitcoin's price.
Utility:
The LGS-S2F Bitcoin Price Formula offers insights for traders and investors in the cryptocurrency market. By incorporating a more refined approach to analyzing Bitcoin's price, this model provides an alternative perspective. It allows market participants to consider various factors beyond the S2F ratio alone, potentially aiding in their decision-making processes.
Key Features:
Adjustable Coefficients
Sigma calculation methods: Normal or Stdev
Credit:
The LGS-S2F Bitcoin Price Formula was developed by QuantMario, who has contributed to the field of cryptocurrency analysis through their research and modeling efforts.
TOP 4 STABLECOIN MARKET CAPIn the cryptocurrency market, there is a challenge: understanding the flow of stablecoins during market growth and downturns. It's difficult to grasp whether the market surge is due to a shift in funds from BTC or an influx of USD. Detecting the fluctuation in market capitalization of stablecoins helps investors gain a clearer perspective of market volatility.
Usage:
When there are fluctuations in the market capitalization, it is essential to combine observations of this indicator with other technical indicators.
EFFR Range VisualizerThis script takes the upper and lower target Effective Fed Funds Rate subtracted from 100 to allow the user to quickly visualize how these relate to STIR and Treasury markets.
Real Dominance//Due to incompliance with TV rules, I re-publish this indicator once again. Hope this time it's complaint.
Indicator shows dominance of main coin (BTC by default) after deduction of all stablecoins marketcaps and compares it to dominance that provides TradingView (BTC.D by default). The reason of writing this indicator is to deduct all stablecoins' caps from bitcoin dominance and show dominance without impact of other stablecoins. It means, that if crypto cap equals to, let's say 100, stablecoins' cap will be part of it (something between 10 and 20), but generally stablecoins are not crypto and it's caps are generally not limited, so we can't clearly see what is real dominance of BTC in compare with altcoins.
Notes:
1. dominance for timeframes lower than 1D could be calculated only on tariffs Pro+ or Premium (TV limitation)
2. you may change any and all tickers in indicator's setup menu
3. at the moment of publication (03.06.2023), TV doesn't offer market cap tickers for all stablecoins. Therefore in case it will be added in the future you may add it in the setup menu. There are placeholders for stablecoins that has market cap in amount of more than 5mil USD as of today.
Индикатор показывает доминацию главной монеты (по умолчанию BTC) за вычетом доли всех стейблкоинов в сравнении к доминации, которую показывает TradingView (по умолчанию BTC.D). Причиной написания данного индикатора является необходимость вычесть влияние стейблов на доминацию, так как важно смотреть доминацию именно в сравнении BTC/altcoins, и не учитывать стейблкойны, объем которых по большому счету не ограничен.
Особенности работы:
1. на тарифах кроме Pro+ и Premium, доминация может быть рассчитана только на дневном таймфрейме и выше (ограничения TradingView).
2. все тикеры, включая главную и сравниваемую монеты можно менять по желанию в настройках. Стиль линий настраивается на соответствующей вкладке в настройках.
3. к сожалению, на момент публикации индикатора (03.06.2023), TradingView предоставляет данные капитализации для ограниченного количества стейблкойнов. В настройки добавлены заглушки для последующего добавления других стейблкойнов. В список внесены монеты, капитализация которых на момент публикации индикатора составляла более 5 млн долларов.
Liquidity Proxy : ChinaThis is based on the 'Global Liquidity Proxy' as defined by Darius Dale.
GLP is comprised of:
* Central bank balance sheet
* Narrow money supply
* Foreign exchange reserves minus gold
This is an approximation based on the description above.
This indicator shows the global liquidity proxy for China.
The model, in terms of TradingView symbols is:
YoY change % of
CNCBBS + CNM1 + CNFER - CNGRES
The chart doesn't exactly match what Darius shows so his model is likely somewhat different.
RED : China liquidity index
GREEN : SSE composite index YoY change %
Sector/IndustryThis is a simple script that displays a symbol's sector and industry in a table at bottom right area of the chart.
Central Bank LiquidityCentral Bank Liquidity = Total value of the assets of all Federal Reserve Banks - Overnight Reverse Repurchase Agreements (RRP) - The Treasury General Account (TGA)
TradingView ticker arithmetic: FRED:WALCL-FRED:WTREGEN-FRED:RRPONTSYD
Valuation Metrics Table (P/S, P/E, etc.)This table gives the user a very easy way of seeing many valuation metrics. I also included the 5 year median of the price to sales and price to earnings ratios. Then I calculated the percent difference between the median and the current ratio. This gives a sense of whether or not a stock is over valued or under valued based on historical data. The other ratios are well known and don't require any explanation. You can turn off the ones you don't want in the settings of the indicator. Another thing to mention is that diluted EPS is used in calculations
US Market SentimentThe "US Market Sentiment" indicator is designed to provide insights into the sentiment of the US market. It is based on the calculation of an oscillator using data from the High Yield Ratio. This indicator can be helpful in assessing the overall sentiment and potential market trends.
Key Features:
Trend Direction: The indicator helps identify the general trend direction of market sentiment. Positive values indicate a bullish sentiment, while negative values indicate a bearish sentiment. Traders and investors can use this information to understand the prevailing market sentiment.
Overbought and Oversold Levels: The indicator can highlight overbought and oversold conditions in the market. When the oscillator reaches high positive levels, it suggests excessive optimism and a potential downside correction. Conversely, high negative levels indicate excessive pessimism and the possibility of an upside rebound.
Divergence Analysis: The indicator can reveal divergences between the sentiment oscillator and price movements. Divergences occur when the price reaches new highs or lows, but the sentiment oscillator fails to confirm the move. This can signal a potential trend reversal or weakening of the current trend.
Confirmation of Trading Signals: The "US Market Sentiment" indicator can be used to confirm other trading signals or indicators. For instance, if a momentum indicator generates a bullish signal, a positive reversal in the sentiment oscillator can provide additional confirmation for the trade.
Usage and Interpretation:
Positive values of the "US Market Sentiment" indicate a bullish sentiment, suggesting potential buying opportunities.
Negative values suggest a bearish sentiment, indicating potential selling or shorting opportunities.
Extreme positive or negative values may signal overbought or oversold conditions, respectively, and could precede a market reversal.
Divergences between the sentiment oscillator and price trends may suggest a potential change in the current market direction.
Traders and investors can combine the "US Market Sentiment" indicator with other technical analysis tools to enhance their decision-making process and gain deeper insights into the US market sentiment.
Rolling Risk-Adjusted Performance RatiosThis simple indicator calculates and provides insights into different performance metrics of an asset - Sharpe, Sortino and Omega Ratios in particular. It allows users to customize the lookback period and select their preferred data source for evaluation of an asset.
Sharpe Ratio:
The Sharpe Ratio measures the risk-adjusted return of an asset by considering both the average return and the volatility or riskiness of the investment. A higher Sharpe Ratio indicates better risk-adjusted performance. It allows investors to compare different assets or portfolios and assess whether the returns adequately compensate for the associated risks. A higher Sharpe Ratio implies that the asset generates more return per unit of risk taken.
Sortino Ratio:
The Sortino Ratio is a variation of the Sharpe Ratio that focuses specifically on the downside risk or volatility of an asset. It takes into account only the negative deviations from the average return (downside deviation). By considering downside risk, the Sortino Ratio provides a more refined measure of risk-adjusted performance, particularly for investors who are more concerned with minimizing losses. A higher Sortino Ratio suggests that the asset has superior risk-adjusted returns when considering downside volatility.
Omega Ratio:
The Omega Ratio measures the probability-weighted ratio of gains to losses beyond a certain threshold or target return. It assesses the skewed nature of an asset's returns by differentiating between positive and negative returns and assigning more weight to extreme gains or losses. The Omega Ratio provides insights into the potential asymmetry of returns, highlighting the potential for significant positive or negative outliers. A higher Omega Ratio indicates a higher probability of achieving large positive returns compared to large negative returns.
Utility:
Performance Evaluation: Provides assessment of an asset's performance, considering both returns and risk factors.
Risk Comparison: Allows for comparing the risk-adjusted returns of different assets or portfolios. Helps identify investments with better risk-reward trade-offs.
Risk Management: Assists in managing risk exposure by evaluating downside risks and volatility.
TTP NVT StudioNVT Studio is an indicator that aims to find areas of reversal of the Bitcoin price based on the extreme areas of Network Value Transaction.
Instructions:
- We recommend using it on INDEX:BTCUSD
- Use the daily or weekly timeframe
The indicator works as an oscillator and offers to visualisation modes.
1) Showing the short term oscillations of NVT showing signals in potential areas of reversal.
2) The actual value of NVT displayed. When in green is an area of value and in red when its overextended.
This indicator can be used based on the signals or based on breakouts of trend lines drawn in the oscillator mode.
Red/green dots: signal type 1 - extremes with confirmation, these might trigger late
Yellow/Orange: signal type 2 - extremes without confirmation, might trigger too soon
P/E RatioPlots the P/E Ratio with highest, lowest and average, as well as two ranges, 25-20 & 20-0 considered as the regular P/E Range