Stock Value Display//This study is designed to plot estimates for a stock's value:
//1) the Price to earnings ratio (PE) value based on the trailing twelve months of data
//2) the PE value based future data
//3) the Benjamin Graham value based trailing data
//4) the Dividend Discount value based on trailing data
You can adjust the period of data used to calculate the value between Fiscal Quarter "FQ" and Fiscal Year "FY."
The values displayed on the chart are subject to the financial information provided to TradingView. This is intended to be used as a quick reference and should be viewed in context with other analysis prior to making any transaction decisions.
As always, happy trading!
Фундаментальный анализ
P1 FundamentalsP1 is because to me, this is a priority 1 indicator, so I have P1 and P2 indicators ordered on the favorite list.
What can you check on the selection pane?
On “period”, you can show the data related to:
the fiscal quarters
or the fiscal years.
You can select a pack of financial data that I have organized in sections:
Revenue & earnings
EPS & DPS (EPS, EPS estimate, DPS and dividend payout ratio )
Debt (total debt, total equity and cash & equivalents)
Returns (ROE, ROIC, ROA and R&D revenue to ratio)
I recommend to just select one of them, in other case the chart is a mess.
Any feedback on the code is welcome!!
3 Weeks Tight - CANSLIM Technical Indicator3 Weeks Tight - Introduction
3 weeks tight is a bullish continuation pattern discovered by IBD's founder, William O'Neil.
The pattern can used as an opportunity to add to an existing position as it often occurs after a breakout above a cup with handle or other technical pattern.
The 3 weeks tight pattern forms when a stock closes within approximately 1% to 1.5% of the prior week's close for at least two weeks. The reason for the bullishness is that it indciates that investors who moved the stock upward in price since the breakout are not taking profits, the price is holding steady.
The buy point is just above the area of resistance formed at the highs of the three weeks plus 10 cents. The ten cent addition to the price is to ensure a push through the resistance at the high of the range.
Key Points:
It's preferred that closes for each week are in the upper half of the stock's range.
Ideally, volume will increase significantly as the stocks moves past the buy point.
This pattern generally performs best when the market is in an uptrend.
Features:
A configurable horizontal bar that spans the 3 week period.
A vertical band that highlights the tightness pattern.
A label to show the buy price after 3 week tight pattern.
Optional alert when the 3 weeks tight pattern is recognized.
Spitznagel Faustmann RatioThis is a rough version of the Faustmann Ratio metric that Mark Spitznagel presents in The Dao of Capital. The purpose is to conservatively calculate the price of the company (market cap) relative to net worth. Over a medium term horizon, the theory is that companies which have a high ROIC (see my other script) combined with a low Faustmann Ratio (color coded to give you a rough idea) should generally outperform. Please don't take this short summary as an excuse to not read the full book. It's well worth your time. (I am not affiliated with the author in any way.)
Spitznagel ROICThis is a rough version of the Return on Invested Capital metric that Mark Spitznagel presents in The Dao of Capital. The purpose is to calculate the return on real invested capital, conservatively calculated. Over a medium term horizon, the theory is that companies which have a high ROIC (presented here as a decimal value where 0.5 = 50%, 1 = 100%, etc., and color coded as a general guide) combined with a low Faustmann Ratio (see my other script) should generally outperform. Please don't take this short summary as an excuse to not read the full book. It's well worth your time. (I am not affiliated with the author in any way.)
GBTC premium as a percentage of the bitcoin pricePlots the GBTC premium as a percentage of the bitcoin price at the close. It also includes the annual management fee (2% at the moment). It accrues on a daily, weekly or monthly basis depending on the chart resolution. (intraday not supported) The amount of bitcoin per gbtc share and the annual fee may be changed by Grayscale in the future. Those values can be easily update in the script settings.
Graham Net Current Asset Value per ShareNet current asset value per share (NCAVPS) is a measure created by Benjamin Graham as one means of gauging the attractiveness of a stock. A key metric for value investors, NCAVPS is calculated by taking a company's current assets and subtracting total liabilities.
NCAVPS = Current Assets - (Total Liabilities + Preferred Stock) ÷ Shares Outstanding.
According to Graham, investors will benefit greatly if they invest in companies where the stock prices are no more than 67% (or 2/3) of their NCAV per share (price <= (2/3)*NCAV).
Coloring pattern:
- price <= (1/3)*ncav -> light green
- (1/3)*ncav < price <= (2/3)*ncav -> green
- (2/3)*ncav < price <= ncav -> dim red
- price > ncav -> red
Long RSIThe RSI is a technical indicator generally used with the general setting being 14 days, and often shorter.
The accepted view is that a level of 70 indicates overbought conditions, and 30 indicates oversold conditions.
A short RSI setting will give signals quite often, and they might sometimes contradict each other.
As a individual investor, perhaps with a background in fundamental analysis, the RSI might be overlooked for other fundamental metrics.
But the idea here is that longer RSI settings can be used for investing.
The problem that arises is how to know when the indicator has reached a level that is either overbought or oversold.
This script solves that by using a specific look back period (selectable, but the standard is 1 year), and plotting the highest/lowest value that the RSI has had for that time period.
The idea is that a buy signal occurs when the indicator is at a 'historic' low, and a sell signal occurs when it at its 'historic' high.
Since you generally want to buy when the indicator is at its low, and has stopped decreasing, the script comes with a function that shows you when yesterdays value reached a historic low, but todays value is higher than yesterday.
This is shown by a color change of the background to green. The same is true, but opposite, for sell signals and then the background turns red.
THIS IS NOT TRADING ADVICE, AND YOU SHOULD ALWAYS DO YOUR OWN RESEARCH
GOOD LUCK AND HAPPY TRADING
Fundamental Metric to MarketThis script is supposed to be a quite basic way to find, from a fundamental standpoint, overvalue or undervalued stocks.
The script shows either Book to Market (inverse of P/B), EV /EBITDA, Earnings Yield (inverse of P/E) or Sales to Market (inverse of P/S).
For example, P/B is calculated as Close price / Book Value per share. As a contrarian investor you generally want to buy low P/B stocks and sell high P/B stocks. The problem is when a company has a negative Book Value. This might be the case when a company has written of a large amount of goodwill, which in turn wiped out their Book Value.
Instead you can use Book to Market, which is simply the inverse of P/B. It is calculated as Book Value per share / Close price. When using Book to Market you, generally, want to buy shares with high Book to Market values and sell those with low values. Because of the calculation, companies with negative Book Value will have negative Book to Market values and is therefore easy to identify.
The Fundamental Metric to Market indicator shows a colored background between the highest / lowest point of earlier values and the current value. When the background is mainly green the stock is probably undervalued, and the opposite is true when the background is red.
THIS IS NOT TRADING ADVICE, AND YOU SHOULD ALWAYS DO YOUR OWN RESEARCH
GOOD LUCK AND HAPPY TRADING
FAIR P/E BASED ON INTEREST RATESJust a different way to view S&P 500 valuations versus the standard look of looking at raw PE. Current yield of the 10 Year Bonds are used to calculate a fair value for the SPX.
This is a methodology that Buffett uses to measure value.
Recommend turning off most plots and just plotting PE and/or PE10 percent difference only.
The "slope and intercept" inputs should be left alone unless you recalculate them with updated data.
The "current PE and PE10" inputs can be found here: www.multpl.com This is a daily estimated value.
The full calculated value is released once per month, and is what Quandl has. Change these numbers if you want today's updated values.
Once you have the study set up the way you want, I recommend saving the defaults (bottom left corner in the settings screen).
Graham NumberGraham Number is named after the “father of value investing,” Benjamin Graham, who was a mentor of Warren Buffett. The figure takes into account earnings per share and book value per share to measure a stock's maximum fair market value. In other words, it is the upper end of the price range that a defensive investor should pay for the stock.
The Graham Number = Square Root of (22.5) x (tmm EPS) x (mrq Book Value per Share).
The 22.5 is included in the formula as a rule of thumb to account for Graham's assumption that the price-to-earnings ratio should not be over 15 and the price to book ratio should not be over 1.5 for an undervalued stock. So, the number is generated as (P/E of 15) x (P/B of 1.5) = 22.5.
So the script generates a Graham number plot.
Rise from All Time LowThis very simple script lets you see how much the asset rose from the All Time Low (ATL).
First, the ATL is calculated and plotted. Then, we measure the distance from ATL and current bar close.
Two labels are plotted :
ATL label
Current close label with rise and rise
It can be useful for penny stocks trading when you want to buy lows but must see how much the price rose last bars to improve entries.
For example, SQBG is actually "only" at x 1.85 from ATL (not an advice in investment) :
If you have ideas to complete or improve this script, let me know in comments ;)
Position CalculatorThis script calculates how much cryptos or dollars you have to bet with 4 variables : Risk Loss , Leverage, Entry and Stop Loss.
When you want to open a position, just complete the parameters and the script will tell you how much you have to bet in dollars or cryptos units, depending the way you're trading.
Note : don't foreget that you have to pay fees on exchanges whose are not included here, specially with high leverage trades.
Fast ROI checker 50% Gann RetracementThis script is based on the Gann's 50% Retracement rule.
First, the ATH (All Time High) and ATL (All Time Low) are calculated; then, the 50% retracement level is found.
With this 50% level, we'll calculate the maximum price entry to keep a ROI which is set in the parameters.
For exemple, I only want to buy assets which can make a x16 before the 50% retracement , the script will calculate the maximum entry to respect this ROI .
If the Max entry price is above the ATL , the line will be green; if not, the line will be red.
To faster the search in the watchlist, when the price is between the Max Entry line and the ATL line, the background is painted in green.
It's not an investment strategy, you have to find your proper indicators to make purchases.
Enjoy !
L1 Bitcoin Whale Pump DetectorLevel: 1
Background
One of the biggest differences between cryptocurrency and traditional financial markets is that cryptocurrency is based on blockchain technology. Individual investors can discover the direction of the flow of large funds through on-chain transfers. These large funds are often referred to as Whale. Whale can have a significant impact on the price movements of cryptocurrencies, especially Bitcoin. Therefore, how to monitor Whale trends is of great significance both in terms of fundamentals and technical aspects.
Function
L1 Bitcoin Whale Pump Detector script This is a simple technical indicator that judges whether Whale is involved in the relationship between price increase and trading volume. Its purpose is not to accurately judge Whale behavior, but to provide a starting point for more Pine lovers to develop more advanced Whale monitoring programs.
Key Signal
pumpcond1 use price information alone with 7% as a threshold
pumpcond2 use both price and volume infomation.
Pros and Cons
Pros:
1. Detect Whale pump in large time frame.
2. Not a mature and accurate buy and sell script but provide alerts of Whale movements.
3. When it resonante with Buy signal, it has higher confidence level.
Cons:
1. Only detect Whale Pump, not Whale Dump is realized.
2. Only provide large fund information, not an accurate trading signal generator.
Remarks
You can use this to confirm blockchain large fund transfer activities. E.g. Large amount of USDT flows into large exchanges.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Graham FormulaThis is an Tradingview implementation of the Grahams Formula as described in Benjamin Grahams book "The Intelligent Investor".
In theory this can be used to screen for over- and undervalued stocks, however as Graham himself notes, you should look into other fundamentals when using them in conjunction with Grahams formula.
Buy Any Bar By ChenycoBuys amount of shares by bars with specified amount of money (100$ for a month bar for example).
Including commissions.
Compound Value @ annual rateBy studying historical data we can know the compounded growth rate of an investment from the inception date. For example if we know that an investment has grown at the rate of 6% in the past and if we expect similar growth in the future also, We can plot this graph to understand whether the current price is underpriced or overpriced as per projected return.
In this graph, it takes the initial close price as a principle and rate from the input and calculates the compound amount at each interval.
Intrinsic value calculation Intrinsic value calculator based on Warren Buffet's and Ben Graham's work
In value investing determing the true value of a COMPANY instead of a stock price is crucial.
This little indicator shows the "Intrinsic value" of the choosen stock meaning the value of the stock in 10 years time. Calculation is based on historical book value's average annual growth rate and dividends paid.
Since this is about long therm investing, use monthly charts.
"Intrinsic value can be defined simply: It is the discounted value of the cash that can be taken out of a business during its remaining life.”
– Warren Buffett
One way to calculate that is by the growth in per share book value and dividends taken in the forseeable future (10 years) than discount it with the prevailing 10 year note's rate.
In the inputs you have to set 2 variables:
1. How many years back you have the first data for book value per share available?
2. What was the per share book value that year?
(Bookvalue is ploted in olive colour and you can get the oldest one if you move your cursor over the latest data on the left)
CAUTION! You have to reenter it for every stock you analyse as this is stock-specific data!
After setting the input data, you will see the "Intrinsic Value"'s pink curve ploted over the price chart.
If the price is well below the pink line, the company is undervalued and can be a possible applicant for long therm investment.
Margin of safety: when the current price is 50% below the intrinsic value that means a 10% yearly growth potential (100% growth in 10 years) or a 100% margin of safety.
I am a beginer in Pine so please excuse my coding...
If anybody knows hot to extract historical data from 15 years ago, please share it with me, so I can automate the whole calculation without inputs necessary.
Funamental and financialsEarnings and Quarterly reporting and fundamental data at a glance.
A study of the financial data available by the "financial" functions in pinescript/tradingview
As far as I know, this script is unique. I found very few public examples of scripts using the fundamental data. and none that attempt to make the data available in a useful form
as an indicator / chart data. The only fitting category when publishing would be "trend analysis" We are going to look at the trend of the quarterly reports.
The intent is to create an indicator that instantly show the financial health of a company, and the trends in debt, cash and earnings
Normal settings displays all information on a per share basis, and should be viewed on a Daily chart
Percentage of market valuation can be used to compare fundamentals to current share price.
And actual to show the full numbers for verification with quarterly reporting and debuggging (actual is divided by 1.000.000 to keep numbers readable)
Credits to research study by Alex Orekhov (everget) for the Symbol Info Helper script
without it this would still be an unpublished mess, the use of textboxes allow me to remove many squiggly plot lines of fundamental data
Known problems and annoyances
1. Takes a long time to load. probably the amount of financial calls is the culprit. AFAIK not something i can to anything about in the script.
2. Textboxes crowd each other. dirty fix with hardcoded offsets. perhaps a few label offset options in the settings would do?
3. Only a faint idea of how to put text boxes on every quarter. Need time... (pun intended)
Have fun, and if you make significant improvements on this, please publish, or atleast leave a comment or message so I can consider adding it to this script.
© sjakk 2020-june-08
LotSizeCalc_v1 (EUR)Hey there,
here I like to publish my first TradingView Script for the Indicator "LotSizeCalc" which calculates the LotSize for the currency '€' for e.g. the MT4-App depending on the following parameters:
- Stop Loss in pips (example: 30 pips)
- Account Balance in EUR (example: 500€)
- Risk in % (example: 1%)
It is very similar to the MyFxBook Calculator on their website, where you can compare the results for the lotsize.
You receive the calculated value next to the indicator, and - for mobile device - it also shows a label with the calculated lotsize (which you can deacivate via settings if you like).
The indicator works for the included common foreign Forex pairs (AUD, CAD, CHF, JPY, JPY, GBP, NZD, USD) in order to calculate the risk to a EUR-Trading Account.
Actually, the Script allows in general some adaptations due to your trading system. This one is the most basic version.
Happy pips and I wish you safe and risk-calculated trading!
Marcel :)