ARIMA Indicator with Optional SmoothingOverview
The ARIMA (AutoRegressive Integrated Moving Average) Indicator is a powerful tool used to forecast future price movements by combining differencing, autoregressive, and moving average components. This indicator is designed to help traders identify trends and potential reversal points by analyzing the historical price data.
Key Features
AutoRegressive Component (AR): Utilizes past values to predict future prices.
Moving Average Component (MA): Averages past price differences to smooth out noise.
Differencing: Reduces non-stationarity in the time series data.
Optional Smoothing: Applies EMA to the ARIMA output for a smoother signal.
Customizable Parameters: Allows users to adjust AR and MA orders, differencing periods, and smoothing lengths.
Concepts Underlying the Calculations
Differencing: Subtracts previous prices from current prices to remove trends and seasonality, making the data stationary.
AutoRegressive Component (AR): Predicts future prices based on a linear combination of past values.
Moving Average Component (MA): Uses past forecast errors to refine future predictions.
Exponential Moving Average (EMA): Applies more weight to recent prices, providing a smoother and more responsive signal.
How It Works
The ARIMA Indicator first calculates the differenced series to achieve stationarity. Then, it computes the simple moving average (SMA) of this differenced series. The indicator uses the AR and MA components to adjust the SMA, creating an approximation of the ARIMA model. Finally, an optional smoothing step using EMA can be applied to the ARIMA approximation to produce a smoother signal.
How Traders Can Use It
Traders can use the ARIMA Indicator to:
Identify Trends: Detect emerging trends by observing the direction of the ARIMA line.
Spot Reversals: Look for divergences between the ARIMA line and the price to identify potential reversal points.
Generate Trading Signals: Use crossovers between the ARIMA line and the price to generate buy or sell signals.
Filter Noise: Enable the optional smoothing to filter out market noise and focus on significant price movements.
Example Usage Instructions
Add the ARIMA Indicator to your chart.
Adjust the input parameters to suit your trading strategy:
Set the SMA Length (e.g., 14).
Choose the Differencing Period (e.g., 1).
Define the AR Order (p) and MA Order (q) (e.g., 1).
Configure the Smoothing Length if smoothing is desired (e.g., 5).
Enable or disable smoothing as needed.
Observe the ARIMA line (blue) and compare it to the price chart.
Use the ARIMA line to identify trends and potential reversals.
Implement trading decisions based on the ARIMA line’s behavior relative to the price.
Statistics
Markov Chain Trend IndicatorOverview
The Markov Chain Trend Indicator utilizes the principles of Markov Chain processes to analyze stock price movements and predict future trends. By calculating the probabilities of transitioning between different market states (Uptrend, Downtrend, and Sideways), this indicator provides traders with valuable insights into market dynamics.
Key Features
State Identification: Differentiates between Uptrend, Downtrend, and Sideways states based on price movements.
Transition Probability Calculation: Calculates the probability of transitioning from one state to another using historical data.
Real-time Dashboard: Displays the probabilities of each state on the chart, helping traders make informed decisions.
Background Color Coding: Visually represents the current market state with background colors for easy interpretation.
Concepts Underlying the Calculations
Markov Chains: A stochastic process where the probability of moving to the next state depends only on the current state, not on the sequence of events that preceded it.
Logarithmic Returns: Used to normalize price changes and identify states based on significant movements.
Transition Matrices: Utilized to store and calculate the probabilities of moving from one state to another.
How It Works
The indicator first calculates the logarithmic returns of the stock price to identify significant movements. Based on these returns, it determines the current state (Uptrend, Downtrend, or Sideways). It then updates the transition matrices to keep track of how often the price moves from one state to another. Using these matrices, the indicator calculates the probabilities of transitioning to each state and displays this information on the chart.
How Traders Can Use It
Traders can use the Markov Chain Trend Indicator to:
Identify Market Trends: Quickly determine if the market is in an uptrend, downtrend, or sideways state.
Predict Future Movements: Use the transition probabilities to forecast potential market movements and make informed trading decisions.
Enhance Trading Strategies: Combine with other technical indicators to refine entry and exit points based on predicted trends.
Example Usage Instructions
Add the Markov Chain Trend Indicator to your TradingView chart.
Observe the background color to quickly identify the current market state:
Green for Uptrend, Red for Downtrend, Gray for Sideways
Check the dashboard label to see the probabilities of transitioning to each state.
Use these probabilities to anticipate market movements and adjust your trading strategy accordingly.
Combine the indicator with other technical analysis tools for more robust decision-making.
SD Distance Mean BetaThe "SD Distance Mean Indicator" is a currently a developing tool designed to enhance trading precision by dynamically adjusting to market conditions. This indicator provides insights into price deviations from the mean, helping traders make inf OANDA:XAUUSD ormed decisions based on significant price movements.
Key Features:
Adaptive Length Adjustment:
The indicator dynamically adjusts the calculation period based on the Average True Range (ATR). This allows it to respond to different market conditions, using a shorter length during consolidations and a longer length during trends.
Standardized Distance Calculation:
The indicator calculates the distance of the current price from the mean and standardizes it using the standard deviation. This standardized distance is then smoothed to reduce noise and provide clearer signals.
Dynamic Standard Deviation (SD) Levels:
SD levels are adjusted dynamically based on ATR, providing a more accurate representation of price volatility. These levels are further smoothed to minimize wiggling on shorter timeframes like the 30-minute chart.
Visual Cues for Trading Signals:
The indicator plots multiple SD levels (+1, +2, +3, +4 and their negatives) and highlights significant price movements. When the standardized distance line hits or exceeds these levels, it signals potential overbought or oversold conditions.
Customizable Smoothing: The smoothing length for both the standardized distance and SD levels can be customized to suit different trading strategies and timeframes. Default values are set to provide a balance between responsiveness and stability.
Usage:
Identifying Reversals : The indicator helps in spotting potential reversal points. When the smoothed standardized distance line hits +2 SD or -2 SD and rebounds, it signals a possible price reversal back towards the mean.
Confirming Trends: Dynamic SD levels provide a clear visual representation of price volatility, helping traders confirm trend strength and potential breakout points.
Enhancing Precision: By dynamically adjusting to market conditions, the indicator enhances trading precision, making it suitable for various market environments.
This script is an essential addition to any trader's toolkit, offering a blend of adaptability, precision, and visual clarity to support more informed trading decisions.
Settings:
Short Length: Period length used during consolidations.
Long Length: Period length used during trends.
ATR Length: Length for ATR calculation.
ATR Threshold: Threshold value to switch between short and long lengths.
Smoothing Length: Length for smoothing the standardized distance.
SD Smoothing Length: Length for smoothing the dynamic SD levels.
By using this indicator, traders can leverage its adaptive capabilities to navigate various market conditions effectively and enhance their trading performance on XAUUSD and other assets.
Consecutive Closes Above/Below 3 SMA with Z-Score BandsA simple indicator that measures consecutive closes above & below the 3-period simple moving average. An upper and lower Z-score has been calculated to indicate where the 4 standard deviations of the last 60 bars sits.
Useful for identifying directional runs in price.
PEV Price BandThe PEV Price Band shows prices calculated using the high and low P/FQ EV of the previous period. (price to enterprise value per share for the last quarter) multiplied by FQ's current EVPS (similar to comparing marketcap to enterprise value but edit equations that are close to the theory of P/E)
If the current price is lower than the minimum P/EVPS, it is considered cheap. In other words, a current price is above the maximum is considered expensive.
PEV Price Band consists of 2 parts.
- First of all, the current P/EVPS value is "green" (if the markecap is less than the enterprise value) or "red" (if the marketcap is more than the enterprise value) or "gold" (if the market value is less than the enterprise value and less than equity)
- Second, the blue line is the closing price.
Easy Scalping Lot Calculator for ForexThe calculator was created to make it easier to calculate the lot size on Forex. I planned to use it for the following pairs: AUDCAD, AUDCHF, AUDJPY, AUDUSD, EURAUD, EURCAD, EURCHF, EURGBP, EURJPY, EURNZD, EURUSD, GBPCHF, GBPJPY, GBPUSD, NZDUSD, USDCAD, USDCHF, USDJPY, XAUUSD.
The indicator is a table that shows the calculation of the lot for a predetermined stop loss.
For example, you are planning a trade, have calculated a stop loss of 15 points, and by checking the table you understand approximately what lot you need to use to limit your risk.
In the settings you can change the risk and also determine the stop loss value in points.
The calculator does not take into account the spread in the calculations.
There are websites where you can accurately calculate the lot, but if you trade on small time frames this is not suitable for you.
The calculator uses the formula:
Lot size = maximum risk / stop loss (in pips) / minimum pip value x minimum trading lot.
Holding ValueTrading view requires me to add a larger description:
Short done by me: Show your holding value at each candlestick
Chatgpt:
This Pine Script plugin is designed to help traders and investors visualize the current value of their holdings in USD directly on TradingView charts. The plugin calculates the total value of the specified holdings based on the closing price of each candle and displays this value dynamically, formatted to show in thousands (k) or millions (m) with a maximum of two decimal places.
Features
Holdings Input: Allows the user to input the amount of the asset they hold.
Dynamic Calculation: Calculates the current value of holdings based on the closing price of each candle.
Formatted Display: Formats the value in thousands or millions with up to two decimal places.
Chart Label: Displays the formatted value as a label on the chart.
Data Window Display: Uses plotchar to display the current value in the data window without plotting it directly on the chart.
Scaled Historical ATR [SS]Hello again everyone,
This is the Scaled ATR Range indicator. This was done in response to an article/analysis I posted regarding the expected high and range on SPX. I would encourage you to read it here:
Essentially, I took SPX data, scaled it to correct for inflation, then calculated the ATR for Bullish years to get our average range to expect and our close range to expected.
I accomplished this analysis using Excel; however, I figured Pinescript would handle this type of task more elegantly, and I was correct!
This indicator is the result.
What it does:
This indicator permits the analyst to select a historic period in time. The indicator will then scale the period into returns and convert the range to a corrected range based on the current position of the ticker. How it does this is by converting the returns of the historic period selected, then multiplying the returns by the current period open, to ensure that the range amounts are corrected for inflation and natural growth of a ticker.
I say analyst because this indicator is intended to be used by both professional and recreational analysts, to give them an easy way to:
a) Scale historic data and correct it based on the current rate; and
b) Offer insight into a ticker’s ATR and behaviour during bullish and bearish periods.
Prior to this indicator, the only way to do this would be manually or the use of statistical software.
How to use?
The indicator’s use is quite simple. Once launched, the indicator will ask the user to input a timeframe period that the user is interested in assessing. In the main chart above, I chose SPX between 1995 and 2001.
The user can further filter down the data using the settings menu. In the settings menu, there is an option to filter by “All”, “Bullish Periods” or “Bearish Periods”.
Filtering by “All”
Filtering by “All” will include all candles selected within the timeframe. This includes both bearish and bullish candles. It will give you the averaged out range for the entire period of time, including both bearish and bullish instances.
Filtering by “Bullish”
Filtering by “Bullish” will omit any red candles from the analysis. It will only return the ATR ranges for green, bullish candles.
Filtering by “Bearish”
Inverse to filtering by Bullish, if you filter by Bearish, it will only include the red, bearish candles in the analysis.
My suggestion? If you are trying to determine t he likely outcome of a bullish year, filter by Bullish instances. If you want the likely outcome of a bearish year, filter by Bearish.
Other features of the Indicator:
The indicator will display the current period statistics. In the main chart above, you can see that the current ranges for this year are displayed. This allows you to do a side by side comparison of the current period vs. the historic period you are looking at. This can alert you to further upside, further downside and the anticipated close range. It can also alert you to whether or not we are following a similar trajectory as the historical periods you are looking at.
As well, the indicator will list target prices for the current period based on the historical periods you are looking at. This helps to put things into perspective.
Concluding Remarks
And that is the indicator in a nutshell! I encourage you to read the article I linked above to see how you may use it in an analysis. This would be the best example of a real world application of this indicator!
Otherwise, I hope you enjoy and, as always, safe trades!
MVRV-Z adjusted EN version (by ilyaevp95)Descriptions:
The MVRV Z-Score indicator is a powerful tool designed by original authors Murad Mahmudov and David Puell for BTC to help traders make informed decisions about their cryptocurrency investments. It is based on the MVRV (Market Value to Realized Value) metric, which measures the relationship between the market capitalization and the realized capitalization of a cryptocurrency. The indicator provides signals for accumulating or selling an asset based on deviations in market capitalization from realized capitalization.
How it works:
Market Capitalization : This is the total value of coins that have been issued at a given point in time. Market capitalization is calculated by multiplying the current price of the asset by the number of coins that have been issued.
Realized Capitalization (Realized Price) : This is the amount of money that has been spent on purchasing a particular asset. In the context of cryptocurrencies, it represents the sum of all transaction values for a specific blockchain. Realized capitalization can be calculated using historical data on transaction prices.
MVRV Metric : The MVRV metric compares market capitalization with realized capitalization, providing a measure of how overvalued or undervalued a cryptocurrency is relative to its historical transaction data. A high MVRV value indicates that the market is overvaluing the asset, while a low MVRV suggests undervaluation.
Z-Score Calculation : The Z-score is a statistical measure that normalizes the deviation of market capitalization from its mean value (realized capitalization) to a standard deviation. This makes it possible to compare assets that have different values and time periods, as it takes into account the volatility of the market.
Note: For accurate Z-score calculation, you need to use the indicator on a chart with a mostly complete historical data set for a specific cryptocurrency.
Signals : Based on the Z-score, the indicator generates signals for accumulation or sale. If the Z-score falls below a certain threshold (negative), it may indicate an opportunity to accumulate the asset. Conversely, if the Z-score rises above a positive threshold, it could suggest a potential sell signal.
The indicator uses a color-coded system to provide traders with visual cues:
Green background indicates a signal to accumulate.
Orange (Red) background indicates a signal to sell.
Deviations exceeding the specified thresholds by 1 and 2 Z (positive direction), 0.5 and 1 Z (negative direction) are highlighted in a brighter color, indicating more extreme deviations.
Note: The signals provided by this indicator should not be considered financial advice. Traders should conduct their own research (DYOR) before making any investment decisions.
Parameters: The indicator provides several parameters for customization:
Blockchain : The blockchain for which the analysis is performed. This allows the user to select the specific blockchain they are interested in analyzing. The default value is BTC.
Z threshold for positive deviations : This parameter sets the threshold above which the deviation will be considered positive. A higher value will result in fewer signals, while a lower value may generate more false signals. The default value is 3.0.
Z threshold for negative deviations : Similar to the previous parameter, this sets the threshold below which the deviation will be considered negative. The default value is 0.
Market Capitalization : There are two types of market capitalization available: Standard and Free float coin capitalization. Free float is calculated by multiplying its current price by the total number of units in free circulation - the number that are not locked in any contracts or other forms of restriction. For DASH, ZEC, BAT and ALGO available only Free float capitalization. The default value is "Standard"
Negative Deviation Filter Mode : When enabled, if the deviation has been positive for a certain number of previous weeks (the default value is 40 weeks), the indicator will not generate a signal to accumulate. This helps to avoid false signals during the start of a bearish market. This may be helpful for volatile coins, whose price can drastically fall below the realized price after the end of a bull market. The default setting is "disabled".
Display Options:
MVRV plot : Displays the MVRV metric for the selected blockchain.
Z-Score plot : Shows the Z-score calculated by the indicator.
Realized Price plot : Provides a visual representation of the realized price of the cryptocurrency on main chart.
S ignal Display : Choose whether to display signals on the main chart or in a separate panel.
Historical mode : Choose whether to show signals for all historical data on the chart or for a certain number of periods. The default setting is "disabled".
Groupings [SS]Hey everyone,
Releasing this indicator called groupings.
If you watch/read my analyses on Tradingview, you will have heard me talk about groups. Groups is something I invented. What it is, is just taking the Euclidean Distance (ED) of the previous 5 candles in a specified period (i.e. daily timeframe, weekly, 1 minute, 5 minute, etc.) and rounding the ED up to a whole number.
I have had great success in this approach because the information provided is broad enough to give leniency in interpretation but narrow enough to hone in on potential moves and target prices.
This indicator is a simplified version of how I do groupings in other software, however it is no less powerful!
What do groups tell us?
A "group" takes into account the previous 5 candles, using the ED. This gives Pinescript a general idea of what the short term trend looks like mathematically. From there, Pinescript can look for other groups that looked similar to how this current trend looks. From there, it can offer us insights into what tends to happen in candles subsequent to this group. For example, the ATR range, the close range and whether it is bearish or bullish.
And that is precisely how this indicator operates, Pinescript will calculate the group of the previous 5 canndles in the timeframe period you are looking at. It will then lookback over the designated "train" length and identify previous groups, and what happened in those groups. It looks specifically at:
- What is that average High ATR associated with that group,
- What is the average Low ATR associated with that group,
- What is the average close range associated with that group,
- What is the sentiment associated with that group.
How to use the indicator?
In terms of use, the indicator is relatively simple to use. It will plot three lines, a red for the anticipated low range, a green for the anticipated high range and purple for the opening range (where the current candle opened at).
In addition, it will plot a dot for the anticipated close area. When the dot is green, it expects a bullish close. When the dot is red, it expects a bearish close.
The indicator is going to give you a heads up as to whether we are in a bullish group, what you can anticipate the high and low range to be and where you can anticipate the close.
Of course, its not always exact, as in the image above you can see it underestimated the high range and over-estimated the low range; however, we did close within the anticipate range.
The indicator is meant to help you with your bias. I will reference this indicator on the daily timeframe at open to see what the expectations are for the day.
However, you can use it on any timeframe you wish.
Other functions:
The indicator can plot the EMA 9, 21 and 5. These are the 3 indicators I like and I find them helpful for both intraday and swing trading. However, they can be toggled off if you do not wish to view them.
In addition, the EMAs will be green if the ticker is trending above the EMA 21 (which is a critical EMA for me to determine the immediate sentiment). If the ticker is below, they will turn red.
There is also the ability to adjust the train time. The default is 1,000 candles back, but I usually have it on 1500. If you have a lot of indicators and a lot going on, on your chart, you may find that 1500 is too much and it will lag/error. That’s okay, 500 candles is sufficient and will not put a lot of stress on Pinescript.
Concluding remarks
Its overall a fairly simple concept and indicator, but it has been a neat and helpful / insightful invention. I originally developed this using R and happy to have now brought it into Pinescript.
I hope you enjoy!
Safe trades everyone!
Frequency and Volume ProfileFREQUENCY & VOLUME PROFILE
⚪ OVERVIEW
The Frequency and Volume Profile indicator plots a frequency or volume profile based on the visible bars on the chart, providing insights into price levels with significant trading activity.
⚪ USAGE
● Market Structure Analysis:
Identify key price levels where significant trading activity occurred, which can act as support and resistance zones.
● Volume Analysis:
Use the volume mode to understand where the highest trading volumes have occurred, helping to confirm strong price levels.
● Trend Confirmation:
Analyze the distribution of trading activity to confirm or refute trends, mark important levels as support and resistance, aiding in making more informed trading decisions.
● Frequency Distribution:
In statistics, a frequency distribution is a list of the values that a variable takes in a sample. It is usually a list. Displayed as a histogram.
⚪ SETTINGS
Source: Select the price data to use for the profile calculation (default: hl2).
Move Profile: Set the number of bars to offset the profile from the current bar (default: 100).
Mode: Choose between "Frequency" and "Volume" for the profile calculation.
Profile Color: Customize the color of the profile lines.
Lookback Period: Uses 5000 bars for daily and higher timeframes, otherwise 10000 bars.
The Frequency Profile indicator is a powerful tool for visualizing price levels with significant trading activity, whether in terms of frequency or volume. Its dynamic calculation and customizable settings make it a versatile addition to any trading strategy.
Multi Asset Histogram [ChartPrime]Multi Asset Histogram Indicator
Overview:
The "Multi Asset Histogram" indicator provides a comprehensive visualization of the performance of multiple assets relative to each other. By calculating a score for each asset and displaying it in a histogram format, this indicator helps traders quickly identify the trends, dominant asset and the average performance of the assets in the selected group.
Key Features:
◆ Multi-Asset Score Calculation:
The indicator calculates a trend score for each selected asset based on the price source (e.g., hl2).
The trend score is determined by comparing the current price to the prices over the past bars back defined by user, adding or subtracting points based on whether the current price is higher or lower than previous prices.
// Score Function
trscore(src) =>
total = 0.0
for i = 1 to 50
total += (src >= nz(src ) ? 1 : -1)
total
◆ Flexible Symbol Input:
Traders can input up to 10 different symbols (e.g., BTCUSD, ETHUSD, etc.) to be included in the histogram analysis.
◆ Dynamic Visualization:
A histogram is plotted for each asset, with bars colored based on the score, providing a clear visual representation of the relative performance.
Color gradients from red to aqua indicate the performance, with red representing negative scores and aqua representing positive scores.
◆ Adaptive Histogram Lines:
The width and placement of histogram lines adapt based on the calculated scores, ensuring clear visualization regardless of the values.
Dashed lines represent the mean score of all assets, helping traders identify the overall market trend.
◆Detailed Labels and Values:
Labels are placed on the histogram to display the exact score for each asset.
Mean value and zero line labels provide additional context for the overall performance.
◆ Visual Scaling Lines:
Zero line and mean line are clearly marked, helping traders understand the distribution and scale of scores.
Scales on the left and right of the histogram indicate the performance range.
◆ Informative Table:
A table is displayed on the chart, showing the dominant asset (the one with the highest score) and the mean score of all assets.
The table updates dynamically to reflect real-time changes in asset performance.
◆ Settings:
Length: The value of number bars back is greater or less than the current value of the source
Source: The price source to be used for score calculation (e.g., hl2).
Symbols: Up to 10 different asset symbols can be input for analysis.
Usage Notes:
This indicator is useful for traders who monitor multiple assets simultaneously and need a quick visual reference to identify the strongest and weakest performers.
The color coding and dynamic labels make it easy to interpret the relative performance and make informed trading decisions.
This indicator is designed to enhance multi-asset analysis by providing a clear, visual representation of each asset's performance relative to the others, making it easier to identify trends and dominant assets in the market.
Asset Drawdown & Drawdown HeatMap [InvestorUnknown]Overview
The "Asset Drawdown & Drawdown HeatMap" indicator is designed for educational purposes to help users visualize and analyze the drawdowns of various assets. It highlights both recent and historical drawdowns, offering valuable insights into the performance and risk of different investments. Additionally, it can serve as a complementary analysis tool for trading and investing decisions.
Features
Drawdown Calculation:
Computes the drawdown from the highest value (ATH) to the current value, showing the percentage decline.
Displays both the current drawdown and the maximum historical drawdown for the selected assets.
HeatMap Visualization:
Uses a gradient color scheme to represent the magnitude of drawdowns over a specified lookback period.
Helps identify periods of significant decline and recovery visually.
Multiple Assets:
Supports up to 10 different assets (adding more would make it harder to see the drawdowns of different assets), allowing users to compare drawdowns across various symbols.
Each asset can be individually plotted and color-coded for clarity.
Customizable Settings:
User inputs for high and low value calculations, color preferences, and lookback periods.
Option to color bars based on the drawdown heatmap.
Detailed Functionality
Drawdown Calculation:
The DD() function calculates the current drawdown and the maximum historical drawdown based on the high and low values.
The drawdown is calculated as 100 - (lowvalue / ATH * 100), where ATH is the highest value observed so far.
// - - - - - Custom Function - - - - - //{
DD() =>
ATH = highvalue
ATH := na(ATH ) ? highvalue : math.max(highvalue, ATH )
Drawdown = 100 - lowvalue / ATH * 100
MaxDrawdown = Drawdown
MaxDrawdown := na(MaxDrawdown ) ? Drawdown : math.max(Drawdown, MaxDrawdown )
//}
Security Request:
Uses the request.security() function to fetch drawdown data for each specified asset on a daily timeframe.
Computes both current drawdown (TnDD) and maximum drawdown (TnMDD) for each asset.
// - - - - - Create Variables - - - - - //{
= request.security("", "1D", DD()) // Chart
= request.security(t1, "1D", DD())
= request.security(t2, "1D", DD())
= request.security(t3, "1D", DD())
= request.security(t4, "1D", DD())
= request.security(t5, "1D", DD())
= request.security(t6, "1D", DD())
= request.security(t7, "1D", DD())
= request.security(t8, "1D", DD())
= request.security(t9, "1D", DD())
= request.security(t10, "1D", DD())
//}
Plotting:
Plots the drawdown values for each asset on the chart, with the option to enable or disable plotting for individual assets.
Colors the plotted lines and labels based on user-specified preferences.
HeatMap:
Creates a heatmap color gradient based on the drawdown values over the lookback period.
Colors the bars on the chart according to the heatmap to visualize drawdown severity over time.
// - - - - - HeatMap - - - - - //{
heatcol = color.from_gradient(T0DD, ta.lowest(T0DD,lookback), ta.highest(T0DD,lookback), topcol, botcol)
barcolor(colbars ? heatcol : na)
//}
Labels:
Displays labels for each asset's drawdown value at the end of the chart for quick reference.
This indicator is an excellent tool for educational purposes, helping users understand drawdown dynamics and their implications on asset performance. It also provides a visual aid for monitoring and comparing drawdowns across multiple assets, which can be beneficial for making informed trading and investment decisions.
Moving Average Cross Probability [AlgoAlpha]Moving Average Cross Probability 📈✨
The Moving Average Cross Probability by AlgoAlpha calculates the probability of a cross-over or cross-under between the fast and slow values of a user defined Moving Average type before it happens, allowing users to benefit by front running the market.
✨ Key Features:
📊 Probability Histogram: Displays the Probability of MA cross in the form of a histogram.
🔄 Data Table: Displays forecast information for quick analysis.
🎨 Customizable MAs: Choose from various moving averages and customize their length.
🚀 How to Use:
🛠 Add Indicator: Add the indicator to favorites, and customize the settings to suite your trading style.
📊 Analyze Market: Watch the indicator to look for trend shifts early or for trend continuations.
🔔 Set Alerts: Get notified of bullish/bearish points.
✨ How It Works:
The Moving Average Cross Probability Indicator by AlgoAlpha determines the probability by looking at a probable range of values that the price can take in the next bar and finds out what percentage of those possibilities result in the user defined moving average crossing each other. This is done by first using the HMA to predict what the next price value will be, a standard deviation based range is then calculated. The range is divided by the user defined resolution and is split into multiple levels, each of these levels represent a possible value for price in the next bar. These possible predicted values are used to calculate the possible MA values for both the fast and slow MAs that may occur in the next bar and are then compared to see how many of those possible MA results end up crossing each other.
Stay ahead of the market with the Moving Average Cross Probability Indicator AlgoAlpha! 📈💡
Exponential Grid [Phi, Pi, Euler]If you disagree with one of the EMH principles that price is too random, then by definition you must agree that historic price has deterministic function to a scenario ahead.
I personally believe that constants like phi, pi and e can mimic exponential growth of the price.
In this script, first grid is based on the Lowest price multiplied with self fraction of the constant.
For example:
If you are familiar with fib ratio 1.272, then you must know that it is 1.618 to the power of 0.5.
With default settings of exponent step 0.25
First grid = Lowest price x phi^0.25
Second grid = Lowest price x phi^0.25x2
Third grid = Lowest price x phi^0.25x3 and so on
The script will automatically find the lowest price and update the grid values.
Or you can set up your custom Lowest price manually if you feel like the All Time Low level loses its relevance value after long period.
There are 64 grids including Lowest price level. And it wasn't by a chance. Pine Script has a limitation of max 64 plots. Number of grids shown in the chart depends on the highest price. Once price breaks above ATH a couple of next grids will be plotted automatically. In most cases if everything is plotted, the chart appears squeezed and you'll need to zoom in to see it. Therefore, I adjusted it relatively to the scale of the chart for the comfort.
In some cases 64 plots aren't enough to cover the whole chart. For example, let's take a look at NVIDIA chart:
Since the price has started with 0.0333, it is way too small to cover all with default settings.
We are left with 2 choices:
Either Enable "Round"
OR increase Exponent Step (from 0.25 to 0.5 in the particular example below)
If you set constant to pi or e which is a bigger number than phi, expect the gaps to be bigger. To reduce it to a more gradual way of expansion you can decrease Exponent Step.
Volume, Volatility, and Momentum Metrics IndicatorVolume, Volatility, and Momentum Metrics Indicator
Welcome to our comprehensive TradingView indicator designed to provide traders with essential volume, volatility, and momentum metrics. This powerful tool is ideal for traders looking to enhance their market analysis by visualizing key indicators in a concise and easy-to-read format.
Key Features
1. Volume Metrics:
• Daily Dollar Volume: Understand the monetary value of the traded volume each day.
• Relative Volume (RVOL) Day: Compare the current volume to the previous day’s volume to gauge trading activity.
• Relative Volume (RVOL) 30D: Assess the average trading volume over the past 30 days.
• Relative Volume (RVOL) 90D: Evaluate the average trading volume over the past 90 days.
2. Volatility and Momentum Metrics:
• Average Daily Range (ADR) %: Measure the average daily price range as a percentage of the current price.
• Average True Range (ATR): Track the volatility by calculating the average true range over a specified period.
• Relative Strength Index (RSI): Determine the momentum by analyzing the speed and change of price movements.
3. Customizable Table Positions:
• Place the volume metrics table and the volatility/momentum metrics table in the bottom-left or bottom-right corners of your chart for optimal visibility and convenience.
Why Use This Indicator?
• Enhanced Market Analysis: Quickly assess volume trends, volatility, and momentum to make informed trading decisions.
• User-Friendly Interface: The clear and concise tables provide at-a-glance information without cluttering your chart.
• Customization Options: Choose where to display the tables to suit your trading style and preferences.
How It Works
This indicator uses advanced calculations to provide real-time data on trading volume, price range, and momentum. By displaying this information in separate, neatly organized tables, traders can easily monitor these critical metrics without diverting their focus from the main chart.
Who Can Benefit?
• Day Traders: Quickly gauge intraday trading activity and volatility.
• Swing Traders: Analyze longer-term volume trends and momentum to identify potential trade setups.
• Technical Analysts: Utilize comprehensive metrics to enhance technical analysis and trading strategies.
Get Started
To add this powerful indicator to your TradingView chart, simply search for “Volume, Volatility, and Momentum Metrics” in the TradingView public library, or use the provided link to add it directly to your chart. Enhance your trading analysis and make more informed decisions with our comprehensive TradingView indicator.
Price & Moving Average + Financial IndicatorThis indicator displays:
Moving Average that can be set into SMA or EMA: Default setting is SMA 50
Label price for today's MA
Basic Financial Data:
Type of Sector
Type of Industry
P/E Ratio
Price to Book Ratio
ROE
Revenue (FQ)
Earnings (FQ)
Once again, I let the script open for you guys to custom it based on your own preferences. Hope you guys enjoy it!
Bitcoin Fundamentals - Bitcoin Block RewardThe Bitcoin Block Reward is the batch of new Bitcoins generated by the miners after solving each block.
The Block Reward is set as a basic rule and cannot be changed without agreement between the entire Bitcoin network. It started at 50 BTC during the first period. Afterwards the Block Reward gets adjusted to half of it value (Halving Event) on each cycle of 210000 blocks mined.
This is the only way that new bitcoins are created. It creates an incentive for miners to secure the network.
Over time the Block Reward will decreases to a value that might not cover the mining costs. At that point, the use of the Bitcoin Network might have increased sufficiently as to generate enough transaction fees to cover the mining costs.
MOTIVATION
Even though this is a very simple indicator, I'm currently missing a data source to compute the Block Reward value within Tradingview. Therefore, I created this indicator and its associated library function to enable its visualization and (eventually) for coders to make use of the source function to power more elaborate scripts related to the Halving Events.
Hope that helps!
Bearish vs Bullish ArgumentsThe Bearish vs Bullish Arguments Indicator is a tool designed to help traders visually assess and compare the number of bullish and bearish arguments based on their custom inputs. This script enables users to input up to five bullish and five bearish arguments, dynamically displaying the bias on a clean and customizable table on the chart. This provides traders with a clear, visual representation of the market sentiment they have identified.
Key Features:
Customizable Inputs: Users can input up to five bullish and five bearish arguments, which are displayed in a table on the chart.
Bias Calculation: The script calculates the bias (Bullish, Bearish, or Neutral) based on the number of bullish and bearish arguments provided.
Color Customization: Users can customize the colors for the table background, text, and headers, ensuring the table fits seamlessly into their charting environment.
Reset Functionality: A reset switch allows users to clear all input arguments with a single click, making it easy to start fresh.
How It Works:
Input Fields: The script provides input fields for up to five bullish and five bearish arguments. Each input is a simple text field where users can describe their arguments.
Bias Calculation: The script counts the number of non-empty bullish and bearish arguments and determines the overall bias. The bias is displayed in the table with a dynamically changing color to indicate whether the market sentiment is bullish, bearish, or neutral.
Customizable Table: The table is positioned on the chart according to the user's preference (top-left, top-right, bottom-left, bottom-right) and can be customized in terms of background color and text color.
How to Use:
Add the Indicator: Add the Bearish vs Bullish Arguments Indicator to your chart.
Input Arguments: Enter up to five bullish and five bearish arguments in the provided input fields in the script settings.
Customize Appearance: Adjust the table's background color, text color, and position on the chart to fit your preferences.
Example Use Case:
A trader might use this indicator to visually balance their arguments for and against a particular trade setup. By entering their reasons for a bullish outlook in the bullish argument fields and their reasons for a bearish outlook in the bearish argument fields, they can quickly see which side has more supporting points and make a more informed trading decision.
This script was inspired by Arjoio's concepts
Depth of Market (DOM) [LuxAlgo]The Depth Of Market (DOM) tool allows traders to look under the hood of any market, taking price and volume analysis to the next level. The following features are included: DOM, Time & Sales, Volume Profile, Depth of Market, Imbalances, Buying Pressure, and up to 24 key intraday levels (it really packs a punch).
As a disclaimer, this tool does not use tick data, it is a DOM reconstruction from the provided real-time time series data (price and volume). So the volume you see is from filled orders only, this tool does not show unfilled limit orders.
Traders can enable or disable any of the features at will to avoid being overwhelmed with too much information and to make the tool perform faster.
The features that have the biggest impact on performance are Historical Data Collection, Key Levels (POC & VWAP), Time & Sales, Profile, and Imbalances. Disable these features to improve the indicator computational performance.
🔶 DOM
This is the simplest form of the tool, a simple DOM or ladder that displays the following columns:
PRICE: Price level
BID: Total number of market sell orders filled or limit buy orders filled.
SELL: Sell market orders
BUY: Buy market orders
ASK: Total number of market buy orders filled or limit sell orders filled.
The DOM only collects historical data from the last 24 hours and real-time data.
Traders can select a reset period for the DOM with two options:
DAILY: Resets at the beginning of each trading day
SESSIONS: Resets twice, as DAILY and 15.5 hours later, to coincide with the start of the RTH session for US tickers.
The DOM has two main modes, it can display price levels as ticks or points. The default is automatic based on the current daily volatility, but traders can manually force one mode or the other if they wish.
For convenience, traders have the option to set the number of lines (price levels), and the size of the text and to display only real-time data.
By default, the top price is set to 0 so that the DOM automatically adjusts the price levels to be displayed, but traders can set the top price manually so that the tool displays only the desired price levels in a fixed manner.
🔹 Volume Profile
As additional features to the basic DOM, traders have access to the volume profile histogram and the total volume per price level.
This helps traders identify at a glance key price areas where volume is accumulating (high volume nodes) or areas where volume is lacking (low volume nodes) - these areas are important to some traders who base their decision-making process on them.
🔹 Imbalances
Other added features are imbalances and buying pressure:
Interlevel Imbalance: volume delta between two different price levels
Intralevel Imbalance: delta between buy and sell volume at the same price level
Buying Pressure Percent: percentage of buy volume compared to total volume
Imbalances can help traders identify areas of interest in the price for possible support or resistance.
🔹 Depth
Depth allows traders to see at a glance how much supply is above the current price level or how much demand is below the current price level.
Above the current price level shows the cumulative ask volume (filled sell limit orders) and below the current price level shows the cumulative bid volume (filled buy limit orders).
🔶 KEY LEVELS
The tool includes up to 24 different key intraday levels of particular relevance:
Previous Week Levels
PWH: Previous week high
PWL: Previous week low
PWM: Previous week middle
PWS: Previous week settlement (close)
Previous Day Levels
PDH: Previous day high
PDL: Previous day low
PDM: Previous day middle
PDS: Previous day settlement (close)
Current Day Levels
OPEN: Open of day (or session)
HOD: High of day (or session)
LOD: Low of day (or session)
MOD: Middle of day (or session)
Opening Range
ORH: Open range high
ORL: Open range low
Initial Balance
IBH: Initial balance high
IBL: Initial balance low
VWAP
+3SD: Volume weighted average price plus 3 standard deviations
+2SD: Volume weighted average price plus 2 standard deviations
+1SD: Volume weighted average price plus 1 standard deviation
VWAP: Volume weighted average price
-1SD: Volume weighted average price minus 1 standard deviation
-2SD: Volume weighted average price minus 2 standard deviations
-3SD: Volume weighted average price minus 3 standard deviations
POC: Point of control
Different traders look at different levels, the key levels shown here are objective and specific areas of interest that traders can act on, providing us with potential areas of support or resistance in the price.
🔶 TIME & SALES
The tool also features a full-time and sales panel with time, price, and size columns, a size filter, and the ability to set the timezone to display time in the trader's local time.
The information shown here is what feeds the DOM and it can be useful in several ways, for example in detecting absorption. If a large number of orders are coming into the market but the price is barely moving, this indicates that there is enough liquidity at these levels to absorb all these orders, so if these orders stop coming into the market, the price may turn around.
🔶 SETTINGS
Period: Select the anchoring period to start data collection, DAILY will anchor at the start of the trading day, and SESSIONS will start as DAILY and 15.5 hours later (RTH for US tickers).
Mode: Select between AUTO and MANUAL modes for displaying TICKS or POINTS, in AUTO mode the tool will automatically select TICKS for tickers with a daily average volatility below 5000 ticks and POINTS for the rest of the tickers.
Rows: Select the number of price levels to display
Text Size: Select the text size
🔹 DOM
DOM: Enable/Disable DOM display
Realtime only: Enable/Disable real-time data only, historical data will be collected if disabled
Top Price: Specify the price to be displayed on the top row, set to 0 to enable dynamic DOM
Max updates: Specify how many times the values on the SELL and BUY columns are accumulated until reset.
Profile/Depth size: Maximum size of the histograms on the PROFILE and DEPTH columns.
Profile: Enable/Disable Profile column. High impact on performance.
Volume: Enable/Disable Volume column. Total volume traded at price level.
Interlevel Imbalance: Enable/Disable Interlevel Imbalance column. Total volume delta between the current price level and the price level above. High impact on performance.
Depth: Enable/Disable Depth, showing the cumulative supply above the current price and the cumulative demand below. Impact on performance.
Intralevel Imbalance: Enable/Disable Intralevel Imbalance column. Delta between total buy volume and total sell volume. High impact on performance.
Buying Pressure Percent: Enable/Disable Buy Percent column. Percentage of total buy volume compared to total volume.
Imbalance Threshold %: Threshold for highlighting imbalances. Set to 90 to highlight the top 10% of interlevel imbalances and the top and bottom 10% of intra-level imbalances.
Crypto volume precision: Specify the number of decimals to display on the volume of crypto assets
🔹 Key Levels
Key Levels: Enable/Disable KEY column. Very high performance impact.
Previous Week: Enable/Disable High, Low, Middle, and Close of the previous trading week.
Previous Day: Enable/Disable High, Low, Middle, and Settlement of the previous trading day.
Current Day/Session: Enable/Disable Open, High, Low and Middle of the current period.
Open Range: Enable/Disable High and Low of the first candle of the period.
Initial Balance: Enable/Disable High and Low of the first hour of the period.
VWAP: Enable/Disable Volume-weighted average price of the period with 1, 2, and 3 standard deviations.
POC: Enable/Disable Point of Control (price level with the highest volume traded) of the period.
🔹 Time & Sales
Time & Sales: Enable/Disable time and sales panel.
Timezone offset (hours): Enter your time zone\'s offset (+ or −), including a decimal fraction if needed.
Order Size: Set order size filter. Orders smaller than the value are not displayed.
🔶 THANKS
Hi, I'm makit0 coder of this tool and proud member of the LuxAlgo Opensource team, it's an honor to be part of the LuxAlgo family doing something I love as it's writing opensource code and sharing it with the world. I'd like to thank all of you who use, comment on, and vote for all of our open-source tools, and all of you who give us your support.
And of course thanks to the PineCoders family for all the work in front of and behind the scenes that makes the PineScript community what it is, simply the best.
Peace, Love & PineScript!
PFCF Price BandPFCF Price Band shows price calculated using the previous period's high and low P/TTM FCFPS (TTM's price to free cash flow per share over the last 12 months) multiplied by TTM's current FCFPS ( Similar to price theory = P/E x expected earnings per share)
If the current P/FCFPS is lower than the minimum P/FCFPS, it is considered cheap. In other words, above the maximum P/FCFPS is considered expensive.
PFCF Price Band consists of 2 parts.
- Firstly, the historical P/FCFPS value in "Green" (if TTM FCFPS is positive) or "Red" (if TTM FCFPS is negative) status changes based on the latest high or low price of TTM FCFPS.
- Second, the blue line is the closing price divided by TTM FCFPS, which shows the current P/FCF.
P.S. It is recommended to use it together with the PE Band indicator because just net profit does not mean that a company has good cash flow.
ΔYoY(Economics)Year over year indicator which will benchmark the most recent data vs 1 year lookback; Will automate the lookback for quarterly and monthly data based on timeframe selected (3M for quarterly, 1M for monthly). Tradingview will aggregate weekly data into a monthly data point. SMA applied to get the average over some x period.
Ln(close)Natural log indicator for normalizing data. SMA applied so you can take the average of that normalization factor. Personally use it for US economic data where the value is very large (GDI, Fed Balance Sheet, USM2 etc.) and the year over year delta is not pertinent (USM2) or not available (GDI.. although I did make an indicator to get YoY :D). Any additional ideas leave a comment and I'll take a look.