OI Visible Range Ladder [Kioseff Trading]Hello!
This Script “OI Visible Range Ladder” calculates open interest profiles for the visible range alongside an OI ladder for the visible period!
Features
OI Profile Anchored to Visible Range
OI Ladder Anchored to Visible Range
Standard POC and Value Area Lines, in Addition to Separated POCs and Value Area Lines for each category of OI x Price
Configurable Value Area Targets
Curved Profiles
Up to 9999 Profile Rows per Visible Range
Stylistic Options for Profiles
Up to 9999 volume profile levels (Price levels) can be calculated for each profile, thanks to the new polyline feature, allowing for less aggregation / more precision of open interest at price.
The image above shows primary functionality!
Green profiles = Up OI / Up Price
Yellow profiles = Down OI / Up Price
Purple profiles = Up OI / Down Price
Red profiles = Down OI / Down Price
The image above shows POCs for each OI x Price category!
Profiles can be anchored on the left side for a more traditional look.
The indicator is robust enough to calculate on “small price periods”, or for a price period spanning your entire chart fully zoomed out!
That’s about it :D
This indicator is Part of a series titled “Bull vs. Bear” - a suite of profile-like indicators.
Thanks for checking this out!
If you have any suggestions please feel free to share!
Statistics
Global Leaders M2Introducing the Global Leaders M2 Indicator
The Global Leaders M2 indicator is a comprehensive tool designed to provide you with crucial insights into the money supply (M2) of the world's top 10 economic powerhouses. This powerful indicator offers a wealth of information to help you make informed decisions in the financial markets.
Key Features:
Multi-Country M2 Data: Access M2 data for the world's top 10 economic leaders, including China, the United States, Japan, Germany, the United Kingdom, France, Italy, Canada, Russia, and India.
Rate of Change Analysis: Understand the rate of change in M2 data for each country and the overall global aggregate, allowing you to gauge the momentum of monetary supply.
Customizable Display: Tailor your chart to display the data of specific countries, or focus on the total global M2 value based on your preferences.
Currency Selection: Choose your preferred currency for displaying the M2 data, making it easier to work with data in your currency of choice.
Interactive Overview Table: Get an overview of M2 data for each country and the global total in an interactive table, complete with color-coded indicators to help you quickly spot trends.
Precision and Clarity: The indicator provides precision to two decimal places and uses color coding to differentiate between positive and negative rate of change.
Whether you're a seasoned investor or a newcomer to the world of finance, the Global Leaders M2 indicator equips you with valuable data and insights to guide your financial decisions. Stay on top of global monetary supply trends, and trade with confidence using this user-friendly and informative tool.
Gap Statistics (Zeiierman)█ Overview
The Gap Statistics (Zeiierman) indicator is crafted to monitor, analyze, and visually present price gaps on a trading chart. Price gaps are areas on a chart where the price jumps up or down from the previous close to the next open, creating a "gap" in the normal price pattern. This script delivers an extensive range of statistics related to these gaps, encompassing their size, direction (whether bullish or bearish), frequency of getting filled, as well as the average number of bars it takes for a gap to be filled. The indicator also visually represents the gaps, making it easier for traders to spot and analyze them.
█ How It Works
Gap Identification: The script identifies gaps by comparing the open price of a bar to the close price of the previous bar. If there is a discrepancy between the two, it is recognized as a gap.
Gap Classification: Once a gap is identified, it is classified based on its size (as a percentage of the previous close price) and direction (bullish or bearish). The gap is then added to a specific category based on its size.
Gap Tracking: The script keeps track of all identified gaps using arrays and user-defined types, storing details like their size, direction, and whether they have been filled.
Gap Filling: The script continuously monitors the price to check if any previously identified gaps get filled. A gap is considered filled if the price moves back into the gap area.
Statistics and Alerts: The script calculates various statistics like the total number of gaps, the number of filled gaps, the average number of bars it takes for a gap to fill, and the percentage of gaps that get filled. It also generates alerts when a new gap is identified or an existing gap gets filled.
█ How to Use
Gaps are often classified into four main types:
Common Gaps: These are not associated with any major news and are likely to get filled quickly.
Breakaway Gaps: These occur at the end of a price pattern and signal the beginning of a new trend.
Runaway Gaps: Also known as continuation gaps, these occur in the middle of a trend and signal a surge in interest in the stock.
Exhaustion Gaps: These occur near the end of a price pattern and signal a final attempt to hit new highs or lows.
The Gap Statistics (Zeiierman) indicator enhances a trader's ability to use gaps in their trading strategy in several ways:
Statistical Analysis: Traders get comprehensive statistics on gaps, such as their size, direction, and how often they get filled.
Performance Tracking: The indicator tracks how many bars it typically takes for a gap to fill, providing traders with an average timeframe for gap closure.
█ Settings
Display Gaps: Choose to display "All Gaps," "Active Gaps," or "None."
Show Gap Size: Toggle on/off the display of the gap size.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
RSI Heatmap Screener [ChartPrime]The RSI Heatmap Screener is a versatile trading indicator designed to provide traders and investors with a deep understanding of their selected assets' market dynamics. It offers several key features to facilitate informed decision-making:
█ Custom Asset Selection:
The user can choose up to 30 assets that you want to analyze, allowing for a tailored experience.
█ Adjustable RSI Length:
Customize your analysis by adjusting the RSI length to align with your trading strategy.
█ RSI Heatmap:
The heatmap feature uses various colors to represent RSI values:
█ Color coding for labels:
Grey: Signifies a neutral RSI, indicating a balanced market.
Yellow: Suggests overbought conditions, advising caution.
Pale Red: Indicates mild overbought conditions in a strong area.
Bright Red: Represents strong overbought conditions, hinting at a potential downturn.
Pale Green: Signals mild oversold conditions with signs of recovery.
Dark Green: Denotes full oversold conditions, with potential for a bounce.
Purple: Highlights extremely oversold conditions, pointing to an opportunity for a relief bounce.
█ Levels:
Central Plot and Zones: The central plot displays the average RSI of the selected assets, offering an overview of market sentiment. Overbought and oversold zones in red and green provide clear reference points.
█ Hover Labels:
Hover over an asset to access details on various indicators like VWAP, Stochastic, SMA, TradingView ranking, and Volume Rating. Bullish and bearish indicators are marked with ticks and crosses, and a fire emoji denotes heavily overextended assets.
█ TradingView Ranking:
Utilize the TradingView ranking metric to assess an asset's performance and popularity.
Thank you to @tradingview for this ranking metric.
█ Volume Rating:
Gain insights into trading volumes for more informed decision-making.
█ Oscillator at the Bottom:
The RSI average for the entire market, presented in a normalized format, offers a broader market perspective. Green indicates a favorable buying area, while red suggests market overextension and potential short or sell opportunities.
█ Heatmap Visualization:
Historical RSI values for each selected asset are displayed. Red indicates overbought conditions, while green signals oversold conditions, helping you spot trends and potential turning points.
This screener is designed to make entering the market simpler and more comprehensive for all traders and investors.
Intraday Volume Rating [Honestcowboy]The Intraday Volume Rating aims to provide a clearer picture of what volume is telling you on intraday charts.
What is different to other forms of volume analysis
While Volume averages and other measures of volume base their calculations on the previous bars on the chart (for example bars 1954 to 1968). The average volume in this indicator measures expected volume during that time of the day.
🔷 Why would you take this approach?
Markets behave different during certain times of the day, also called sessions.
Here are a couple examples.
Asian Session (generally low volatility)
London Session (bigger volatility starts)
New York Session (overlap of New York with London creates huge volatility)
Generally when using other types of volume averaging it does not take into account these sessions and that the market has a pattern for volume in an intraday chart.
🔷 CALCULATION
Think of this script like an average of volume but instead it uses past days data instead of previous bars data.
This is a chart explaining the indicator this script is based on The same principle applies but instead we measure volume at each bar of the day.
The script also counts the number of bars that exist in a day on your current timeframe chart. After knowing that number it creates the matrix used in it's calculations and data storage.
See how it works perfectly on a lower timeframe chart below:
Getting this right was the hardest part, check the coding if you are interested in this type of stuff. I commented every step in the coding process.
Every setting of the script is commented so no need for further explanation, enjoy!
Frequency Distribution Overlay [SS]Hello all,
This is the frequency distribution indicator. It does as the name suggests,
It breaks down the frequency distribution of any stock over a user defined lookback period and shows where the accumulations rest by percantage.
This is a function that I used to have to export to Excel or SPSS to do, but now its possible in Pinescript!
Essentially, it breaks down the areas a stock has closed in over a defined period and gives you the accumulation for each area.
What it is used for:
It is used to see where the higher areas of price accumulation rest. This helps us to identify potentially likely retracement areas and pullback areas.
It colour coordinates based on distribution and lists the composition of each zone in a label in each box.
The zones are divided by standard deviation, which means that the top and bottom of each range act as substantial areas of support/resistance (as it falls outside the normal variance of a stock).
Customizability:
The indicator is pretty straight forward, you select your desired lookback period and it will adjust accordingly.
Additionally, you can adjust for close, high, low, etc. if you want to see the accumulation and distribution of hights vs, lows vs closes.
You can toggle off the text labels if you don't want them.
The green boxes represent the areas of highest accumulation, the red box the areas of lower accumulation.
You can use it on any timeframe you wish. Above is an example of the daily, but you can also use it on the smaller TFs as well:
TSLA on the 5 minute:
And that is the indicator!
Let me know if you have questions or suggestions.
Safe trades everyone!
Old Tradability by Kiersten & HajiIntroduction:
The "Old Tradability" is a meticulously crafted indicator designed exclusively for TradingView users. It brings together the power of various well-respected indicators, offering traders a comprehensive tool to gauge market conditions and make informed decisions. Whether you're a novice trader looking for a reliable indicator or a seasoned professional seeking to add another layer to your analytical toolbox, Old Tradability is tailored to provide actionable insights.
Core Features:
Dual Level Analysis:
Long-Term Trend Analysis: At its core, Old Tradability emphasizes the identification of prevailing long-term market trends. To achieve this, it leverages the capabilities of some of the most recognized indicators in the trading world, such as:
MACD (Moving Average Convergence Divergence): Known for its reliability in spotting trend changes and momentum.
MFI (Money Flow Index): A valuable tool to evaluate the flow of money into and out of an asset, often used to predict overbought or oversold conditions.
Heikin Ashi: A unique form of candlestick charting that filters market noise, helping traders understand the market sentiment and trend direction more clearly.
Short-Term Analysis Using MinMax Normalization: The indicator doesn't stop at just identifying the long-term trend. Recognizing the importance of short-term price movements, Old Tradability applies MinMax Normalization on shorter time frames. This technique adjusts the scale of data, making it easier to spot potential reversals or continuation patterns.
Strategic Trading Recommendations:
The principle is simple yet effective. When the long-term trend is bullish and the short-term analysis places the asset in the bottom 20%, it presents a potential buying opportunity. Conversely, if the long-term trend is bearish and the short-term places the asset in the top 20%, traders might consider it as a selling signal.
Integrated Risk Management Alerts:
One of the standout features of Old Tradability is its built-in risk management system. This feature ensures that traders are not only informed about potential trade setups but also about the inherent risks associated.
The system sends out timely alerts for what it deems as "perfect setups," allowing traders to act swiftly and decisively. This minimizes the chance of missing out on lucrative trades while also providing an extra layer of security by notifying users about unfavorable conditions.
Conclusion:
The Old Tradability Indicator is more than just a tool; it's a comprehensive trading companion. Its dual-level analysis ensures that traders have a holistic view of the market, while its integrated risk management alerts keep them one step ahead. If you're looking for a dependable, detailed, and actionable indicator on TradingView, Old Tradability might just be the perfect addition to your trading strategy. Happy trading!
Supertrend Multiasset Correlation - vanAmsen Hello traders!
I am elated to introduce the "Supertrend Multiasset Correlation" , a groundbreaking fusion of the trusted Supertrend with multi-asset correlation insights. This approach offers traders a nuanced, multi-layered perspective of the market.
The Underlying Concept:
Ever pondered over the term Multiasset Correlation?
In the intricate tapestry of financial markets, assets do not operate in silos. Their movements are frequently intertwined, sometimes palpably so, and at other times more covertly. Understanding these correlations can unlock deeper insights into overarching market narratives and directional trends.
By melding the Supertrend with multi-asset correlations, we craft a holistic narrative. This allows traders to fathom not merely the trend of a lone asset but to appreciate its dynamics within a broader market tableau.
Strategy Insights:
At the core of this indicator is its strategic approach. For every asset, a signal is generated based on the Supertrend parameters you've configured. Subsequently, the correlation of daily price changes is assessed. The ultimate signal on the selected asset emerges from the average of the squared correlations, factoring in their direction. This indicator not only accounts for the asset under scrutiny (hence a correlation of 1) but also integrates 12 additional assets. By default, these span U.S. growth ETFs, value ETFs, sector ETFs, bonds, and gold.
Indicator Highlights:
The "Supertrend Multiasset Correlation" isn't your run-of-the-mill Supertrend adaptation. It's a bespoke concoction, tailored to arm traders with an all-encompassing view of market intricacies, fortified with robust correlation metrics.
Key Features:
- Supertrend Line : A crystal-clear visual depiction of the prevailing market trajectory.
- Multiasset Correlation : Delve into the intricate interplay of various assets and their correlation with your primary instrument.
- Interactive Correlation Table : Nestled at the top right, this table offers a succinct overview of correlation metrics.
- Predictive Insights : Leveraging correlations to proffer predictive pointers, adding another layer of conviction to your trades.
Usage Nuances:
- The bullish Supertrend line radiates in a rejuvenating green hue, indicative of potential upward swings.
- On the flip side, the bearish trajectory stands out in a striking red, signaling possible downtrends.
- A rich suite of customization tools ensures that the chart resonates with your trading ethos.
Parting Words:
While the "Supertrend Multiasset Correlation" bestows traders with a rejuvenated perspective, it's paramount to embed it within a comprehensive trading blueprint. This would include blending it with other technical tools and adhering to stringent risk management practices. And remember, before plunging into live trades, always backtest to fine-tune your strategies.
Volume and Price Z-Score [Multi-Asset] - By LeviathanThis script offers in-depth Z-Score analytics on price and volume for 200 symbols. Utilizing visualizations such as scatter plots, histograms, and heatmaps, it enables traders to uncover potential trade opportunities, discern market dynamics, pinpoint outliers, delve into the relationship between price and volume, and much more.
A Z-Score is a statistical measurement indicating the number of standard deviations a data point deviates from the dataset's mean. Essentially, it provides insight into a value's relative position within a group of values (mean).
- A Z-Score of zero means the data point is exactly at the mean.
- A positive Z-Score indicates the data point is above the mean.
- A negative Z-Score indicates the data point is below the mean.
For instance, a Z-Score of 1 indicates that the data point is 1 standard deviation above the mean, while a Z-Score of -1 indicates that the data point is 1 standard deviation below the mean. In simple terms, the more extreme the Z-Score of a data point, the more “unusual” it is within a larger context.
If data is normally distributed, the following properties can be observed:
- About 68% of the data will lie within ±1 standard deviation (z-score between -1 and 1).
- About 95% will lie within ±2 standard deviations (z-score between -2 and 2).
- About 99.7% will lie within ±3 standard deviations (z-score between -3 and 3).
Datasets like price and volume (in this context) are most often not normally distributed. While the interpretation in terms of percentage of data lying within certain ranges of z-scores (like the ones mentioned above) won't hold, the z-score can still be a useful measure of how "unusual" a data point is relative to the mean.
The aim of this indicator is to offer a unique way of screening the market for trading opportunities by conveniently visualizing where current volume and price activity stands in relation to the average. It also offers features to observe the convergent/divergent relationships between asset’s price movement and volume, observe a single symbol’s activity compared to the wider market activity and much more.
Here is an overview of a few important settings.
Z-SCORE TYPE
◽️ Z-Score Type: Current Z-Score
Calculates the z-score by comparing current bar’s price and volume data to the mean (moving average with any custom length, default is 20 bars). This indicates how much the current bar’s price and volume data deviates from the average over the specified period. A positive z-score suggests that the current bar's price or volume is above the mean of the last 20 bars (or the custom length set by the user), while a negative z-score means it's below that mean.
Example: Consider an asset whose current price and volume both show deviations from their 20-bar averages. If the price's Z-Score is +1.5 and the volume's Z-Score is +2.0, it means the asset's price is 1.5 standard deviations above its average, and its trading volume is 2 standard deviations above its average. This might suggest a significant upward move with strong trading activity.
◽️ Z-Score Type: Average Z-Score
Calculates the custom-length average of symbol's z-score. Think of it as a smoothed version of the Current Z-Score. Instead of just looking at the z-score calculated on the latest bar, it considers the average behavior over the last few bars. By doing this, it helps reduce sudden jumps and gives a clearer, steadier view of the market.
Example: Instead of a single bar, imagine the average price and volume of an asset over the last 5 bars. If the price's 5-bar average Z-Score is +1.0 and the volume's is +1.5, it tells us that, over these recent bars, both the price and volume have been consistently above their longer-term averages, indicating sustained increase.
◽️ Z-Score Type: Relative Z-Score
Calculates a relative z-score by comparing symbol’s current bar z-score to the mean (average z-score of all symbols in the group). This is essentially a z-score of a z-score, and it helps in understanding how a particular symbol's activity stands out not just in its own historical context, but also in relation to the broader set of symbols being analyzed. In other words, while the primary z-score tells you how unusual a bar's activity is for that specific symbol, the relative z-score informs you how that "unusualness" ranks when compared to the entire group's deviations. This can be particularly useful in identifying symbols that are outliers even among outliers, indicating exceptionally unique behaviors or opportunities.
Example: If one asset's price Z-Score is +2.5 and volume Z-Score is +3.0, but the group's average Z-Scores are +0.5 for price and +1.0 for volume, this asset’s Relative Z-Score would be high and therefore stand out. This means that asset's price and volume activities are notably high, not just by its own standards, but also when compared to other symbols in the group.
DISPLAY TYPE
◽️ Display Type: Scatter Plot
The Scatter Plot is a visual tool designed to represent values for two variables, in this case the Z-Scores of price and volume for multiple symbols. Each symbol has it's own dot with x and y coordinates:
X-Axis: Represents the Z-Score of price. A symbol further to the right indicates a higher positive deviation in its price from its average, while a symbol to the left indicates a negative deviation.
Y-Axis: Represents the Z-Score of volume. A symbol positioned higher up on the plot suggests a higher positive deviation in its trading volume from its average, while one lower down indicates a negative deviation.
Here are some guideline insights of plot positioning:
- Top-Right Quadrant (High Volume-High Price): Symbols in this quadrant indicate a scenario where both the trading volume and price are higher than their respective mean.
- Top-Left Quadrant (High Volume-Low Price): Symbols here reflect high trading volumes but prices lower than the mean.
- Bottom-Left Quadrant (Low Volume-Low Price): Assets in this quadrant have both low trading volume and price compared to their mean.
- Bottom-Right Quadrant (Low Volume-High Price): Symbols positioned here have prices that are higher than their mean, but the trading volume is low compared to the mean.
The plot also integrates a set of concentric squares which serve as visual guides:
- 1st Square (1SD): Encapsulates symbols that have Z-Scores within ±1 standard deviation for both price and volume. Symbols within this square are typically considered to be displaying normal behavior or within expected range.
- 2nd Square (2SD): Encapsulates those with Z-Scores within ±2 standard deviations. Symbols within this boundary, but outside the 1 SD square, indicate a moderate deviation from the norm.
- 3rd Square (3SD): Represents symbols with Z-Scores within ±3 standard deviations. Any symbol outside this square is deemed to be a significant outlier, exhibiting extreme behavior in terms of either its price, its volume, or both.
By assessing the position of symbols relative to these squares, traders can swiftly identify which assets are behaving typically and which are showing unusual activity. This visualization simplifies the process of spotting potential outliers or unique trading opportunities within the market. The farther a symbol is from the center, the more it deviates from its typical behavior.
◽️ Display Type: Columns
In this visualization, z-scores are represented using columns, where each symbol is presented horizontally. Each symbol has two distinct nodes:
- Left Node: Represents the z-score of volume.
- Right Node: Represents the z-score of price.
The height of these nodes can vary along the y-axis between -4 and 4, based on the z-score value:
- Large Positive Columns: Signify a high or positive z-score, indicating that the price or volume is significantly above its average.
- Large Negative Columns: Represent a low or negative z-score, suggesting that the price or volume is considerably below its average.
- Short Columns Near 0: Indicate that the price or volume is close to its mean, showcasing minimal deviation.
This columnar representation provides a clear, intuitive view of how each symbol's price and volume deviate from their respective averages.
◽️ Display Type: Circles
In this visualization style, z-scores are depicted using circles. Each symbol is horizontally aligned and represented by:
- Solid Circle: Represents the z-score of price.
- Transparent Circle: Represents the z-score of volume.
The vertical position of these circles on the y-axis ranges between -4 and 4, reflecting the z-score value:
- Circles Near the Top: Indicate a high or positive z-score, suggesting the price or volume is well above its average.
- Circles Near the Bottom: Represent a low or negative z-score, pointing to the price or volume being notably below its average.
- Circles Around the Midline (0): Highlight that the price or volume is close to its mean, with minimal deviation.
◽️ Display Type: Delta Columns
There's also an option to utilize Z-Score Delta Columns. For each symbol, a single column is presented, depicting the difference between the z-score of price and the z-score of volume.
The z-score delta essentially captures the disparity between how much the price and volume deviate from their respective mean:
- Positive Delta: Indicates that the z-score of price is greater than the z-score of volume. This suggests that the price has deviated more from its average than the volume has from its own average. Such a scenario could point to price movements being more significant or pronounced compared to the changes in volume.
- Negative Delta: Represents that the z-score of volume is higher than the z-score of price. This might mean that there are substantial volume changes, yet the price hasn't moved as dramatically. This can be indicative of potential build-up in trading interest without an equivalent impact on price.
- Delta Close to 0: Means that the z-scores for price and volume are almost equal, indicating their deviations from the average are in sync.
◽️ Display Type: Z-Volume/Z-Price Heatmap
This visualization offers a heatmap either for volume z-scores or price z-scores across all symbols. Here's how it's presented:
Each symbol is allocated its own horizontal row. Within this row, bar-by-bar data is displayed using a color gradient to represent the z-score values. The heatmap employs a user-defined gradient scale, where a chosen "cold" color represents low z-scores and a chosen "hot" color signifies high z-scores. As the z-score increases or decreases, the colors transition smoothly along this gradient, providing an intuitive visual indication of the z-score's magnitude.
- Cold Colors: Indicate values significantly below the mean (negative z-score)
- Mild Colors: Represent values close to the mean, suggesting minimal deviation.
- Hot Colors: Indicate values significantly above the mean (positive z-score)
This heatmap format provides a rapid, visually impactful means to discern how each symbol's price or volume is behaving relative to its average. The color-coded rows allow you to quickly spot outliers.
VOLUME TYPE
The "Volume Type" input allows you to choose the nature of volume data that will be factored into the volume z-score calculation. The interpretation of indicator’s data changes based on this input. You can opt between:
- Volume (Regular Volume): This is the classic measure of trading volume, which represents the volume traded in a given time period - bar.
- OBV (On-Balance Volume): OBV is a momentum indicator that accumulates volume on up bars and subtracts it on down bars, making it a cumulative indicator that sort of measures buying and selling pressure.
Interpretation Implications:
- For Volume Type: Regular Volume:
Positive Z-Score: Indicates that the trading volume is above its average, meaning there's unusually high trading activity .
Negative Z-Score: Suggests that the trading volume is below its average, signifying unusually low trading activity.
- For Volume Type: OBV:
Positive Z-Score: Signifies that “buying pressure” is above its average.
Negative Z-Score: Signifies that “selling pressure” is above its average.
When comparing Z-Score of OBV to Z-Score of price, we can observe several scenarios. If Z-Price and Z-Volume are convergent (have similar z-scores), we can say that the directional price movement is supported by volume. If Z-Price and Z-Volume are divergent (have very different z-scores or one of them being zero), it suggests a potential misalignment between price movement and volume support, which might hint at possible reversals or weakness.
HistDistDevsv2Iteration on ChrisakaChis' HIsDistDevs indicator which adds customizability options and automatically adjusts the deviations according to the loaded chart and timeframe. Supports ES, NQ, YM, RTY, GC
Buy Below Prev_Low. Sell 100% Above Avg. Pyramiding.This is simple indicator script for long term investors. It will check if the low of today is less than low of yesterday (or any time frame candle) and if the condition is satisfied, then the alert will be triggerred and that particular stock will be bought.
Each time a unit is bought, the average price is calculated and also the trget selling price, which is set at 100% above the average buying price. So once the price reaches that selling price target, the entire holding is sold.
The code resets all the variables back to 0 once a sell signal is triggerred.
[MAD] Gaussian silence detectorBased on a short experiments a Gaussian silence detector
This script utilizes a Gaussian distribution function to visualize price volatility and potential major movement moments in trading.
Dynamic Spectrum Visualization:
The script plots ten different levels of the Gaussian distribution, each represented by a different color ranging from red to violet. This provides a spectrum view of the price data.
Adjustable Alert Levels:
Users can set a specific alert level, and when more than four Gaussian values exceed this threshold, a breakout alert is triggered.
Customizable Display Settings:
The visual compression, transparency, and color scheme can be adjusted to cater to different charting preferences.
Background Highlighting:
Whenever a potential breakout scenario is detected, the chart's background changes color, allowing for quick visual reference.
--------------
How to Use the Indicator
Adjust Deviation & Alert Levels:
First things first, play around with the deviation setting. This is going to help the tool understand the market's 'normal' behavior.
Next, tweak the alert levels. You want the background color to switch effectively during periods of silence. This is based on past data, so look at how the chart behaved historically and adjust accordingly.
For now each timeframe needs its own setup.
Set Up The Colors:
Once you've got the basics down, dive into the color settings. This doesn't affect how the tool works; it just makes things look prettier (or uglier, depending on your color choices 😜).
Compression (Optional):
If you think the data display is too intense or too mellow, adjust the compression. This won't change the calculations.
It's just about how you view the data.
Remember to combine it with other trading strategies and tools for the best results.
Machine Learning using Neural Networks | EducationalThe script provided is a comprehensive illustration of how to implement and execute a simplistic Neural Network (NN) on TradingView using PineScript.
It encompasses the entire workflow from data input, weight initialization, implicit neuron calculation, feedforward computation, backpropagation for weight adjustments, generating predictions, to visualizing the Mean Squared Error (MSE) Loss Curve for monitoring the training phase.
In the visual example above, you can see that the prediction is not aligned with the actual value. This is intentional for demonstrative purposes, and by incrementing the Epochs or Learning Rate, you will see these two values converge as the accuracy increases.
Hyperparameters:
Learning Rate, Epochs, and the choice between Simple Backpropagation and a verbose version are declared as script inputs, allowing users to tailor the training process.
Initialization:
Random initialization of weight matrices (w1, w2) is performed to ensure asymmetry, promoting effective gradient updates. A seed is added for reproducibility.
Utility Functions:
Functions for matrix randomization, sigmoid activation, MSE loss calculation, data normalization, and standardization are defined to streamline the computation process.
Neural Network Computation:
The feedforward function computes the hidden and output layer values given the input.
Two variants of the backpropagation function are provided for weight adjustment, with one offering a more verbose step-by-step computation of gradients.
A wrapper train_nn function iterates through epochs, performing feedforward, loss computation, and backpropagation in each epoch while logging and collecting loss values.
Training Invocation:
The input data is prepared by normalizing it to a value between 0 and 1 using the maximum standardized value, and the training process is invoked only on the last confirmed bar to preserve computational resources.
Output Forecasting and Visualization:
Post training, the NN's output (predicted price) is computed, standardized and visualized alongside the actual price on the chart.
The MSE loss between the predicted and actual prices is visualized, providing insight into the prediction accuracy.
Optionally, the MSE Loss Curve is plotted on the chart, illustrating the loss trajectory through epochs, assisting in understanding the training performance.
Customizable Visualization:
Various inputs control visualization aspects like Chart Scaling, Chart Horizontal Offset, and Chart Vertical Offset, allowing users to adapt the visualization to their preference.
-------------------------------------------------------
The following is this Neural Network structure, consisting of one hidden layer, with two hidden neurons.
Through understanding the steps outlined in my code, one should be able to scale the NN in any way they like, such as changing the input / output data and layers to fit their strategy ideas.
Additionally, one could forgo the backpropagation function, and load their own trained weights into the w1 and w2 matrices, to have this code run purely for inference.
-------------------------------------------------------
While this demonstration does create a “prediction”, it is on historical data. The purpose here is educational, rather than providing a ready tool for non-programmer consumers.
Normally in Machine Learning projects, the training process would be split into two segments, the Training and the Validation parts. For the purpose of conveying the core concept in a concise and non-repetitive way, I have foregone the Validation part. However, it is merely the application of your trained network on new data (feedforward), and monitoring the loss curve.
Essentially, checking the accuracy on “unseen” data, while training it on “seen” data.
-------------------------------------------------------
I hope that this code will help developers create interesting machine learning applications within the Tradingview ecosystem.
Treasury Yields Heatmap [By MUQWISHI]▋ INTRODUCTION :
The “Treasury Yields Heatmap” generates a dynamic heat map table, showing treasury yield bond values corresponding with dates. In the last column, it presents the status of the yield curve, discerning whether it’s in a normal, flat, or inverted configuration, which determined by using Pearson's linear regression coefficient. This tool is built to offer traders essential insights for effectively tracking bond values and monitoring yield curve status, featuring the flexibility to input a starting period, timeframe, and select from a range of major countries' bond data.
_______________________
▋ OVERVIEW:
______________________
▋ YIELD CURVE:
It is determined through Pearson's linear regression coefficient and considered…
R ≥ 0.7 → Normal
0.7 > R ≥ 0.35 → Slight Normal
0.35 > R > -0.35 → Flat
-0.35 ≥ R > -0.7 → Slight Inverted
-0.7 ≥ R → Inverted
_______________________
▋ INDICATOR SETTINGS:
#Section One: Table Setting
#Section Two: Technical Setting
(1) Country: Select country’s treasury yields data
(2) Timeframe: Time interval.
(3) Fetch By:
(3A) Date: Retrieve data by beginning of date.
(3B) Period: Retrieve data by specifying the number of time series back.
Enjoy. Please let me know if you have any questions.
Thank you.
Bankruptcy Risk: Altman Z-Score, Zmijewski Score, Grover GThis custom indicator calculates three common bankruptcy risk scores:
Altman Z-Score
Zmijewski Score
Grover G-Score
Altman Z-Score
Companies are in healthy condition if the Z-Score > 2.6.
Companies are in vulnerable conditions and need improvement (grey area) if the score is between 1.1 - 2.6.
Companies have the potential to lead to serious bankruptcy if the Z-Score < 1.1.
Zmijewski Score
The company has the potential to go bankrupt if the value of X Score > 0.
The company is healthy if the value of X Score < 0.
Grover Model: G-Score
The company has the potential to go bankrupt if the G Score ≤ -0.02.
The company is in good health if the value of G Score ≥ 0.001.
The indicator pulls key financial metrics and calculates each score, then displays the results in a table with color-coding based on the level of bankruptcy risk.
Users can toggle between FQ and FY periods and view details on the underlying metrics. This provides an easy way to visualize bankruptcy risk for a company and compare across different scoring models.
Useful for fundamental analysis and assessing financial health.
The financial ratios and methodology are based on research described in
"Analysis of Bankruptcy Prediction Models in Determining Bankruptcy of Consumer Goods Companies in Indonesia" (Thomas et al., 2020).
Market Performance TableThe Market Performance Table displays the performance of multiple tickers (up to 5) in a table format. The tickers can be customized by selecting them through the indicator settings.
The indicator calculates various metrics for each ticker, including the 1-day change percentage, whether the price is above the 50, 20, and 10-day simple moving averages (SMA), as well as the relative strength compared to the 10/20 SMA and 20/50 SMA crossovers. It also calculates the price deviation from the 50-day SMA.
The table is displayed on the chart and can be positioned in different locations.
Credits for the idea to @Alex_PrimeTrading ;)
PCA-Risk IndicatorOBJECTIVE:
The objective of this indicator is to synthesize, via PCA (Principal Component Analysis), several of the most used indicators with in order to simplify the reading of any asset on any timeframe.
It is based on my Bitcoin Risk Long Term indicator, and is the evolution of another indicator that I have not published 'Average Risk Indicator'.
The idea of this indicator is to use statistics, in this case the PCA, to reduce the number of dimensions (indicator) to aggregate them in some synthetic indicators (PCX)
I invite you to dig deeper into the PCA, but that is to try to keep as much information as possible from the raw data. The signal minus the noise.
I realized this indicator a year ago, but I publish it now because I do not see the interest to keep it private.
USAGE:
Unlike the Bitcoin Risk Long Term indicator, it does not make sense to change or disable the input indicators unless you use the 'Average Indicator' function. Because each input is weighted to generate the outputs, the PCX.
I extracted several courses (Bitcoin, Gold, S&P, CAC40) on several timeframes (W, D, 4h, 1h) of Trading view and use the Excel generated for the data on which I played the PCA analysis.
The results:
explained_variance_ratio: 0.55540809 / 0.13021972 / 0.07303142 / 0.03760925
explained_variance: 11.6639671 / 2.73470717 / 1.53371209 / 0.7898212
Interpretation:
Simply put, 55% of the information contained in each indicator can be represented with PC1, +13% with PC2, +7% with PC3, +3% with PC4.
What is important to understand is that PC1, which serves as a thermometer in a way, gives a simple indication of over-buying or over-selling area better than any other indicator.
PC2, difficult to interpret, is more reactive because precedes PC1, but can give false signals.
PC3 and PC4 do not seem relevant to me.
The way I use it is to take PC1 for Risk indicator, and display PC2 with 'Area'. When PC2 turns around and PC1 arrives on extremes, it can be good points to act.
NOTES :
- It is surprising that a simple average of all the indicators gives a fairly relevant result
- With Average indicator as Risk indicator, you can combine the indicators of your choice and see the predictive power with the staining of bars.
- You can add alerts on the levels of your choice on the Risk Indicator
- If you have any idea of adding an indicator, modification, criticism, bug found: share them, it’s appreciated!
---- FR ----
OBJECTIF :
L'objectif de cet indicateur est de synthétiser, via l'ACP (Analyse en Composantes Principales), plusieurs indicateurs parmi les plus utilisés avec afin de simplifier la lecture de n'importe quel actif sur n'importe quel timeframe.
Il est inspiré de mon indicateur 'Bitcoin Risk Long Term indicator', et est l'évolution d'un autre indicateur que je n'ai pas publié 'Average Risk Indicator'.
L'idée de cet indicateur est d'utiliser les statistiques, en l'occurence l'ACP, pour réduire le nombre de dimensions (indicateur) pour les agréger dans quelques indicateurs synthétiques (PCX)
Je vous invite à creuser l'ACP, mais c'est chercher à conserver un maximum d'informations à partir de la donnée brute. Le signal moins le bruit.
J'ai réalisé cet indicateur il y a un an, mais je le publie maintenant car je ne vois pas l'intérêt de le garder privé.
UTILISATION :
Contrairement à 'Bitcoin Risk Long Term indicator', il ne fait pas sens de modifier ou désactiver les indicateurs inputs, sauf si vous utiliser la fonction 'Average Indicator'. Car chaque input est pondéré pour générer les outputs, les PCX.
J'ai extrait plusieurs cours (Bitcoin, Gold, S&P, CAC40) sur plusieurs timeframes (W, D, 4h, 1h) de Trading view et utiliser les Excel généré pour la data sur laquelle j'ai joué l'analyse ACP.
Les résultats :
explained_variance_ratio : 0.55540809 / 0.13021972 / 0.07303142 / 0.03760925
explained_variance : 11.6639671 / 2.73470717 / 1.53371209 / 0.7898212
Interprétation :
Pour faire simple, 55% de l'information contenu dans chaque indicateur peut être représenté avec PC1, +13% avec PC2, +7% avec PC3, +3% avec PC4.
Ce qui faut y comprendre c'est que le PC1, qui sert de thermomètre en quelque sorte, donne une indication simple de zone de sur-achat ou sur-vente mieux que n'importe quel autre indicateur.
PC2, difficile à interpréter, est plus réactif car précède PC1, mais peut donner des faux signaux.
PC3 et PC4 ne me semble pas pertinent.
La manière dont je m'en sert c'est de prendre PC1 pour Risk indicator, et d'afficher PC2 avec 'Region'. Lorsque PC2 se retourne et que PC1 arrive sur des extrêmes, cela peut être des bons points pour agir.
NOTES :
- Il est étonnant de constater qu'une simple moyenne de tous les indicateurs donne un résultat assez pertinent
- Avec Average indicator comme Risk indicator, vous pouvez combiner les indicateurs de vos choix et voir la force prédictive avec la coloration des bars.
- Vous pouvez ajouter des alertes sur les niveaux de votre choix sur le Risk Indicator
- Si vous avez la moindre idée d'ajout d'indicateur, modification, critique, bug trouvé : partagez-les, c'est apprécié !
IU SIP CALCULATORHow This Indicator Script Works:
1. This indicator script calculate the monthly SIP returns of any market over any user defined period.
2. SIP stands for Systematic Investment Plan. It is a way to invest in any asset by regularly investing a fixed amount of money at regular intervals for example Monthly, Weekly, Quarterly etc.
3. This indicator Calculate the following
# Average buy price
# Total quantity hold
# Yearly returns
# Monthly returns
# Total invested amount
# Total profits in amount
# Total portfolio value
# Total returns in per percentage term.
4. This script takes monthly SIP amount, starting month, starting year, ending year, ending month from the user and store the value for calculations.
5. After that it store the open price of every month into an array then it average the array and compare that price with the last month close price.
6. on the bases of this it performs all of the calculations.
7. The script plot every calculation into an table from.
8. It requires monthly chart timeframe for working.
9. The table is editable user can change the color and transparency.
How User Can Benefit From The Script:
1. User can get the past monthly SIP returns of any market he wants to invest this will give him an overview about what to expect from the market.
2. Once user understand the expected returns from the market he can adjust his investment strategy.
3. This help the user to Analyse various stocks and their past performance.
4. User can also short list the best performed stocks.
5. Over all this script will give complete SIP vision of any market.
Sync Frame (MTF Charts) [Kioseff Trading]Hello!
This indicator "Sync Frame" displays various lower timeframe charts for the asset on your screen!
5 lower timeframe candle charts shown
Timeframes auto-calculated using the new timeframe.from_seconds() function
Heikin-Ashi candles available
Baseline chart type available
Dynamic Scaling for ease of use
User customizable timeframes
Simple script (:
The image above shows the baseline chart type.
Time image above shows a traditional candlestick chart.
The image above shows a hekin-ashi chart.
The image above shows the indicator when nearly zoomed in as much as possible. The lower timeframe charts adjust to my chart positioning.
The image above shows my screen fully zoomed out; the lower timeframe charts adjust in both height and width to accommodate my chart positioning!
Thank you for checking this out (:
Blockchain FundamentalThis indicator is made for traders to harness fundamental blockchain data for better decision-making. Unlike traditional tools, this indicator doesn't depend on standard technical indicators. It offers a novel perspective by focusing on core blockchain metrics like capitalization, miner activity, and other intrinsic data elements. I've designed a distinct scoring logic, exclusive to BF, ensuring it's user-friendly and provides actionable insights for traders at all levels.
Mainly created for Bitcoin , but can be applied to any other crypto assets in cost of losing some metrics in the analysis.
Ethereum chart:
Features:
Customizable Moving Averages:
Choose from an array of moving averages, with the flexibility to adjust the length for a tailored analysis, aiding in pinpointing asset trends.
Blockchain Metrics Integration:
Incorporates a range of blockchain metrics such as Market Cap to Realised Cap ratio, Spent Output Profit Ratio, ATH Drawdown, and more.
Blockchain Metrics Evaluation:
Each metric can be toggled on/off to customize the analysis. Using default settings, traders can use all of the metrics combined.
Every metric is essentially evaluated on a scale from -100 to 100 and then combined with others. If any metric is uncertain about its direction (equals to 0), then the score of it is not accounted in a final calculation.
Kalman Filter:
This indicator offers the option to apply a Kalman filter to the signals, enhancing the smoothness and accuracy of the indicator’s output. This is my approach to mitigate the noise in the final output.
Signal Oscillator:
Displays the aggregated score of all selected blockchain metrics.
Offers visual signals with adjustable upper and lower bounds for easy interpretation based on particular asset observation.
Visual Elements:
Signal Oscillator:
A visual representation of the aggregated blockchain fundamental score.
(White line for a raw calculation, orange line for kalman-filtered one)
Signal Counter:
Displays the count of metrics currently being considered in the fundamental score calculation. (grey line at the middle of an indicator)
Buy/Sell Signal Coloring:
The background color changes to indicate potential buying or selling opportunities based on user-defined bounds.
Usage:
Analysis:
Use the signal oscillator to identify potential market tops and bottoms based on blockchain fundamental data.
Adjust the bounds to customize the sensitivity of buy/sell signals.
Customization:
Enable/disable specific blockchain metrics to tailor the indicator to your analytical needs.
Adjust the moving average type and length for better analysis.
Integration:
Combine with other technical indicators to create a comprehensive trading strategy.
Utilize in conjunction with volume and price action analysis for enhanced decision-making. Every output could be used in traders custom strategies and indicators.
IU Probability CalculatorHow This Script Works:
1. This script calculate the probability of price reaching a user-defined price level within one candle with the help Normal Distribution Probability Table.
2. Normal Distribution Probability Table is use for calculating probability of events, it's very powerful for calculation of probability and this script is fully based on that table.
3. It takes the Average True Range value or Standard Deviation value of past user-defined length bar.
4. After that it take this formula z = ( price_level - close ) / (ATR or Standard Deviation) and return the value for z, for the bearish side it take z = (close - price level) / (ATR or Standard Deviation ) formula.
5. Once we have the z it look into Normal Distribution Probability Table and match the value.
6. Now the value of z is multiple buy 100 in order to make it look in percentage term.
7. After that this script subtract the final value with 100 because probability always comes under 100%
8. finally we plot the probability at the bottom of the chart the red line indicates "The probability of price not reaching that price level", While the green line indicates "Probability of price Reaching that level " .
9. This script will work fine for both of the directions
How This Is Useful For The User:
1. With this script user can know the probability of price reaching the certain level within one candle for both Directions .
2. This is useful while creating options hedging strategies
3. This can be helpful for deciding stop loss level.
4. It's useful for scalpers for managing their traders and it can be use by binary option traders.
IU Average move How The Script Works :
1. This script calculate the average movement of the price in a user defined custom session and plot the data in a table from on top left corner of the chart.
2. The script takes highest and lowest value of that custom session and store their difference into an array.
3. Then the script average the array thus gets the average price.
4. Addition to that the script converter the price pip change into percentage in order to calculate the value in percentage form.
5. This script is pure price action based the script only take price value and doesn't take any indicator for calculation.
6. The script works on every type of market.
7. If the session is invalid it returns nothing
8. The background color, text color and transparency is changeable.
How User Can Benefit From This Script:
1. User can understand the volatility of any session that he/she wish to trade.
2. It can be helpful for understanding the average price moment of any tradeble asset.
3. It will give the average price movement both in percentage and points bases.
4. By understanding the volatility user can adjust his stop loss or take profit with respect his risk management.
Quadratic & Linear Time Series Regression [SS]Hey everyone,
Releasing the Quadratic/Linear Time Series regression indicator.
About the indicator:
Most of you will be familiar with the conventional linear regression trend boxes (see below):
This is an awesome feature in Tradingview and there are quite a few indicators that follow this same principle.
However, because of the exponential and cyclical nature of stocks, linear regression tends to not be the best fit for stock time series data. From my experience, stocks tend to fit better with quadratic (or curvlinear) regression, which there really isn't a lot of resources for.
To put it into perspective, let's take SPX on the 1 month timeframe and plot a linear regression trend from 1930 till now:
You can see that its not really a great fit because of the exponential growth that SPX has endured since the 1930s. However, if we take a quadratic approach to the time series data, this is what we get:
This is a quadratic time series version, extended by up to 3 standard deviations. You can see that it is a bit more fitting.
Quadratic regression can also be helpful for looking at cycle patterns. For example, if we wanted to plot out how the S&P has performed from its COVID crash till now, this is how it would look using a linear regression approach:
But this is how it would look using the quadratic approach:
So which is better?
Both linear regression and quadratic regression are pivotal and important tools for traders. Sometimes, linear regression is more appropriate and others quadratic regression is more appropriate.
In general, if you are long dating your analysis and you want to see the trajectory of a ticker further back (over the course of say, 10 or 15 years), quadratic regression is likely going to be better for most stocks.
If you are looking for short term trades and short term trend assessments, linear regression is going to be the most appropriate.
The indicator will do both and it will fit the linear regression model to the data, which is different from other linreg indicators. Most will only find the start of the strongest trend and draw from there, this will fit the model to whatever period of time you wish, it just may not be that significant.
But, to keep it easy, the indicator will actually tell you which model will work better for the data you are selecting. You can see it in the example in the main chart, and here:
Here we see that the indicator indicates a better fit on the quadratic model.
And SPY during its recent uptrend:
For that, let's take a look at the Quadratic Vs the Linear, to see how they compare:
Quadratic:
Linear:
Functions:
You will see that you have 2 optional tables. The statistics table which shows you:
The R Squared to assess for Variance.
The Correlation to assess for the strength of the trend.
The Confidence interval which is set at a default of 1.96 but can be toggled to adjust for the confidence reading in the settings menu. (The confidence interval gives us a range of values that is likely to contain the true value of the coefficient with a certain level of confidence).
The strongest relationship (quadratic or linear).
Then there is the range table, which shows you the anticipated price ranges based on the distance in standard deviations from the mean.
The range table will also display to you how often a ticker has spent in each corresponding range, whether that be within the anticipated range, within 1 SD, 2 SD or 3 SD.
You can select up to 3 additional standard deviations to plot on the chart and you can manually select the 3 standard deviations you want to plot. Whether that be 1, 2, 3, or 1.5, 2.5 or 3.5, or any combination, you just enter the standard deviations in the settings menu and the indicator will adjust the price targets and plotted bands according to your preferences. It will also count the amount of time the ticker spent in that range based on your own selected standard deviation inputs.
Tips on Use:
This works best on the larger timeframes (1 hour and up), with RTH enabled.
The max lookback is 5,000 candles.
If you want to ascertain a longer term trend (over years to months), its best to adjust your chart timeframe to the weekly and/or monthly perspective.
And that's the indicator! Hopefully you all find it helpful.
Let me know your questions and suggestions below!
Safe trades to all!