Percentage Movement MarkerThis indicator works on Data on closing basis and can be used to identify day wise price movements on the applied charts.
E.g. You want to find the Thursdays on which a particular script has given more than 2% Bullish Move.
You select 'Thursday' in the selected day setting and put 2% in the Bullish move setting.
This will mark Thursday on the chart as 'X' and mark those those Thursdays with a green arrow where the % Move was more than 2 %.
Statistics
Money Velocity(GDP/M2)V=GDP/M2
Major world economy's money supply velocity. Compare how each country's monetary policy has played out and current trajectory in comparison to others. The velocity of money is a measure of the number of times that the average unit of currency is used to purchase goods and services within a given time period. The concept relates the size of economic activity to a given money supply, and the speed of money exchange is one of the variables that determine inflation.
Relevant Populations GroupedUSPOP Same idea as my previous grouped GDP indicator but now population sizes. Goes to show how a small portion of the world is responsible for most of what we consider economic productivity.
US/CA Bond Yield CurveEasy Viewing of 4 different duration bond yields for US and Canada. Bond prices and bond yields are excellent indicators of the economy as a whole, and of inflation in particular. A bond's yield is the discount rate that can be used to make the present value of all of the bond's cash flows equal to its price. Good as part of a macro set.
Expected DCA PriceShowing the expected price of the DCA strategy in half a year / one year / two years, weighted by the USD supply (M2) by default
.srb Alt.D excl.BTC,ETH,USDT,USDCThis is
Alt.Dominance chart excl.BTC, ETH, USDT, USDC.
You can see... pure alt.dominance chart...
Calc is
Alt.D excl.BTC, ETH, USDT, USDC = ( (CRYPTOCAP:TOTAL3 - CRYPTOCAP:USDT - CRYPTOCAP:USDC ) / CRYPTOCAP:TOTAL ) *100
.srb BTC.D excl.ETH Chart.srb BTC dominance excl.ETH Chart
Thanks for BTC dominance excl.ETH Idea to @BLUE43 on tradingview.
The script (originaly .srb) may be freely distributed under the MIT license.
Basic calc :
BTC.D excl.ETH = ( CRYPTOCAP:BTC / ( CRYPTOCAP:TOTAL - CRYPTOCAP:ETH )) * 100
You can switch Candle - Line
On/Off Tracking line
On/Off Last Price Label
On/Off BTC.D excl.ETH <----> regular BTC.D
BlackMEX - Production CostBitcoin's Value as determined by Joules of energy input only
Calculations per Medium article EV = (Energy-in) / (Supply Growth Rate) * (Fiat Factor)
Historic Energy Efficiency data can only be entered monthly due to processing speed constraints of below data load and should be considred an estimate only.
Energy Efficiency Data requires manual updating. Currently accurate as of 28 December 2019
Bitcoin Production Cost
Cambridge Bitcoin Electricity Consumption Index (CBECI) - Bitcoin's global electricity consumption in TwH.
NB: Uses MONTHLY averages of raw data from CBECI. TV script run-time is too slow with Daily/Weekly data here.
This requires manual updating once a month for ongoing accuracy.
Everything Bitcoin [Kioseff Trading]Hello!
This script retrieves most of the available Bitcoin data published by Quandl; the script utilizes the new request.security_lower_tf() function.
Included statistics,
True price
Volume
Difficulty
My Wallet # Of Users
Average Block Size
api.blockchain size
Median Transaction Confirmation Time
Miners' Revenue
Hash Rate
Cost Per Transaction
Cost % of Transaction Volume
Estimated Transaction Volume USD
Total Output Volume
Number Of Transactions Per Block
# of Unique BTC Addresses
# of BTC Transactions Excluding Popular Addresses
Total Number of Transactions
Daily # of Transactions
Total Transaction Fees USD
Market Cap
Total BTC
Retrieved data can be plotted as line graphs; however, the data is initially split between two tables.
The image above shows how the requested Bitcoin data is displayed.
However, in the user inputs tab, you can modify how the data is displayed.
For instance, you can append the data displayed in the floating statistics box to the stagnant statistics box.
The image above exemplifies the instance.
You can hide any and all data via the user inputs tab.
In addition to data publishing, the script retrieves lower timeframe price/volume/indicator data, to which the values of the requested data are appended to center-right table.
The image above shows the script retrieving one-minute bar data.
Up arrows reflect an increase in the more recent value, relative to the immediately preceding value.
Down arrows reflect a decrease in the more recent value relative to the immediately preceding value.
The ascending minute column reflects the number of minutes/hours (ago) the displayed value occurred.
For instance, 15 minutes means the displayed value occurred 15 minutes prior to the current time (value).
Volume, price, and indicator data can be retrieved on lower timeframe charts ranging from 1 minute to 1440 minutes.
The image above shows retrieved 5-minute volume data.
Several built-in indicators are included, to which lower timeframe values can be retrieved.
The image above shows LTF VWAP data. Also distinguished are increases/decreases for sequential values.
The image above shows a dynamic regression channel. The channel terminates and resets each fiscal quarter. Previous channels remain on the chart.
Lastly, you can plot any of the requested data.
The new request.security_lower_tf() function is immensely advantageous - be sure to try it in your scripts!
trailing_drawdown
Description:
Drawdown was a tool to measure historical risk, derived from measuring current wealth from its previous peak, casually from portfolio construction (weights allocation), will consider to having a minimum drawdown. In this indicator, the drawdown for individual assets is utilized to measure its value or percentage from its trailing peak (default to 1-yr period).
Drawdown:
drawdown = (price/peaks)-1
Feature:
Static: display drawdown as percentage
Dynamic: display drawdown as value
Number of New Highs - Number of New Lows in US MarketShow numbers of new highs vs numbers of new lows for Nasdaq, NYSE and AMEA
Sequence Distribution Reporta basic tool to retrieve statistics of the distribution of price range sequences.
WpProbabilisticLibLibrary "WpProbabilisticLib"
Library that contains functions to calculate probabilistic based on historical candle analysis
CandleType(open, close) This function check what type of candle is, based on its close and open prices
Parameters:
open : series float (open price)
close : series float (close price)
Returns: This function return the candle type (1 for Bullish, -1 Bearish, 0 as Doji candle)
CandleTypePercentDiff(open, close, qtd_candles_before, consider_dojis) This function calculates the percentage difference between Bullish and Bearish in a candlestick range back in time and which is the type with the least occurrences
Parameters:
open : series float (open price series)
close : series float (close price series)
qtd_candles_before : simple int (Number of candles before to calculate)
consider_dojis : simple string (How to consider dojis (no consider "NO", as bearish "AS_RED", as bullish "AS_GREEN"))
Returns: tuple(float, int) (Returns the percentage difference between Bullish and Bearish candles and which type of candle has the least occurrences)
PhinkTrade Risk Manager EssentialsHello there, fellow traders!
So, happy to bring you a new, free tool: my Risk Manager Essentials .
(To use it, click on "Add to favorite indicators" below, and then look for it in your charts’ "Indicators & Strategies" dialog window, inside "Favorites" tab.)
The main objective of this indicator is to help and incentivize as many traders as possible to adopt essential risk management practices .
First and foremost, it helps you define how much you can buy or sell, at your chosen price levels, in order to keep your risk always under control (in other words: in order to limit the amount you can potentially lose with a trade if your stop loss order is hit).
This is fundamental if you want to have a lasting and successful trading career: protect your capital, always . Because without it, you know: it’s game over.
Indicator also helps you visualize where minimum ideal target / take profit level is , given your risk, using the popular 3:1 Return/Risk ratio (R/R) .
3:1 R/R ratio is popular because with it you only need to “be right” (have price reach your targets) about 33% of the time, in order to be profitable : in other words, the fewer successful trades will pay you more than the sum of your unsuccessful ones will take from you.
So, make sure your strategy has a success rate greater than 33% and apply 3:1 R/R to your trades . This indicator will help you that, and with developing the necessary discipline . For example, by knowing where the ideal target should be, given your choices, you can assess the likelihood of it being reached in current price context. If that would look like a hard to happen scenario, it would probably be a good idea to avoid taking that particular trade.
Now, let’s see how it works:
When you deploy the indicator to the chart for the first time, you’ll be asked to define:
Your 1st entry price (interactively: you can define and adjust levels directly on the chart, thanks to the new Interactive Mode introduced by TradingView (ty, TV team!))
Your stop loss price (likewise)
Your 1st target price (likewise)
Your starting capital (via initial Input dialog)
Your risk (likewise)
Your risk is how much of your starting capital you are willing to lose if your stop loss is hit (define it as a % of your starting capital).
There’s a good practice here too: to risk only 1 percent of your capital per trade . This way, you can reinforce the odds of making more money than you lose and keep your peace of mind in all trades – and avoid messing up with your plans – and statistics – along the way.
Successful trading is a statistics-based endeavor. So, you want to implement and maintain consistency. Again, this indicator helps with that.
After initial setup:
You can also define additional entries and targets (up to 3 each) . Just open indicator’s Settings window and adjust accordingly.
If you have more than one entry – or target, the amounts involved will be split evenly between them. You can also enable the display of the Average Entry and Average Target labels , to see the equivalent, should you have taken (or take) a single order for each.
You can also define (via Settings, then interactively) a particular date and time for the trade . This way, labels will be presented near that moment, instead of constantly show near the latest bar.
Finally, you can personalize some other display settings: levels precision (number of decimal places), labels positions , and labels colors .
In conclusion:
You are very welcome to check it out – and adopt it on your daily use!
Please let me know your feedbacks as well. If you find any issues, or have any suggestions, I’ll be glad to hear. You can contact me here, via TradingView, or Telegram.
Finally, check the updates section below , as new stuff may show from time to time.
Thank you very much for your attention, and enjoy!
PhinkTrade
Portfolio of open positions ENGHello, I became interested in investing and trading, and there was a huge problem where and how to manage my portfolio,
I tried websites, got a spreadsheet in microsoft excel, and eventually it became possible to manage a portfolio in TradingView.
You enter data about purchases and follow the dynamics of your shares anytime, anywhere.
Added automatic transfer to one currency if the shares are traded in different currencies
The last column is how many percentages each share occupies of the total portfolio
Thanks to the TradingView team for the unique opportunity!
Collective IndicatorKey notes are that this indicators markets the High and Low of the previous day, week month and quarter. It also marks the open of the day, week, month and quarter. These are levels that can be important areas to take trades towards and away from.
It includes additional features some may wish to use that I've included for your convenience that I don't personally use anymore. This is the 50 and 200 EMAs and high volume candle coloring. EMAs can be helpful for identifying the average markup and markdown of a a trend on any given timeframe. Be careful with mean reversion strategies alone since they tend not to have great entries and could result in high losses if used in isolation.
The "Length" and "High Volume" settings control how the coloration of candles is applied. Length is the amount of bars it will use to calculate a volume average. "High Volume" is the multiplier used to distinguish how much additional volume you want to be considered "high" volume. 1x meaning average 2x meaning double volume and etc.
High volume identification can help show distributive or accumulative characteristics around key areas.
I personally focus on the Open, Low, High close data, apply SMC concepts and Wyckoff concepts to look for trades around these key areas.
PivotThis library was designed to create three different datasets using Bill Williams fractals. The goal is to spot trends in reversal data and ultimately use these datasets to help predict future price reversals.
First, the pivot() function is used to initialize and populate three separate arrays (high pivot , low pivot , all pivots ). Since each high/low price depends on the bar_index, the bar_index, pivot direction(high/low), and high/low values are compressed into a string to maintain the data's integrity ("__"). Once each string array is populated and organized by bar_index, all three are returned inside a tuple. The return value must be deconstructed H,L,A =pivot() for each array's values to be accessed using getPivot() . This boilerplate allows for data to be accessed more efficiently in a recursive environment. getPivot() was designed to be used inside of a for or while block to populate matrices for further analyses. Again, getPivot() return values must be exposed through deconstruction. x,d,y =getPivot(). See code for more details.
pivot(int XLR) initializes and populates arrays
Parameters
XLR - number of bars to the left and right that must be lower for a high to be considered a pivotHigh, or vice versa. This number will drastically change the size and scope of the returned datasets. smaller values will produce much larger datasets, which might model short term price activity well. In contrast, larger values will produce smaller datasets which might model longer term price activity well.
Returns - tuple [string ]
getPivot(string arrayID, int index) accesses array data
Parameters
arrayID - the variable name for one of the three arrays returned by pivot().
index - the index of the provided array, with 0 being the most recent pivot point. can be set to " i " in a loop to access values recursively
Returns - tuple
ATH ATL ATX FinderHello!
This is an indicator to determine ATH, ATL and ATX:
ATH - All time high
ATL - All time low
ATX - All time X
X to ATH - how many X is possible to get when reach ATH
ATH from X - how many X is already archieved from ATL
How to use:
Select any market and see abovementioned parameters.
You may alter initial date to start from in the settings.
Enjoy!
Yearly Percentage ReturnsAn indicator that lets you visualize the historical Yearly Percentage returns of any symbol .
Key Features:
Displays the yearly returns from start to end of each year
Displays a table showing all yearly returns for current symbol
Displays start of each year as a vertical line
Displays up to 5 custom horizontal levels
Table Settings:
Enable table - Show/Hide the table
Size - Sets the size of the table
Position - Sets the position of the table on the screen
Direction - Sets the direction of the table to display the data (Vertically or Horizontally)
seasonThis script is meant to help verify the existence of a seasonal effect in asset returns, using a Z-test. There are three steps:
1. Think of a way to identify a season. The available methods are: by month, by week of the year, by day of the month, by day of the week, by hour of the day, and by minute of the hour.
2. Set the chart to the unit of your season. For example, if you want to check whether a crop commodity's harvest season has a seasonal implication, select "month". If you want to investigate the exchange's opening or close, select "hour".
3. Using the inputs, select the unit (e.g. "month", "dayofweek", "hour", etc.) and the range that identifies the season. The example natural gas chart has set "start" to 8 and "end" to 12 for September through December.
The test logic is as follows:
The "season" you select has a fixed length; for example, months eight through twelve has a length of four. This length is used to compute a sample mean, which is the mean return of all September-December periods in the chart. It is also used to calculate the mean/stdev of every other four-month period in the chart history. The latter is considered the "population." Using a Z-test, the script scores the difference between the sample returns and the population returns, and displays the results at two levels of significance (P = 0.05 and P = 0.01). The null hypothesis is "there is no difference between the seasonal periods and the population of ordinary periods". If the Z-score is sufficiently large or small, we can reject the null hypothesis and say that there is a seasonal effect at the given level of confidence. The output table will show green for a rejection of the null hypothesis (meaning there is a seasonal effect) or red of acceptance (there is no seasonal effect).
The seasonal periods that you have defined will be highlighted on the chart, so you can make sure they are correct. Additionally, the output table shows the mean, median, standard deviation, and top and bottom percentiles for both the seasonal and population samples.
Many news sites, twitter feeds, influences, etc. enjoy posting statistics about past returns, like "the stock market has gone up on this day 85 out of the past 100 years" and so on. Unfortunately, these posts don't tell you that many of these statistics are meaningless, as even totally random price fluctuations will cause many such interesting figures to occur. This script provides a limited means of testing some such seasonal effects so you can see if they are probably just random, or if they may have some meaning.
Note that Tradingview seems to use 1-based indexing for daily or higher timeframes, and 0-based indexing for intraday timeframes:
Months: 1-12
Weeks: 1-52
Days (of month): 1-31
Days (of week): 1-7
Hours (of day): 0-23
Minutes (of hour): 0-59
Front Angler Percent CJA nice little gadget.
Can be used to visually hint on volatility.
Will show a leading vertical bar which shows percentage of price, both up and down, in relation to current price.
[blackcat] L3 Financial Minesweeper: Altman Z ScoreLevel: 3
Background
The Altman Z-score is the output of a credit-strength test that gauges a publicly traded manufacturing company's likelihood of bankruptcy. The Altman Z-score is a formula for determining whether a company, notably in the manufacturing space, is headed for bankruptcy.
Function
The possibility of financial failure or bankruptcy of the enterprise is analyzed and predicted through the comprehensive score. The lower the Z value, the more likely the enterprise will go bankrupt. By calculating the Z value of an enterprise for several consecutive years, we can find out whether the enterprise has signs of financial crisis. Generally speaking, when the Z value is greater than 2.675, it indicates that the financial situation of the enterprise is good, and the possibility of bankruptcy is small; When the value is less than 1.81, it indicates that the enterprise is in a potential bankruptcy crisis; when the Z value is between 1.81 and 2.675, it is called a "gray area, indicating that the financial situation of the enterprise is extremely unstable.
Remarks
STOCKs ONLY which require financial data.
X1~X5 coefficients can be customized for different stock markets.
Compared to TradingView official Altman Z-Score Indicator.
Feedbacks are appreciated.