NVT Z-ScoreNVT Z-Score Script:
Data Source and Calculation: This script calculates the NVT ratio by dividing the market cap (assumed from QUANDL data) by a 90-day MA of the transaction volume (also from QUANDL), similar to the NVTS calculation. However, the adaptation lies in further analyzing the NVT ratio through a Z-score approach, not explicitly described in the original NVTS methodology.
Z-Score Analysis: The script calculates the mean and standard deviation of the NVT ratio over a user-defined period (daysForMean, defaulting to 180 days) and then computes the Z-score of the current NVT ratio relative to this historical data. This Z-score analysis introduces a standardized way of understanding the NVT ratio's deviation from its historical average, offering a nuanced view of market valuation states.
Visualization and Dynamic Zones: The visualization emphasizes Z-score-based dynamic zones (green, yellow, and red), determined by the stdDevMultiplier. These zones are plotted and filled on the chart, providing visual cues for interpreting the NVT ratio's current state in relation to its historical norm. This aspect significantly differs from the traditional NVTS approach by directly incorporating the concept of standard deviation and Z-scores into the analysis.
Fundamental Analysis
Inflation CorrelationHeyo fellas,
In today’s dynamic economic landscape, understanding the relationship of market prices to other economical factors like inflation rate is crucial. The Inflation Correlation Indicator is designed to provide traders with a clear visualization of this relationship. By correlating average inflation rates from selected countries with market closing prices, this indicator offers a unique perspective on potential market movements influenced by inflationary trends.
Features:
Country Selection: Choose from the European Union (EU), Germany (DE), or the United States (US) to tailor the correlation analysis to your specific market interest.
Correlation Length Customization: Adjust the correlation length to refine the sensitivity of the indicator to recent inflation data.
Visual Clarity: The correlation histogram changes color based on the direction of the correlation, providing an intuitive understanding of the inflation correlation.
Whether you’re a fundamental analyst seeking to incorporate macroeconomic indicators into your strategy or a trader looking for an edge in inflation-sensitive markets, the Inflation Correlation Indicator is an indispensable tool in your TradingView arsenal.
Thanks for checking this out!
Best regards,
simwai
NSE Option Straddle Candle Chart
'NSE Option Straddle Candle Chart' plot a straddle chart of the mentioned strike.
Straddle means combine price of a call price and a put price.
User has 4 inputs :
1 : Spot Symbol
2 : Expiry date
3 : Straddle Strikes
4 : Ema Length
5 : Supertrend Inputs
How to use :
1 : Trade need to know first what is a straddle. If ATM straddle price is 405, than it means market is likely to close within 405 points up or down at the expiry.
2 : Straddle is traded on pairs only
3 : If trader sells a straddle than , straddle price should move down. For there reference supertrend and moving average is plotted on chart
4 : Both this indicators helps trade to identify the trend , hence predict market.
5 : Options are dying assite , so is straddle , so prefer selling straddle instead of buying.
Buffett IndicatorThis is an open-source version of the Buffett indicator. The old version was code-protected and broken, so I created another version.
It's computed simply as the entire SPX 500 capitalization divided by the US GDP. Since TradingView does not have data for the SPX 500 capitalization, I used quarterly values of SPX devisors as a proxy.
I tried to create another version of the Buffett indicator for other countries/indexes, but I can't find the data. If you can help me find data for index divisors, I can add more choices to this indicator.
It's interesting to see how this indicator's behavior has changed in the last few years. Levels that looked crazy are not so crazy anymore.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
NSE Option Chain
This Indicator show Options Data on signal dashboard , that help trader to analyse the market.
Options data consist of two things , Call and Put.
Every Strike has its Call and Put price.
So if user Opens any chart which is traded in options , dashboard will show total 16 Call and 16 Put strikes
8 Above from ATM and 8 Below from ATM.
On left hand side of dashboard there is Call data and on right side there is Put data.
Call side datas are , Call LTP which is latest price of that call strike , Call Chg which is change in points from previous day close and third is Call % which is % change from previous day close.
Same is on put side.
Color code is done based on positive or negative of data. If change or % is negative then color is red else green.
ATM strike data is plotted in bold
Inputs :
Spot Symbol Input for Option dashboard
Expiry date of that option contract
Strike interval between 2 strikes
Reference ATM strike ( user should keep this input as current ATM strike )
How to Use :
If dashboard shows call side is negative and put side is positive then that means market Bearish , because falling market leads to falling price of call and increase in price of Put.
Similarly if put is negative and call is positive then market is bullish.
This dashboard give trend conformation , trader should take other conformation also before taking trade.
Statistics • Chi Square • P-value • SignificanceThe Statistics • Chi Square • P-value • Significance publication aims to provide a tool for combining different conditions and checking whether the outcome is significant using the Chi-Square Test and P-value.
🔶 USAGE
The basic principle is to compare two or more groups and check the results of a query test, such as asking men and women whether they want to see a romantic or non-romantic movie.
–––––––––––––––––––––––––––––––––––––––––––––
| | ROMANTIC | NON-ROMANTIC | ⬅︎ MOVIE |
–––––––––––––––––––––––––––––––––––––––––––––
| MEN | 2 | 8 | 10 |
–––––––––––––––––––––––––––––––––––––––––––––
| WOMEN | 7 | 3 | 10 |
–––––––––––––––––––––––––––––––––––––––––––––
|⬆︎ SEX | 10 | 10 | 20 |
–––––––––––––––––––––––––––––––––––––––––––––
We calculate the Chi-Square Formula, which is:
Χ² = Σ ( (Observed Value − Expected Value)² / Expected Value )
In this publication, this is:
chiSquare = 0.
for i = 0 to rows -1
for j = 0 to colums -1
observedValue = aBin.get(i).aFloat.get(j)
expectedValue = math.max(1e-12, aBin.get(i).aFloat.get(colums) * aBin.get(rows).aFloat.get(j) / sumT) //Division by 0 protection
chiSquare += math.pow(observedValue - expectedValue, 2) / expectedValue
Together with the 'Degree of Freedom', which is (rows − 1) × (columns − 1) , the P-value can be calculated.
In this case it is P-value: 0.02462
A P-value lower than 0.05 is considered to be significant. Statistically, women tend to choose a romantic movie more, while men prefer a non-romantic one.
Users have the option to choose a P-value, calculated from a standard table or through a math.ucla.edu - Javascript-based function (see references below).
Note that the population (10 men + 10 women = 20) is small, something to consider.
Either way, this principle is applied in the script, where conditions can be chosen like rsi, close, high, ...
🔹 CONDITION
Conditions are added to the left column ('CONDITION')
For example, previous rsi values (rsi ) between 0-100, divided in separate groups
🔹 CLOSE
Then, the movement of the last close is evaluated
UP when close is higher then previous close (close )
DOWN when close is lower then previous close
EQUAL when close is equal then previous close
It is also possible to use only 2 columns by adding EQUAL to UP or DOWN
UP
DOWN/EQUAL
or
UP/EQUAL
DOWN
In other words, when previous rsi value was between 80 and 90, this resulted in:
19 times a current close higher than previous close
14 times a current close lower than previous close
0 times a current close equal than previous close
However, the P-value tells us it is not statistical significant.
NOTE: Always keep in mind that past behaviour gives no certainty about future behaviour.
A vertical line is drawn at the beginning of the chosen population (max 4990)
Here, the results seem significant.
🔹 GROUPS
It is important to ensure that the groups are formed correctly. All possibilities should be present, and conditions should only be part of 1 group.
In the example above, the two top situations are acceptable; close against close can only be higher, lower or equal.
The two examples at the bottom, however, are very poorly constructed.
Several conditions can be placed in more than 1 group, and some conditions are not integrated into a group. Even if the results are significant, they are useless because of the group formation.
A population count is added as an aid to spot errors in group formation.
In this example, there is a discrepancy between the population and total count due to the absence of a condition.
The results when rsi was between 5-25 are not included, resulting in unreliable results.
🔹 PRACTICAL EXAMPLES
In this example, we have specific groups where the condition only applies to that group.
For example, the condition rsi > 55 and rsi <= 65 isn't true in another group.
Also, every possible rsi value (0 - 100) is present in 1 of the groups.
rsi > 15 and rsi <= 25 28 times UP, 19 times DOWN and 2 times EQUAL. P-value: 0.01171
When looking in detail and examining the area 15-25 RSI, we see this:
The population is now not representative (only checking for RSI between 15-25; all other RSI values are not included), so we can ignore the P-value in this case. It is merely to check in detail. In this case, the RSI values 23 and 24 seem promising.
NOTE: We should check what the close price did without any condition.
If, for example, the close price had risen 100 times out of 100, this would make things very relative.
In this case (at least two conditions need to be present), we set 1 condition at 'always true' and another at 'always false' so we'll get only the close values without any condition:
Changing the population or the conditions will change the P-value.
In the following example, the outcome is evaluated when:
close value from 1 bar back is higher than the close value from 2 bars back
close value from 1 bar back is lower/equal than the close value from 2 bars back
Or:
close value from 1 bar back is higher than the close value from 2 bars back
close value from 1 bar back is equal than the close value from 2 bars back
close value from 1 bar back is lower than the close value from 2 bars back
In both examples, all possibilities of close against close are included in the calculations. close can only by higher, equal or lower than close
Both examples have the results without a condition included (5 = 5 and 5 < 5) so one can compare the direction of current close.
🔶 NOTES
• Always keep in mind that:
Past behaviour gives no certainty about future behaviour.
Everything depends on time, cycles, events, fundamentals, technicals, ...
• This test only works for categorical data (data in categories), such as Gender {Men, Women} or color {Red, Yellow, Green, Blue} etc., but not numerical data such as height or weight. One might argue that such tests shouldn't use rsi, close, ... values.
• Consider what you're measuring
For example rsi of the current bar will always lead to a close higher than the previous close, since this is inherent to the rsi calculations.
• Be careful; often, there are na -values at the beginning of the series, which are not included in the calculations!
• Always keep in mind considering what the close price did without any condition
• The numbers must be large enough. Each entry must be five or more. In other words, it is vital to make the 'population' large enough.
• The code can be developed further, for example, by splitting UP, DOWN in close UP 1-2%, close UP 2-3%, close UP 3-4%, ...
• rsi can be supplemented with stochRSI, MFI, sma, ema, ...
🔶 SETTINGS
🔹 Population
• Choose the population size; in other words, how many bars you want to go back to. If fewer bars are available than set, this will be automatically adjusted.
🔹 Inputs
At least two conditions need to be chosen.
• Users can add up to 11 conditions, where each condition can contain two different conditions.
🔹 RSI
• Length
🔹 Levels
• Set the used levels as desired.
🔹 Levels
• P-value: P-value retrieved using a standard table method or a function.
• Used function, derived from Chi-Square Distribution Function; JavaScript
LogGamma(Z) =>
S = 1
+ 76.18009173 / Z
- 86.50532033 / (Z+1)
+ 24.01409822 / (Z+2)
- 1.231739516 / (Z+3)
+ 0.00120858003 / (Z+4)
- 0.00000536382 / (Z+5)
(Z-.5) * math.log(Z+4.5) - (Z+4.5) + math.log(S * 2.50662827465)
Gcf(float X, A) => // Good for X > A +1
A0=0., B0=1., A1=1., B1=X, AOLD=0., N=0
while (math.abs((A1-AOLD)/A1) > .00001)
AOLD := A1
N += 1
A0 := A1+(N-A)*A0
B0 := B1+(N-A)*B0
A1 := X*A0+N*A1
B1 := X*B0+N*B1
A0 := A0/B1
B0 := B0/B1
A1 := A1/B1
B1 := 1
Prob = math.exp(A * math.log(X) - X - LogGamma(A)) * A1
1 - Prob
Gser(X, A) => // Good for X < A +1
T9 = 1. / A
G = T9
I = 1
while (T9 > G* 0.00001)
T9 := T9 * X / (A + I)
G := G + T9
I += 1
G *= math.exp(A * math.log(X) - X - LogGamma(A))
Gammacdf(x, a) =>
GI = 0.
if (x<=0)
GI := 0
else if (x
Chisqcdf = Gammacdf(Z/2, DF/2)
Chisqcdf := math.round(Chisqcdf * 100000) / 100000
pValue = 1 - Chisqcdf
🔶 REFERENCES
mathsisfun.com, Chi-Square Test
Chi-Square Distribution Function
1995-Present - Inflation and Purchasing PowerGood day, everyone! Today, we're going to look at a chart that's a bit different from the usual price charts we analyse. This isn't just any chart; it's a lens into the past, adjusted for the reality of inflation—a concept we often hear about but seldom see directly applied to our trading charts.
What we have here is an 'Inflation Adjusted Price' indicator on TradingView, and it's doing something quite special. It's showing us the price of our asset, let's say the S&P 500, not just in today's dollars, but in the dollars of 1995. Why 1995, you ask? Well, it's the starting point we've chosen to measure how much actual buying power has changed since then.
So, every point on this red line we see represents what the S&P 500's value would be if we stripped away the effects of inflation. This is the price in terms of what your money could actually buy you back in 1995.
As traders and investors, we're always looking at prices going up and thinking, 'Great! My investment is growing!' But the real question we should ask is, 'Is my money growing in real terms? Can it buy me more than it did last year, or five, ten, or twenty-five years ago?'
This chart tells us exactly that. If the red line is above the actual price, it means that the S&P 500 has not just grown in nominal terms, but it has actually outpaced inflation. Your investment has grown in real terms; it can buy you more now than it could back in 1995.
On the flip side, if the red line is below the actual price, that's a sign that while the nominal price might be up, the real value, the purchasing power, hasn't grown as much or could even have fallen.
This view is crucial, especially for the long-term investors among us. It gives us a reality check on our investments and savings. Are we truly growing our wealth, or are we just keeping up with the cost of living? This indicator answers that.
Remember, the true measure of financial growth is not just the numbers on a chart. It's what you can do with those numbers—how much bread, or eggs, or yes, even houses, you can buy with your hard-earned money
Daily Close GAP Detector [Yosiet]User Manual for "Daily Close GAP Detector "
Overview
This script is designed to help traders identify and react to significant gaps in daily market prices. It plots daily open and close prices and highlights significant gaps with a cross. The script is particularly useful for identifying potential breakouts or reversals based on these gaps.
Configuration
GAP Close Threshold: This input allows you to set a threshold for the gap size that you consider significant. The default value is 0.001.
Timeframe Seeker: This input lets you choose the timeframe for the gap detection. The default is 'D' for daily.
Features
Daily Open and Close Lines: The script plots daily open and close prices. If the close price is lower than the open price, the line is colored red; otherwise, it's green.
Gap Detection: It calculates the difference between the current day's close and the previous day's close, both adjusted for the selected timeframe. If this difference exceeds the threshold, it's considered a significant gap.
Significant Gap Indicator: A cross is plotted on the chart to indicate significant gaps. The color of the cross indicates whether the gap is a short or long gap: red for short gaps and green for long gaps.
Alert Conditions: The script sets up alert conditions for short and long gap breakouts. You can customize the alert messages to include details like the ticker symbol, interval, price, and exchange.
How to Use
Add the Script to Your Chart: Copy the script into the Pine Script editor on TradingView and add it to your chart.
Configure Inputs: Adjust the "GAP Close Threshold" and "Timeframe Seeker" inputs as needed.
Review the Chart: The script will overlay daily open and close prices on your chart, along with crosses indicating significant gaps.
Set Alerts: Use the script's alert conditions to set up alerts for short and long gap breakouts. You can customize the alert messages to suit your trading strategy.
Extending the Code
To extend this script, you can modify the gap detection logic, add more indicators, or integrate it with other scripts for a more comprehensive trading strategy. Remember to test any changes thoroughly before using them in live trading.
Earnings Line+Growth stock investors are concerned with Earnings per share that is growing, Sales (Revenue) that is growing and Increasing gross margins. This indicator helps view each of these parameters.
On the chart is Tesla (TSLA) gross margin (blue line) on a 12 trailing months basis (TTM). As you can see, TSLA's margins appear to be eroding.
The user selects one of the following parameters to display from the input drop down menu:
"EARNINGS_PER_SHARE_BASIC", "TOTAL_REVENUE", or "GROSS_MARGIN".
The value axis for your selection will appear on the left side of the chart.
The user also selects one of the following periods: "FY", "FQ" or "TTM" (Fiscal year, fiscal quarter or 12-trailing months). You have an option to display the inputs by checking the box. This is useful as a reminder but can be removed if the label is in the way.
The chart will render on any chart time scale, however longer time scales will probably be of more value. Weekly charts work well.
It is not possible to display more than one line simultaneously because of axis incompatibilities. However, it is possible to load this indicator multiple times and select different items in each. In this case additional left-side scales will be shown as well as additional lines. Common pairings are Revenue (Sales) and Earnings, or, Revenue and Gross Margin.
@ jmikes
Blockunity US Market Liquidity (BML)Get a clear view of US market liquidity and monitor its status at a glance to anticipate movements on risky assets.
The Idea
The BML aggregates and analyzes total USD market liquidity in trillions of dollars. It is used to monitor the liquidity of the USD market. When liquidity is good, all is well. If liquidity is low, the US will maneuver and sell treasury bills (debt) to replenish its treasury, which can lead to bearish pressure on markets, particularly those considered risky, such as Bitcoin.
How to Use
The indicator is very easy to use, there's nothing special about it. This tool is mainly intended to be used as fundamental information, and not for active trading.
Elements
The US Market Liquidity has several distinct components:
FED Balance Sheet
The Fed credits member banks’ Fed accounts with money, and in return, banks sell the Fed US Treasuries and/or US Mortgage-Backed Securities. This is how the Fed “prints” money to juice the financial system.
US Treasury General Account
The US Treasury General Account (TGA) balances with the NY Fed. When it decreases, it means the US Treasury is injecting money into the economy directly and creating activity. When it increases, it means the US Treasury is saving money and not stimulating economic activity. The TGA also increases when the Treasury sells bonds. This action removes liquidity from the market as buyers must pay for their bonds with dollars.
Overnight Reverse Repurchase Agreements
A reverse repurchase agreement (known as Reverse Repo or RRP) is a transaction in which the New York Fed under the authorization and direction of the Federal Open Market Committee sells a security to an eligible counterparty with an agreement to repurchase that same security at a specified price at a specific time in the future.
Earnings Remittances Due to the Treasury
The Federal Reserve Banks remit residual net earnings to the US Treasury after providing for the costs of operations, payment of dividends, and the amount necessary to maintain each Federal Reserve Bank’s allotted surplus cap. Positive amounts represent the estimated weekly remittances due to the US Treasury. Negative amounts represent the cumulative deferred asset position, which is incurred during a period when earnings are not sufficient to provide for the cost of operations, payment of dividends, and maintaining surplus.
Settings
Several parameters can be defined in the indicator configuration. You can:
Choose the smoothing and timeframe to be used in the plot.
Set the EMA lookback period and display it or not. This affects the color of the main plot.
Set the period to be taken into account when calculating the variation rate in the table.
Select the data to be taken into account in the calculation.
Activate or not the barcolor.
Lastly, you can modify all table parameters.
BTC Valuation
The BTC Valuation indicator
is a powerful tool designed to assist traders and analysts in evaluating the current state of Bitcoin's market valuation. By leveraging key moving averages and a logarithmic trendline, this indicator offers valuable insights into potential buying or selling opportunities based on historical price value.
Key Features:
200MA/P (200-day Moving Average to Price Ratio):
Provides a perspective on Bitcoin's long-term trend by comparing the current price to its 200-day Simple Moving Average (SMA).
A positive value suggests potential undervaluation, while a negative value may indicate overvaluation.
50MA/P (50-day Moving Average to Price Ratio):
Focuses on short-term trends, offering insights into the relationship between Bitcoin's current price and its 50-day SMA.
Helps traders identify potential bullish or bearish trends in the near term.
LTL/P (Logarithmic TrendLine to Price Ratio):
Incorporates a logarithmic trendline, considering Bitcoin's historical age in days.
Assists in evaluating whether the current price aligns with the long-term logarithmic trend, signaling potential overvaluation or undervaluation.
How to Use:
Z Score Indicator Integration:
The BTC Valuation indicator leverages the Z Score Indicator to score the ratios in a statistical way.
Statistical scoring provides a standardized measure of how far each ratio deviates from the mean, aiding in a more nuanced and objective evaluation.
Z Score Indicator
This BTC Valuation indicator provides a comprehensive view of Bitcoin's valuation dynamics, allowing traders to make informed decisions.
While indicators like BTC Valuation provide valuable insights, it's crucial to remember that no indicator guarantees market predictions.
Traders should use indicators as part of a comprehensive strategy and consider multiple factors before making trading decisions.
Historical performance is not indicative of future results. Exercise caution and continually refine your approach based on market dynamics.
Commitments of Traders Report [Advanced]This indicator displays the Commitment of Traders (COT) report data in a clear, table format similar to an Excel spreadsheet, with additional functionalities to analyze open interest and position changes. The COT report, published weekly by the Commodity Futures Trading Commission (CFTC), provides valuable insights into market sentiment by revealing the positioning of various trader categories.
Display:
Release Date: When the data was released.
Open Interest: Shows the total number of open contracts for the underlying instrument held by selected trader category.
Net Contracts: Shows the difference between long and short positions for selected trader category.
Long/Short OI: Displays the long and short positions held by selected trader category.
Change in Long/Short OI: Displays the change in long and short positions since the previous reporting period. This can highlight buying or selling pressure.
Long & Short Percentage: Displays the percentage of total long and short positions held by each category.
Trader Categories (Configurable)
Commercials: Hedgers who use futures contracts to manage risk associated with their underlying business (e.g., producers, consumers).
Non-Commercials (Large Speculators): Speculative traders with large positions who aim to profit from price movements (e.g., hedge funds, investment banks).
Non-Reportable (Small Speculators/Retail Traders): Smaller traders with positions below the CFTC reporting thresholds.
CFTC Code: If the indicator fails to retrieve data, you can manually enter the CFTC code for the specific instrument. The code for instrument can be found on CFTC's website.
Using the Indicator Effectively
Market Sentiment Gauge: Analyze the positioning of each trader category to gauge overall market sentiment.
High net longs by commercials might indicate a bullish outlook, while high net shorts could suggest bearish sentiment.
Changes in open interest and long/short positions can provide additional insights into buying and selling pressure.
Trend Confirmation: Don't rely solely on COT data for trade signals. Use it alongside price action and other technical indicators for confirmation.
Identify Potential Turning Points: Extreme readings in COT data, combined with significant changes in open interest or positioning, might precede trend reversals, but exercise caution and combine with other analysis tools.
Disclaimer
Remember, the COT report is just one piece of the puzzle. It should not be used for making isolated trading decisions. Consider incorporating it into a comprehensive trading strategy that factors in other technical and fundamental analysis.
Credit
A big shoutout to Nick from Transparent FX ! His expertise and thoughtful analysis have been a major inspiration in developing this COT Report indicator. To know more about this indicator and how to use it, be sure to check out his work.
IDX Financials v2This indicator adds financial data, ratios, and valuations to your chart. The main objective is to present financial overview that can be glanced quickly to add to your considerations.
The visualization of the indicator consists of two parts:
A. Plots (lines alongside the candlestick)
B. Financial table on the right. Drag your candlestick to the left to provide blank area for the table.
Programatically, the financial data is obtained by using these Pine API:
request.earnings(...) API for the EPS values that are used by the price at average PER line , and
request.financial(..) API for the rest of financial data required by the indicator.
See What financial data is available in Pine for more info on getting financial data in Pine.
A. THE PLOTS
The plots produces two lines, price at average PER in blue and price at average PBV line in pink, calculated over some adjustable time period (the default is one year). By default, only price at average PER line is shown.
Note that PER stands for Price to Earning Ratio.
The price at average PER line shows the price level at the average PER. It is calculated using formula as follows:
line = AVGPER * EPSTTM
where AVGPER is the average PER over some time period (default is one year, adjustable) and EPSTTM is the standardized EPS TTM.
Note that the EPS is updated at the actual time of earning report publication , and not at standard quarter dates such as March 31st, Dec 31st, etc.. This approach is chosen to represent the actual PE at the time.
The price at average PBV line (PBV stands for Price to Book Value), which can be enabled in settings, shows the price at average PBV. It is calculated using formula as follows:
line = AVGPBV * BVPS
where AVGPBV is the average PBV over some period of time (default is one year, adjustable) and BVPS is the book value per share. Note that the PBV is clipped to range to avoid values that are too small/large.
Also note that unlike PER, the BVPS is updated at each quarterly date (such as March 31st, Dec 31st, etc.).
Apart from those lines, some values are written to the status line (i.e. the numbers next to indicator name), which represent the corresponding value at the currently hovered bar:
PER TTM
Average PER
Std value (zvalue) of PER TTM (equal to = (PERTTM - AVGPER)/STDPER)
PBV
The meaning for these abbreviations should be straightforward.
Using the price at average PER line
There are several ways to use the price at average PER line .
You can quickly get the sense of current valuation by seeing the price relative to the price at average PER line . If the price is above the line, the valuation is higher than the average valuation, and vice versa if the price is lower.
The distance between the price and the average is measured in unit of standard deviation. This is represented by the third number in the status line. Value zero indicates the price is exactly at the average PER line. Positive value indicates price is higher than average, and negative if price is lower than average. Usually people use value +2 and -2 to indicate extreme positions.
The second way to use the line is to see how the line jumps up or down at the earning report date . If the line jumps up, this indicates the increase of EPSTTM. And vice versa when the line jumps down.
When EPSTTM is trending up over several quarters, or if EPSTTM is expected to go up, usually the price is also trending up and the valuation is over the average. And vice versa when EPSTTM is trending down or expected to go down. Deviation from this pattern may present some buying or selling opportunity.
B. THE FINANCIAL TABLE
The second visual part is the financial table. The financial table contains financial information at the last bar . It has four sections:
1. Revenue
2. Income
3. Valuations
4. Ratios
Let's discuss them in detail.
1. Revenue and income sections
The revenue and income table are organized into rows and columns.
Each row shows the data at the specified time frame, as follows:
The first four rows shows quarterly revenue/income of the last four quarters.
Then followed by TTM data.
Then followed by forecast of next quarter revenue/income, if such forecast exists. Note the "(F)" notation next to the quarter name.
Then followed by forecast of TTM data of next quarter (only for income), if such forecast exists. Note the "(F)" notation next to the TTM name.
The columns of revenue and income sections show the following:
The time frame information (such as quarter name, TTM, etc.)
The revenue/income value, in billions or millions (configurable).
YoY (year on year) growth, i.e. comparing the value with the value one year earlier, if any.
QoQ (quarter on quarter) growth, i.e. comparing the value with previous quarter value, if any.
GPM/NPM (gross profit margin or net profit margin), i.e. the margin on the specified time period.
Using the Revenue and Income table
The table provides quick way to see the revenue and income trend. You can see the YoY growth as well as QoQ, if that is applicable (non seasonal stocks). You can also see how the margins change over the periods.
The values are also presented with relevant background color . Green indicates "good" value and red indicates "bad" value. The intensity represents how good/bad the value is. The limits of the good and bad values are currently hardcoded in the script.
2. Valuations section
The valuation shows current stock valuation. The section is organized in rows and columns. Each row contains one type of valuation criteria, as follows:
PER (Price Earning Ratio)
Next quarter PER forecast (marked by "(F)" notation) when available
PBV (Price to Book value)
For each valuation criteria, several values are presented as columns:
The current value of the criteria. By current, it means the value at the last bar.
The one year standard deviation position
The three years standard deviation position
3. Ratios Section
The ratios section contains the following useful financial ratios:
ROA (Return on Asset), equal to: NET_INCOME_TTM / TOTAL_ASSETS
ROE (Return on Equity), equal to: NET_INCOME_TTM / BOOK_VALUE_PER_SHARE
PEG (PER to Growth Ratio), equal to PER_TTM / (INCOME_TTM_GROWTH*100)
DER (Debt to Equity Ratio), taken from request.financial(syminfo.tickerid, "DEBT_TO_EQUITY", "FQ")
DPR (Dividend Payout Ratio), taken from request.financial(syminfo.tickerid, "DIVIDEND_PAYOUT_RATIO", "FY")
Dividend yield, equal to (DPR * (NET_INCOME_TTM / TOTAL_SHARES_OUTSTANDING)) / close
KNOWN BUGS
Currently does not handle when the financial quarter contains gap, i.e. there is missing quarter. This usually happens on newly IPO stocks.
RP - Realized Price for Bitcoin (BTC) [Logue]Realized Price (RP) - The RP is summation of the value of each BTC when it last moved divided by the total number of BTC in circulation. This gives an estimation of the average "purchase" price of BTC on the bitcoin network based on when it was last transacted. This indicator tells us if the average network participant is in a state of profit or loss. This indicator is normally used to detect BTC bottoms, but an extension can be used to detect when the bitcoin network is "highly" overvalued. Because the "strength" of the BTC tops has decreased over the cycles, a logarithmic function for the extension was created by fitting past cycles as log extension = slope * time + intercept. This indicator triggers when the BTC price is above the realized price extension. For the bottoms, the RP is shifted downwards at a default value of 80%. The slope, intercept, and RP bottom shift can all be modified in the script.
CVDD - Coin Value Days Destroyed for Bitcoin (BTC) [Logue]Cumulative Value Days Destroyed (CVDD) - The CVDD was created by Willy Woo and is the ratio of the cumulative value of Coin Days Destroyed in USD and the market age (in days). While this indicator is used to detect bottoms normally, an extension is used to allow detection of BTC tops. When the BTC price goes above the CVDD extension, BTC is generally considered to be overvalued. Because the "strength" of the BTC tops has decreased over the cycles, a logarithmic function for the extension was created by fitting past cycles as log extension = slope * time + intercept. This indicator is triggered for a top when the BTC price is above the CVDD extension. For the bottoms, the CVDD is shifted upwards at a default value of 120%. The slope, intercept, and CVDD bottom shift can all be modified in the script.
MVRVZ - MVRVZ Top and Bottom Indicator for BTC [Logue]Market Value-Realized Value Z-score (MVRVZ) - The MVRV-Z score measures the value of the bitcoin network by comparing the market cap to the realized value and dividing by the standard deviation of the market cap (market cap – realized cap) / std(market cap)). When the market value is significantly higher than the realized value, the bitcoin network is "overvalued". Very high values have signaled cycle tops in the past and low values have signaled bottoms. For tops, the default trigger value is above 6.85. For bottoms, the indicator is triggered when the MVRVZ is below -0.25 (default).
Bond Yield SpreadThe Bond Yield Spread Script is developed for forex traders, offering an automated tool to calculate the bond yield spread between two countries associated with the forex pair displayed on the chart.
Functionality:
The script starts by identifying the base and quote currencies of the current forex pair and aligns them with their corresponding national bond symbols based on user-selected maturity, with options ranging from 01Y to 30Y. It calculates the yield spread by subtracting the bond yield associated with the quote country from that of the base country, following the formula:
Yield Spread = Yield(Base Country) − Yield(Quote Country)
which is then displayed as a plot line on the chart.
This script relies solely on TradingView's internal yield symbols, with the following calculation:
"currency" => "first two letters" + maturity
And maturity, in this case, is the value that is configured in the indicator settings, for example:
"EUR" => "EU" + "02Y" will result in EU02Y -> which will be used in the formula, depending on the quote or base currency.
Application in Trading:
This indicator is invaluable for traders employing carry trading strategies or assessing currency strength based on traded interest rates as an indicator. A higher yield spread typically indicates a stronger currency, because the return obtained for holding the currency is higher.
Originality and Practicality:
This script is self-developed, aiming to fill the gap in automatic bond yield comparisons within the TradingView environment. It is particularly beneficial for traders focusing on macroeconomic factors affecting forex markets. Unlike other scripts, it integrates various bond maturities into one tool, enhancing its utility and application range.
Conclusion:
Designed for traders incorporating macroeconomics in their strategy, this script will be useful to calculate the bond yield differences automatically without having to enter a new formula for every new currency pair.
Compliance and Limitations:
The script complies with TradingView scripting standards, ensuring no lookahead bias and maintaining real-time data integrity. However, its utility depends on the comprehensive availability of bond yield data within TradingView. As not all countries issue bonds for each listed maturity, this may limit the script’s application for certain currency pairs or specific maturities.
NUPL - Net Unrealized Profit-Loss BTC Tops/Bottoms [Logue]Net Unrealized Profit Loss (NUPL) - The NUPL measures the profit state of the bitcoin network to determine if past transfers of BTC are currently in an unrealized profit or loss state.
Values above zero indicate that the network is in overall profit, while values below zero indicate the network is in overall loss. Highly positive NUPL values indicate overvaluation of the BTC network and relatively negative NUPL values indicate an undervaluation of the BTC network.
For tops: The default setting for tops is based on decreasing "strength" of BTC tops. A decreasing linear function (trigger = slope * time + intercept) was fit to past cycle tops for this indicator and is used as the default to signal macro tops. The user can change the slope and intercept of the line by changing the slope and/or intercept factor. The user also has the option to indicate tops based on a horizontal line via a settings selection. This horizontal line default value is 73. This indicator is triggered for a top when the NUPL is above the trigger value.
For bottoms: Bottoms are displayed based on a horizontal line with a default setting of -13. The indicator is triggered for a bottom when the NUPL is below the bottom trigger value.
Blockunity Miners Synthesis (BMS)Track the status of Bitcoin and Ethereum Miners' Netflows and their asset reserves.
The Idea
The goal is to provide a simple tool for visualizing the changes in miners' flows and reserves.
How to Use
Analysing the behaviour of miners enables you to detect long-term opportunities, in particular with the state of reserves, but also in the shorter term with the visualization of Netflows.
Elements
Miners Reserves
Miners Reserves represent the balances of addresses belonging to mining pools (in BTC or ETH).
This data can also be displayed in USD via the indicator parameters:
Miners Netflow
The Netflow is calculated by subtracting the outflows from the inflows originating from addresses associated with mining pools. When this result is negative, it indicates that more funds are exiting the miners' accounts than the funds they are receiving. Consequently, negative miner netflows suggests selling activity.
This data can also be displayed in USD via the indicator parameters. You can also choose the timeframe. For example, selecting "Yearly" will give a Netflow daily average taking into account the last 365 days:
Settings
In the settings, you can first choose which asset to view, between Bitcoin and Ethereum. Here are the reserves of Ethereum miners:
As with Bitcoin, Netflow can also be displayed in the timeframe of your choice. Here you can see the average daily netflow of Ethereum miners in USD over the last 30 days:
Here are all the parameters:
Asset Selector: Choose between Bitcoin or Ethereum miner data.
Get values in USD: Displays values in USD instead of assets.
Switch between Netflow and Reserve : If checked, displays Miners' Reserves data. If unchecked, displays Miners' Netflow data.
Display timeframe: Allows you to select the timeframe for displaying the Netflow plot.
Period Lookback (in days): Select the period to be taken into account when calculating the variation percentage of Miners' Reserves.
Lastly, you can modify all table and labels parameters.
PUELL - PUELL Top and Bottom Indicator for BTC [Logue]Puell Multiple Indicator (PUELL) - The Puell multiple is the ratio between the daily coin issuance in USD and its 365-day moving average. This multiple helps to measure miner profitability. The PUELL indicator smooths the Puell multiple using a 14-day simple moving average. When the PUELL goes to high values relative to historical values, it indicates the profitability of the miners is high and a top may be near. When the PUELL is low relative to historical values, it indicates the profitability of the minors is low and a bottom may be near. The default trigger values are PUELL values above 3.0 for a "top" and below 0.5 for a "bottom".
TFS - Bitcoin (BTC) Transaction Fee Spike Top Indicator [Logue]Transaction Fee Spike (TFS) - For bitcoin (BTC), transaction fees on the bitcoin network can signal a mania phase when they increase well above historical values. This mania phase may indicate we are near a top in the BTC price. The transaction fee in USD is directly retrieved from Glassnode. The default trigger for this indicator fires when the transaction fees increase above $44/transaction.
Greenblatts Magic Formula - A multiple approachThis indicator is supposed to help find undervalued stocks. Inspired by Joel Greenblatt's strategy where he ranks stocks with the lowest EV/EBIT and the highest ROC. Inspired by the ERP5 strategy I have added Earnings Yield together with ROC.
My approach and how I use the indicator is to see Magic Formula score as a multiple, rather than ranking the numbers between different stocks. Like P/E for comparison. Different kinds of companies trades at different multiples so you have to compare the current MF Score in relation to historical MF Score to get an idea if it truly is undervalued. You also want to see that price actually reacts to a low MF Score.
As i general rule for myself I stay away from companies with EV/EBIT above 13 and generally want to see MF Score below 6-7. A company trading at a negative MF Score indicates that the company may be heavily undervalued.
Red line = EV/EBIT
Green line = ROC + EY / 2
Yellow line = "MF Score" EVEBIT - (ROC+EY/2)
Blue line = The 50 EMA of MF score
The strategy is simple. Look for companies which might be undervalued. Compare the current MF score to it's history. If it's trading near a previous bottom it indicates that the company might be undervalued. You can also use the MF EMA to see a more smooth curve to interpret the multiple.
Historical PE ratio vs medianThe Trailing Twelve-Month Price-to-Earnings (TTM P/E) Ratio vs. Median Value Indicator is a financial analytical tool designed to assess the current valuation of a stock or index in comparison to its historical norm. This is achieved by calculating the P/E ratio using the sum of the entity's earnings per share (EPS) over the past twelve months and dividing it by its current share price. The resulting TTM P/E ratio is then compared against the median P/E ratio calculated over a specified historical period.
The median P/E ratio serves as a benchmark, representing the midpoint of the entity's valuation over the selected timeframe, thus smoothing out short-term volatility and anomalies. By comparing the current TTM P/E ratio to this median, the indicator provides a relative measure of whether the stock or index is currently overvalued, undervalued, or trading at its historical valuation norms.