Realized Profit & Loss [BigBeluga]The Realized Loss & Profit indicator aims to find potential dips and tops in price by utilizing the security function syminfo.basecurrency + "_LOSSESADDRESSES".
The primary objective of this indicator is to present an average, favorable buying/selling opportunity based on the number of people currently in profit or loss.
The script takes into consideration the syminfo.basecurrency, so it should automatically adapt to the current coin.
🔶 USAGE
Users have the option to enable the display of either Loss or Profit, depending on their preferred visualization.
Examples of displaying Losses:
Example of displaying Profits:
🔶 CONCEPTS
The concept aims to assign a score to the data in the ticker representing the realized losses. This score will provide users with an average of buying/selling points that are better to the typical investor.
🔶 SETTINGS
Users have complete control over the script settings.
🔹 Calculation
• Profit: Display people in profit on an average of the selected length.
• Loss: Display people in loss on an average of the selected length.
🔹 Candle coloring
• True: Color the candle when data is above the threshold.
• False: Do not color the candle.
🔹 Levels
- Set the level of a specific threshold.
• Low: Low losses (green).
• Normal: Low normal (yellow).
• Medium: Low medium (orange).
• High: Low high (red).
🔹 Z-score Length: Length of the z-score moving window.
🔹 Threshold: Filter out non-significant values.
🔹 Histogram width: Width of the histogram.
🔹 Colors: Modify the colors of the displayed data.
🔶 LIMITATIONS
• Since the ticker from which we obtain data works only on the daily timeframe, we are
restricted to displaying data solely from the 1D timeframe.
• If the coin does not have any realized loss data, we can't use this script.
Sentiment
ATR + Momentum Shifts w/Take ProfitThis script is a technical analysis indicator designed to assist in identifying potential entry points and setting take profit levels in trading. It combines the Average True Range (ATR) indicator, momentum shifts, and customizable take profit levels to provide insights into potential market movements.
Differences from Currently Published Ones:
This script is unique due to its use of a combination of elements:
ATR and Momentum: The script combines the ATR indicator to provide dynamic support and resistance levels with the momentum indicator to identify shifts in the underlying momentum.
Customizable Take Profit Levels: It offers the ability to set take profit levels based on customizable multipliers of the ATR, helping traders manage potential profits.
How to Use:
ATR Bands: The script plots upper and lower ATR bands as potential dynamic support and resistance levels.
Shift Arrows: Arrows are plotted below bars for potential long entry opportunities (green triangle) and above bars for potential short entry opportunities (yellow triangle).
Take Profit Levels: The script also plots take profit levels both above and below the source price based on the ATR multipliers set in the inputs.
Markets and Conditions:
This script can be used across various financial markets, including stocks, forex, commodities, and cryptocurrencies. It's most effective in trending markets where momentum shifts can signal potential reversals or continuation of trends. Traders should consider the following conditions:
Trend Confirmation: Look for momentum shifts in the direction of the prevailing trend for higher probability setups.
Volatility: Higher volatility can amplify ATR movements and subsequently affect the placement of ATR bands and take profit levels.
Risk Management: Always implement proper risk management strategies to protect your capital.
Additional Considerations:
Customization: Traders can adjust input parameters like ATR length, momentum length, and take profit multipliers to match their trading style and market conditions.
Combining with Other Indicators: Consider using this indicator in conjunction with other technical indicators or chart patterns for confirmation.
Magic Trend By Market Mindset - Zero To EndlessMagic Trend indicator is an indicator combining the Commodity Channel Index (CCI) and the Average True Range (ATR) indicators.
The indicator is represented by a line that turns red when CCI readings are below 0 and converts to blue when CCI reaches above 0.
Color of the line can be treated as a trend indicator.
When CCI > 0 (Blue Color), price is assumed to be in uptrend and a buying momentum could be seen.
When CCI < 0 (Red Color), price is assumed to be in downtrend and a selling pressure could be seen.
Two Multipliers of ATR have been used. Default values for multiploier are : 1.5 and 3.0
It tells about the volatality in the price and also helps in deciding Entry poits, Stop loss points and sometimes Exit points.
If trend magic lines are not straight and moving upward/downward, continuition of the trend is expected and so Holding the position is adviced.
If the farther line (line with multiplier 3.0) is broken, a trend reversal can be seen soon.
In this case, squaring off and making reverse position is adviced near the other (1.5 mult) line.
If price is revolving in between these two lines... a sideways movement is expected.
Happy Trading
Market Mindset
SPDR TrackerMonitor all SPDR Index Funds in one location! The purpose of this indicator is to review which sectors are trend up vs down to better manage risk against SPY, other funds and/or individual stocks.
With this indicator it may become more apparent which sectors to begin investment in that are at lows compared to others, or use it to determine which stocks may be undervalued or overvalued against SPY.
There is a small table at the bottom where each fund symbol is presented along with it's mode value, last period change as well as last period volume - there's a tooltip that shows the description for each symbol for a quick reminder.
Review the configuration pane where:
Individual funds can have their visibility toggled
Change funds colors
Adjust display mode for each fund (SMA, EMA, VWMA, BBW, Change, ATR, VWAP - many more!)
Some presentation modes may look better on some timeframes vs others, adjust lengths and use anchor point for VWAP.
Future updates may bring about new features, I have some code organization and refactoring to do but wanted to share the idea anyways.
Feel free to drop any suggestions for feature enhancement and I hope it brings success to many, enjoy.
ICT Daily Bias Finder [DTCC]What is This?
The ICT Daily Bias Finder uses a method called "DTCC" to identify the London and New York session's bias, bullish or bearish. This indicator should only be relied on for 5 minute, and not other timeframes.
How do I use it?
Look at the previous days two boxes (labeled DTCC Bear/DTCC Bull), if both are bullish or both are bearish it is NOT recommended to rely on DTCC for that day. If the first one is bullish and second one is bearish, the DTCC for the next day says that London session will turn ABOVE midnight opening price, while New York will turn UNDER midnight opening price (longs in London, shorts in New York). If the second one is bearish and the first is bullish, the DTCC for the next day says that London session will turn UNDER midnight opening price, while New York will turn ABOVE midnight opening price (shorts in London, longs in New York)
Emoji guide to DTCC indicator:
🟢🟢: Don't trust DTCC for that day
🔴🔴: Don't trust DTCC for that day
🟢🔴: Longs in London above Midnight Opening Price, Shorts in New York under Midnight Opening Price
🔴🟢: Shorts in London under Midnight Opening Price, Longs in New York under Midnight Opening Price
Reminder: NEVER rely solely on DTCC, DTCC can be wrong and is not right 100% of times.
Liquidation Ranges + Volume/OI Dots [Kioseff Trading]Hello!
Introducing a multi-faceted indicator "Liquidation Ranges + Volume Dots" - this indicator replicates the volume dot tools found on various charting platforms and populates a liquidation range on crypto assets!
Features
Volume/OI dots populated according to user settings
Size of volume/OI dots corresponds to degree of abnormality
Naked level volume dots
Fixed range capabilities for volume/OI dots
Visible time range capabilities for volume/OI dots
Lower timeframe data used to discover iceberg orders (estimated using 1-minute data)
S/R lines drawn at high volume/OI areas
Liquidation ranges for crypto assets (10x - 100x)
Liquidation ranges are calculated using a popular crypto exchange's method
# of violations of liquidation ranges are recorded and presented in table
Pertinent high volume/OI price areas are recorded and presented in table
Personalized coloring for volume/OI dots
Net shorts / net long for the price range recorded
Lines shows reflecting net short & net long increases/decreases
Configurable volume/OI heatmap (displayed between liquidation ranges)
And some more (:
Liquidation Range
The liquidation range component of the indicator uses a popular crypto exchange's calculation (for liquidation ranges) to populate the chart for where 10x - 100x leverage orders are stopped out.
The image above depicts features corresponding to net shorts and net longs.
The image above shows features corresponding to liquidation zones for the underlying coin.
The image above shows the option to display volume/oi delta at the time the corresponding grid was traded at.
The image above shows an instance of using the "fixed range" feature for the script.
*The average price of the range is calculated to project liquidation zones.
*Heatmap is calculated using OI (or volume) delta.
Huge thank you to Pine Wizard @DonovanWall for his range filter code!
Price ranges are automatically detected using his calculation (:
Volume / OI Dots
Similar to other charting platforms, the volume/OI dots component of the indicator distinguishes "abnormal" changes in volume/OI; the detected price area is subsequently identified on the chart.
The detection method uses percent rank and calculates on the last bar of the chart. The "agelessness" of detection is contingent on user settings.
The image above shows volume dots in action; the size of each volume dot corresponds to the amount of volume at the price area.
Smaller dots = lower volume
Larger dots = higher volume
The image above exemplifies the highest aggression setting for volume/OI dot detection.
The table oriented top-right shows the highest volume areas (discovered on the 1-minute chart) for the calculated period.
The open interest change and corresponding price level are also shown. Results are listed in descending order but can also be listed in order of occurrence (most relevant).
Additionally, you can use the visible time range feature to detect volume dots.
The feature shows and explains how the visible range feature works. You select how many levels you want to detect and the script will detect the selected number of levels.
For instance, if I select to show 20 levels, the script will find the 20 highest volume/OI change price areas and distinguish them.
The image above shows a narrower price range.
The image above shows the same price range; however, the script is detecting the highest OI change price areas instead of volume.
* You can also set a fixed range with this feature
* Naked levels can be used
Additionally, you can select for the script to show only the highest volume/ OI change price area for each bar. When active, the script will successively identify the highest volume / OI change price area for the most recent bars.
Naked Levels
The image above shows and explains how naked levels can be detected when using the script.
And that's pretty much it!
Of course, there're a few more features you can check out when you use the script that haven't been explained here (:
Thank you again to @DonovanWall
Thank you to @Trendoscope for his binary insertion sort library (:
Thank you to @PineCoders for their time library
Thank you for checking this out!
Historic Volume/Market ProfilesHistoric Volume/Market Profile is a Periodic Volume Profile with all of the improvements known in the original Volume/Market Profile.
VMP is a 2 in 1 Volume and Market Profile Indicator.
HVMP uses the base of VMP to offer a quick and simple view at multiple historic profiles at the same time.
This includes:
Cluster Identification for High Volume and Low Volume Areas.
Maximizing granularity by utilizing boxes and lines to get up to 1000 rows.
New Inclusions in HVMP vs VMP:
HVMP granularity is determined by the # of profiles on display. By doing this, each profile will get an even amount of allocated rows to use and granularity is scaled per-profile, to fit within the row allowance.
For Example: 1000/(# of profiles) = Maximum # of rows per profile.
HVMP introduces the "Auto-Scale" Option (on by Default), this automatically fits each profile within the defined timeframe period to provide a consistent display when switching timeframes.
Even with "Auto-Scale" enabled, "Display Size" dictates which direction the profile is displayed.
Below is a Negative Display Size (Displays from right to left, starting at the end of the period)
Below is a Positive Display Size (Displays from left to right, starting at the beginning of the period)
HVMP is only for historical data, you can get a live profile with the same Node Identification using VMP (Volume Market/Profile). The indicator that this one is based on.
Find it Here: Volume/Market Profile
Enjoy!
Indian Market Sessions for BacktestingThis indicator is designed to increase the quality of your backtesting in the Indian Market.
NSE & BSE run from 9:15 am IST to 3:30 pm IST.
Naturally different times have different kinds of volatility.
On your chart you will find premarked -
Saffron - 9:15 am to 10:30 am - Opening Session - High Volatility Observed Historically
White - 10:35 am to 2:25 pm - Middle Session - Lower Volatility Observed Historically
Green - 2:30 pm to 3:30 pm - Closing Session - Medium to High Volatility Observed Historically
You will also find the start of each session marked with an arrow.
Feel free to change the times from the input settings and the color and visibility from the style settings.
_______________
Usage:
When you backtest any strategies, say moving average crossovers, also mark the sessions in your sheet which will help you further increase accuracy.
Feel free to drop your doubts in the comments.
Yesterday's High v.17.07Yesterday’s High Breakout it is a trading system based on the analysis of yesterday's highs, it works in trend-following mode therefore it opens a long position at the breakout of yesterday's highs even if they occur several times in one day.
There are several methods for exiting a trade, each with its own unique strategy. The first method involves setting Take-Profit and Stop-Loss percentages, while the second utilizes a trailing-stop with a specified offset value. The third method calls for a conditional exit when the candle closes below a reference EMA.
Additionally, operational filters can be applied based on the volatility of the currency pair, such as calculating the percentage change from the opening or incorporating a gap to the previous day's high levels. These filters help to anticipate or delay entry into the market, mitigating the risk of false breakouts.
In the specific case of INJ, a 12% Take-Profit and a 1.5% Stop-Loss were set, with an activated trailing-stop percentage, TRL 1 and OFF 0.5.
To postpone entry and avoid false breakouts, a 1% gap was added to the price of yesterday's highs.
Name: Yesterday's High Breakout - Trend Follower Strategy
Author: @tumiza999
Category: Trend Follower, Breakout of Yesterday's High.
Operating mode: Spot or Futures (only long).
Trade duration: Intraday.
Timeframe: 30M, 1H, 2H, 4H
Market: Crypto
Suggested usage: Short-term trading, when the market is in trend and it is showing high volatility.
Entry: When there is a breakout of Yesterday's High.
Exit: Profit target or Trailing stop, Stop loss or Crossunder EMA.
Configuration:
- Gap to anticipate or postpone the entry before or after the identified level
- Rate of Change for Entry Condition
- Take Profit, Stop Loss and Trailing Stop
- EMA length
Backtesting:
⁃ Exchange: BINANCE
⁃ Pair: INJUSDT
⁃ Timeframe: 4H
- Treshold: 1
- Gap%: 1
- SL: 1.5
- TP:12
- TRL: 1
- OFF-TRL: 0.5
⁃ Fee: 0.075%
⁃ Slippage: 1
- Initial Capital: 10000 USDT
- Position sizing: 10% of Equity
- Start : 2018-07-26 (Out Of Sample from 2022-12-23)
- Bar magnifier: on
Credits: LucF for Pine Coders (f_security function to avoid repainting using security)
Disclaimer: Risk Management is crucial, so adjust stop loss to your comfort level. A tight stop loss can help minimise potential losses. Use at your own risk.
How you or we can improve? Source code is open so share your ideas!
Leave a comment and smash the boost button!
Thanks for your attention, happy to support the TradingView community.
Thange Momentum KicksTitle: Thange Momentum Kicks Indicator - Identify Strong Bullish and Bearish Candles
Description:
The Thange Momentum Kicks indicator is a small tool designed to identify strong bullish and bearish candles in a candlestick price chart. By analyzing the momentum and size of each candle, this indicator highlights potential significant price movements.
The indicator marks strong bullish candles with a "Bull Kick" label to signal their strength on price action. Similarly, strong bearish candles are identified with the "Bear Kick" label. These kicks are characterized by their size and momentum, indicating a high probability of significant price movement.
The indicator allows traders and investors to easily spot these kicks on their charts, helping them make quick decisions. It calculates the percentage momentum of each candle and compares it to the specified thresholds for bullish and bearish kicks.
Key Features:
- Identifies strong bullish and bearish candles ("Kicks") based on momentum and size.
- Customizable input parameters for setting the percentage thresholds for kicks.
- Labels and tooltips provide essential information such as momentum, percentage change, open, and close prices.
- Differentiates between bullish kicks with blue color and bearish kicks with a unique pink color.
- Plots the candles with the specified colors for easy visualization.
Instructions:
1. Look for the "Kicks" labeled candles on your chart.
2. Bullish kicks indicate strong upward momentum, while bearish kicks represent strong downward momentum.
3. Consider the size and momentum of the kicks when making trading decisions.
4. Combine the Thange Momentum Kicks indicator with other technical analysis tools for a comprehensive market analysis.
Note: The Thange Momentum Kicks indicator is most effective when used in conjunction with other indicators, chart patterns, and risk management strategies to confirm signals and optimize trade entries and exits.
Disclaimer: This indicator should be used as a tool for technical analysis and does not guarantee specific trading outcomes. Users should exercise their own discretion and risk management when making trading decisions based on this indicator.
I hope my Thange Momentum Kicks indicator enhances your trading experience and helps you identify strong bullish and bearish candles with ease. Happy trading!
Highest High and lowest low - Sachin Wakpaijan
The "Highest High and Lowest Low" indicator, created by Sachin Wakpaijan, is a powerful tool designed to identify the highest high and lowest low in a trading instrument's price history. This indicator can be used on TradingView to gain insights into significant price levels and potential trend reversals.
Inputs:
Display Emoji: This input parameter enables or disables the display of emoji symbols on the chart.
Functionality:
The indicator calculates the highest high and lowest low based on the price history. It performs the following steps:
Highest High Calculation: The indicator calculates the highest high by comparing the current high with the previously recorded highest high. If a new high is found, the highest high is updated. The lowest low is set to the highest high.
Lowest Low Calculation: The indicator calculates the lowest low based on the current low. If a new low is found, the lowest low is updated, and the highest after the low is set to the lowest low.
Checking for Highest After Low: If the current high exceeds the highest after the low, the highest after the low is updated.
Plotting: The indicator plots the highest high, highest after low, and lowest high on the chart. Additionally, it displays emoji symbols on the chart based on specific conditions, such as the highest high and the relationship between the high and the open/close prices.
Usage:
The "Highest High and Lowest Low" indicator can be applied to any trading instrument and time frame. It helps traders identify significant price levels, potential trend reversal points, and gauge the strength of price movements. The indicator's customizable input parameter allows users to adjust the visual appearance according to their preferences.
Note:
This indicator is provided for informational purposes only and should not be considered as financial advice. Traders should conduct thorough analysis and use additional indicators or techniques to validate their trading decisions.
Author:
This indicator was created by Sachin Wakpaijan. You can find more of their work on TradingView.
Disclaimer:
Trading involves risks, and it is essential to understand and acknowledge the risks associated with trading before making any investment decisions. The author do not assume any responsibility for any trading losses incurred as a result of using this indicator.
Price & Volume Profile (Expo)█ Overview
The Price & Volume Profile provides a holistic perspective on market dynamics by simultaneously tracking price action and trading volume across a range of price levels. So it is not only a volume-based indicator but also a price-based one. In addition to illustrating volume distribution, it quantifies how frequently the price has fallen within a particular range, thus offering a holistic perspective on market dynamics.
This unique and comprehensive approach to market analysis by considering both price action and trading volume, two crucial dimensions of market activity. Its distinctive methodology offers several advantages:
Holistic Market View: By simultaneously tracking the frequency of specific price ranges (Price Profile) and the volume traded at those ranges (Volume Profile), this indicator provides a more complete picture of market behavior. It shows not only where the market is trading but also how much it's trading, reflecting both price acceptance levels and market participation intensity.
Point of Control (POC): The POC, as highlighted by this indicator, serves as a significant reference point for traders. It identifies the price level with the highest trading activity, thus indicating a strong consensus among market participants about the asset's fair value. Observing how price interacts with the POC can offer valuable insights into market sentiment and potential trend reversals.
Support and Resistance Levels: Price levels with high trading activity often act as support or resistance in future price movements. The indicator visually represents these levels, enabling traders to anticipate potential price reactions.
Price Profile
Price and Volume Profile
█ Calculations
The algorithm analyzes both trade frequency and volume across different price levels. It identifies these levels within the visible chart range, then examines each bar to determine if the selected price falls within these levels. If so, it increases a counter and adds the trading volume. This process repeats across the visible range and is visualized as a horizontal histogram, each bar representing a price level and the bar length reflecting trade frequency and volume. Additionally, it calculates the Point of Control (POC), signifying the price level with the highest activity.
In summary: The histogram presents a dual perspective - not only the traded volume at each price level but also the frequency of the price hitting each range. The longer the bar, the more times the price has frequented that specific range, revealing key insights into price behavior and acceptance levels. These frequently visited areas often emerge as strong support or resistance zones, helping traders navigate market movements.
Please note that the indicator adjusts to the visible price range, making it adaptable to changing market conditions. This dynamic analysis can provide more relevant and timely information than static indicators.
█ How to use
This indicator is beneficial for traders as it offers insights into the distribution of trading activity across different price levels. It helps identify key areas of support and resistance and gives a visual representation of market sentiment and liquidity.
The point of control (POC) , which is the price level with the highest traded volume or frequency count, becomes even more crucial in this context. It marks the price at which the most trading activity occurred, signaling a strong consensus among market participants about the asset's fair value. If the market price deviates significantly from the POC, it could suggest an overbought or oversold condition, potentially leading to a price reversion.
Fair Price Areas/gaps are specific price levels or zones where an asset has spent limited time in the past. These areas are considered interesting or significant because they may have an impact on future price action.
Similar to the concept of fair value gaps, which refers to discrepancies between an asset's market price and its estimated intrinsic value, Fair Price Areas/gaps focus on price levels that have been relatively underutilized in terms of trading activity. When an asset's price reaches a Fair Price Area/gap, traders and investors pay attention because they expect the price to react in some way. The rationale behind this concept is that price tends to gravitate towards areas where it has spent less time in the past, as the market perceives them as significant levels.
█ Settings
The indicator is customizable, allowing users to define the number of price levels (rows), the offset, the data source, and whether to display volume or frequency count. It also adjusts dynamically to the visible price range on the chart, ensuring that the analysis remains relevant and timely with changing market conditions.
Source: The price to use for the calculation. Typically, this is the closing price. By considering the user-selected Source (typically the closing price), the indicator determines the frequency with which the price lands within each designated price level (row) over the selected period. In essence, the indicator provides a count of bars where the Source price falls within each range, essentially creating a "Price Profile."
Row Size: The number of price levels (rows) to divide the visible price range into.
Display: Choose whether to display the number of bars ("Counter") or the total volume ("Volume") for each price level.
Offset: The distance of the histogram from the price chart.
Point of Control (POC): If enabled, the indicator will highlight the price level with the most activity.
-----------------
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!
Developing Market Profile / TPO [Honestcowboy]The Developing Market Profile Indicator aims to broaden the horizon of Market Profile / TPO research and trading. While standard Market Profiles aim is to show where PRICE is in relation to TIME on a previous session (usually a day). Developing Market Profile will change bar by bar and display PRICE in relation to TIME for a user specified number of past bars.
What is a market profile?
"Market Profile is an intra-day charting technique (price vertical, time/activity horizontal) devised by J. Peter Steidlmayer. Steidlmayer was seeking a way to determine and to evaluate market value as it developed in the day time frame. The concept was to display price on a vertical axis against time on the horizontal, and the ensuing graphic generally is a bell shape--fatter at the middle prices, with activity trailing off and volume diminished at the extreme higher and lower prices."
For education on market profiles I recommend you search the net and study some profitable traders who use it.
Key Differences
Does not have a value area but distinguishes each column in relation to the biggest column in percentage terms.
Updates bar by bar
Does not take sessions into account
Shows historical values for each bar
While there is an entire education system build around Market Profiles they usually focus on a daily profile and in some cases how the value area develops during the day (there are indicators showing the developing value area).
The idea of trading based on a developing value area is what inspired me to build the Developing Market Profile.
🟦 CALCULATION
Think of this Developing Market Profile the same way as you would think of a moving average. On each bar it will lookback 200 bars (or as user specified) and calculate a Market Profile from those bars (range).
🔹Market Profile gets calculated using these steps:
Get the highest high and lowest low of the price range.
Separate that range into user specified amount of price zones (all spaced evenly)
Loop through the ranges bars and on each bar check in which price zones price was, then add +1 to the zones price was in (we do this using the OccurenceArray)
After it looped through all bars in the range it will draw columns for each price zone (using boxes) and make them as wide as the OccurenceArray dictates in number of bars
🔹Coloring each column:
The script will find the biggest column in the Profile and use that as a reference for all other columns. It will then decide for each column individually how big it is in % compared to the biggest column. It will use that percentage to decide which color to give it, top 20% will be red, top 40% purple, top 60% blue, top 80% green and all the rest yellow. The user is able to adjust these numbers for further customisation.
The historical display of the profiles uses plotchar() and will not only use the color of the column at that time but the % rating will also decide transparancy for further detail when analysing how the profiles developed over time. Each of those historical profiles is calculated using its own 200 past bars. This makes the script very heavy and that is why it includes optimisation settings, more info below.
🟦 USAGE
My general idea of the markets is that they are ever changing and that in studying that changing behaviour a good trader is able to distinguish new behaviour from old behaviour and adapt his approach before losing traders "weak hands" do.
A Market Profile can visually show a trader what kind of market environment we currently are in. In training this visual feedback helps traders remember past market environments and how the market behaved during these times.
Use the history shown using plotchars in colors to get an idea of how the Market Profile looked at each bar of the chart.
This history will help in studying how price moves at different stages of the Market Profile development.
I'm in no way an expert in trading Market Profiles so take this information with a grain of salt. Below an idea of how I would trade using this indicator:
🟦 SETTINGS
🔹MARKET PROFILING
Lookback: The amount of bars the Market Profile will look in the past to calculate where price has been the most in that range
Resolution: This is the amount of columns the Market Profile will have. These columns are calculated using the highest and lowest point price has been for the lookback period
Resolution is limited to a maximum of 32 because of pinescript plotting limits (64). Each plotchar() because of using variable colors takes up 2 of these slots
🔹VISUAL SETTINGS
Profile Distance From Chart: The amount of bars the market profile will be offset from the current bar
Border width (MP): The line thickness of the Market Profile column borders
Character: This is the character the history will use to show past profiles, default is a square.
Color theme: You can pick 5 colors from biggest column of the Profile to smallest column of the profile.
Numbers: these are for % to decide column color. So on default top 20% will be red, top 40% purple... Always use these in descending order
Show Market Profile: This setting will enable/disable the current Market Profile (columns on right side of current bar)
Show Profile History: This setting will enable/disable the Profile History which are the colored characters you see on each bar
🔹OPTIMISATION AND DEBUGGING
Calculate from here: The Market Profile will only start to calculate bar by bar from this point. Setting is needed to optimise loading time and quite frankly without it the script would probably exceed tradingview loading time limits.
Min Size: This setting is there to avoid visual bugs in the script. Scaling the chart there can be issues where the Market Profile extends all the way to 0. To avoid this use a minimum size bigger than the bugged bottom box
Bitcoin Economics Adaptive MultipleBEAM (Bitcoin Economics Adaptive Multiple) is an indicator that assesses the valuation of Bitcoin by dividing the current price of Bitcoin by a moving average of past prices. Its purpose is to provide insights into whether Bitcoin is under or overvalued at any given time. The thresholds for the buy and sell zones in BEAM are adjustable, allowing users to customize the indicator based on their preferences and trading strategies.
BEAM categorizes Bitcoin's valuation into two distinct zones: the green buy zone and the red sell zone.
Green Buy Zone:
The green buy zone in BEAM indicates that Bitcoin is potentially undervalued. Traders and investors may interpret this zone as a favorable buying opportunity. The threshold for the buy zone can be adjusted to suit individual preferences or trading strategies.
Red Sell Zone:
The red sell zone in BEAM suggests that Bitcoin is potentially overvalued. Traders and investors may consider selling their Bitcoin holdings during this zone to secure profits or manage risk. The threshold for the sell zone is adjustable, allowing users to adapt the indicator based on their trading preferences.
Methodology:
BEAM calculates the indicator value using the following formula:
beam = math.log(close / ta.sma(close, math.min(count, 1400))) / 2.5
The calculation involves taking the natural logarithm of the ratio between the current price of Bitcoin and a simple moving average of past prices. The moving average period used is a minimum of the specified count or 1400, providing a suitable historical reference for valuation assessment.
The resulting value of BEAM provides a standardized measure that can be compared across different time periods. By adjusting the thresholds for the buy and sell zones, users can customize BEAM to their preferred levels of undervaluation and overvaluation.
Utility:
BEAM serves as a tool for investors in the Bitcoin market, offering insights into Bitcoin's valuation and potential buying or selling opportunities. By monitoring BEAM, market participants can gauge whether Bitcoin is potentially undervalued or overvalued, helping them make informed decisions regarding their Bitcoin positions.
It is important to note that BEAM should be used in conjunction with other technical and fundamental analysis tools to validate signals and avoid relying solely on this indicator for trading decisions. Additionally, traders and investors are encouraged to adjust the threshold values based on their specific trading strategies, risk tolerance, and market conditions.
Credit: The BEAM (Bitcoin Economics Adaptive Multiple) indicator was originally developed by BitcoinEcon
Open interest flow / quantifytools- Overview
Open interest flow detects inflows (positions opening) and outflows (positions closing) using open interest and estimates delta (net buyers/sellers) for the flows. Users are able to choose any open interest source available on Tradingview, by default set to BTCUSDT OI fetched from Binance. Using historical open interest flows, bands depicting typical magnitude of flows are formed for benchmarking intensity of flows. On the inflow side, +1 represents average inflows while +2 represents 2x above average inflows, a level considered an extreme. In a vice versa manner, -1 represents average outflows while -2 represents 2x above average outflows. Extreme inflows indicate aggressive position opening, in other words exuberance. Extreme outflows on the other hand indicate forced exiting of positions, in other words liquidations.
- Concept
Open interest flow is calculated using position of OI source relative to its moving average (by default set to SMA 10), referred to as relative open interest from hereon. When relative OI is positive (open interest is above its moving average), new positions are considered to enter the market. When relative OI is negative (open interest is below its moving average), existing positions are considered to exit the market. Open interest delta (side opening/closing positions, either net buyers/sellers) is calculated using relative price in a similar fashion to relative OI, but using close of viewed symbol as source. Price is considered to be up when relative price is positive, down when relative price is negative. Using relative OI and relative price in tandem, the following assumptions are applied:
Price up, open interest up = longs entering market
Price down, open interest up = shorts entering market
Price down, open interest down = longs exiting market
Price up, open interest down = shorts exiting market
Bands depicting magnitude of open interest flows are calculated using average turning points in relative OI. +1 and -1 represent levels where flows on average turn towards mean rather than continue to increase/decrease. These levels are then multiplied up to +2 and -2, representing two times larger deviations from the normal. When inflows are above 1, positions opening have reached a point where flows historically turn down. Therefore, anything above 1 would be abnormal amount of open interest entering, an extreme stretch being at 2 or above. Same logic applies to outflows, but in a vice versa manner (below -1 abnormal, extreme at -2)
Flow bursts further refine indications of aggressive inflows/outflows by taking into account change in open interest flows. Burst indications are activated when open interest is above its average turning point, coupled with a sufficient increase/decrease in flows simultaneously. Bursts are essentially a filtered version of abnormal flows and therefore a more reliable indication of exuberance/liquidations. Burst sensitivity can be adjusted via input menu, available in 5 settings. 1 sets OI burst requirements to loosest (more signals, more noise) while 5 sets OI burst requirements to strictest (less signals, less noise). Exact criteria applied to bursts can be viewed via input menu tooltip.
- Features
Users can opt for OI source auto-select for CRYPTO/USDT pairs. When auto-select is enabled and another chart is opened, corresponding open interest source is automatically selected as long as requirements mentioned above are met.
Open interest flows can be visualized as chart color, available separately for flow states and flow bursts.
Relative price line and flow guidelines (reminders for flow interpretation) can be enabled via input menu. All colors are customizable.
- Alerts
Available alerts are the following:
- Abnormal long inflows/outflows
- Abnormal short inflows/outflows
- Abnormal inflows/outflows from either side
- Aggressive longs/shorts (flow burst up)
- Liquidated longs/shorts (flow burst down)
- Aggressive or liquidated longs/shorts
- Practical guide
Open interest as a standalone data point does not reveal which side is likely opening/exiting positions and how extreme the participant behavior is. Using the additional data provided by open interest flows, moments of greed and fear can be detected. Smart money does not short into dips and buy into rips. When buyers or sellers have participated in a large move and continue to show interest even when efforts are not rewarded at an already overextended price, participants are asking for trouble.
Similar events can be observed when extreme outflows take place, indicating forced exits such as stop-losses triggering. When enough participants are forced out, price is likely to take the path of least resistance which is to the opposite direction.
SMMA Bounce IndicatorThis indicator Looks for continuous retracements from Smoothed Moving Average periods of the user's choosing. This can be helpful in locating reversals and pullbacks with a quick glance. With this indicator, you have plenty of options to cater to your time period of choice as well as the freedom to change to colors that best suit your chart. This script was made in whole by SirvivalFX and utilized the (Built-in Script) "Smoothed Moving Average" with inspirations from rmunoz's Engulfing Candle Indicator. *DISCLAIMER*- This should be used with a plethora of knowledge and tools to work effectively and should not be used as a surefire trading tactic. You may use and alter this script in any form you like! :)
Correlation for Major Markets This indicator plots the correlation of major markets as an indicator. The major markets covered are the following:
DXY
GC
CL
ES
RTY
ZN
The chart shows all the correlations and cross-correlations of the above instruments plotted together. The user can go in the settings and choose what correlation to see, or if multiple correlations, choose to plot the indicator a second time.
ReversalThe primary objective of this indicator is to discern candles that exhibit characteristics suggestive of potential market reversals through the application of candlestick analysis. Extensive observation across various assets and timeframes has revealed the existence of a recurrent reversal pattern. This pattern typically manifests as a sequence of one to three candles that abruptly diverge from the prevailing price action or trend, offering a distinctive signal indicating a potential reversal.
By leveraging the insights gained from this observation, the indicator aims to assist traders in identifying these noteworthy candle patterns that hold the potential to indicate significant market shifts.
The indicator operates as follows: initially, it identifies the lowest close (in the case of a bullish reversal) or the highest close (in the case of a bearish reversal) within a specified number of previous candles, as determined by user input (referred to as "Candle Lookback").
Next, the indicator examines whether the closing price surpasses the high of the previously identified lowest (bullish reversal) or highest (bearish reversal) closed candle within a designated number of candles, as specified by the user (referred to as "Confirm Within").
Currency Pair Index IndicatorHere's how it works step by step:
The indicator takes an input parameter called "length," which determines the number of bars to consider for the calculation. A higher length value will result in a smoother indicator, while a lower length value will make it more sensitive to recent price changes.
It then calculates the bullish sentiment by summing the volume multiplied by the price change (close - open) for each bar where the close price is greater than the open price. If the close price is not greater than the open price, the value for that bar is set to zero. The sum of these values is divided by the total volume for the selected bars.
Similarly, the bearish sentiment is calculated by summing the volume multiplied by the price change (open - close) for each bar where the close price is less than the open price. If the close price is not less than the open price, the value for that bar is set to zero. The sum of these values is divided by the total volume for the selected bars.
The bullish and bearish values are then plotted on the chart as separate line graphs. The bullish sentiment is represented by a green line, while the bearish sentiment is represented by a red line.
The difference between the bullish and bearish values is also plotted as a blue line. This line represents the overall sentiment of the currency pair index.
Additionally, arrow symbols are plotted below the price bars to indicate bullish or bearish signals. A green arrow is displayed when the bullish sentiment is higher than the bearish sentiment, indicating a bullish signal. A red arrow is displayed when the bearish sentiment is higher than the bullish sentiment, indicating a bearish signal.
By observing the indicator's line graphs and arrow symbols, traders can get an idea of the overall sentiment of the currency pair and identify potential bullish or bearish trading opportunities.
120x ticker screener (composite tickers)In specific circumstances, it is possible to extract data, far above the 40 `request.*()` call limit for 1 single script .
The following technique uses composite tickers . Changing tickers needs to be done in the code itself as will be explained further.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
🔶 PRINCIPLE
Standard example:
c1 = request.security('MTLUSDT' , 'D', close)
This will give the close value from 1 ticker (MTLUSDT); c1 for example is 1.153
Now let's add 2 tickers to MTLUSDT; XMRUSDT and ORNUSDT with, for example, values of 1.153 (I), 143.4 (II) and 0.8242 (III) respectively.
Just adding them up 'MTLUSDT+XMRUSDT+ORNUSDT' would give 145.3772 as a result, which is not something we can use...
Let's multiply ORNUSDT by 100 -> 14340
and multiply MTLUSDT by 1000000000 -> 1153000000 (from now, 10e8 will be used instead of 1000000000)
Then we make the sum.
When we put this in a security call (just the close value) we get:
c1 = request.security('MTLUSDT*10e8+XMRUSDT*100+ORNUSDT', 'D', close)
'MTLUSDT*10e8+XMRUSDT*100+ORNUSDT' -> 1153000000 + 14340 + 0.8242 = 1153014340.8242 (a)
This (a) will be split later on, for example:
1153014330.8242 / 10e8 = 1.1530143408242 -> round -> in this case to 1.153 (I), multiply again by 10e8 -> 1153000000.00 (b)
We subtract this from the initial number:
1153014340.8242 (a)
- 1153000000.0000 (b)
–––––––––––––––––
14340.8242 (c)
Then -> 14340.8242 / 100 = 143.408242 -> round -> 143.4 (II) -> multiply -> 14340.0000 (d)
-> subtract
14340.8242 (c)
- 14340.0000 (d)
––––––––––––
0.8242 (III)
Now we have split the number again into 3 tickers: 1.153 (I), 143.4 (II) and 0.8242 (III)
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
In this publication the function compose_3_() will make a composite ticker of 3 tickers, and the split_3_() function will split these 3 tickers again after passing 1 request.security() call.
In this example:
t46 = 'BINANCE:MTLUSDT', n46 = 10e8 , r46 = 3, t47 = 'BINANCE:XMRUSDT', n47 = 10e1, r47 = 1, t48 = 'BINANCE:ORNUSDT', r48 = 4 // T16
•••
T16= compose_3_(t48, t47, n47, t46, n46)
•••
= request.security(T16, res, )
•••
= split_3_(c16, n46, r46, n47, r47, r48)
🔶 CHANGING TICKERS
If you need to change tickers, you only have to change the first part of the script, USER DEFINED TICKERS
Back to our example, at line 26 in the code, you'll find:
t46 = 'BINANCE:MTLUSDT', n46 = 10e8 , r46 = 3, t47 = 'BINANCE:XMRUSDT', n47 = 10e1, r47 = 1, t48 = 'BINANCE:ORNUSDT', r48 = 4 // T16
( t46 , T16 ,... will be explained later)
You need to figure out how much you need to multiply each ticker, and the number for rounding, to get a good result.
In this case:
'BINANCE:MTLUSDT', multiply number = 10e8, round number is 3 (example value 1.153)
'BINANCE:XMRUSDT', multiply number = 10e1, round number is 1 (example value 143.4)
'BINANCE:ORNUSDT', NO multiply number, round number is 4 (example value 0.8242)
The value with most digits after the decimal point by preference is placed to the right side (ORNUSDT)
If you want to change these 3, how would you do so?
First pick your tickers and look for the round values, for example:
'MATICUSDT', example value = 0.5876 -> round -> 4
'LTCUSDT' , example value = 77.47 -> round -> 2
'ARBUSDT' , example value = 1.0231 -> round -> 4
Value with most digits after the decimal point -> MATIC or ARB, let's pick ARB to go on the right side, LTC at the left of ARB, and MATIC at the most left side.
-> 'MATICUSDT', LTCUSDT', ARBUSDT'
Then check with how much 'LTCUSDT' and 'MATICUSDT' needs to be multiplied to get this: 5876 0 7747 0 1.0231
'MATICUSDT' -> 10e10
'LTCUSDT' -> 10e3
Replace:
t46 = 'BINANCE:MTLUSDT', n46 = 10e8 , r46 = 3, t47 = 'BINANCE:XMRUSDT', n47 = 10e1, r47 = 1, t48 = 'BINANCE:ORNUSDT', r48 = 4 // T16
->
t46 = 'BINANCE:MATICUSDT', n46 = 10e10 , r46 = 4, t47 = 'BINANCE:LTCUSDT', n47 = 10e3, r47 = 2, t48 = 'BINANCE:ARBUSDT', r48 = 4 // T16
DO NOT change anything at t46, n46,... if you don't know what you're doing!
Only
• tickers ('BINANCE:MTLUSDT', 'BINANCE:XMRUSDT', 'BINANCE:ORNUSDT', ...),
• multiply numbers (10e8, 10e1, ...) and
• round numbers (3, 1, 4, ...)
should be changed.
There you go!
🔶 LIMITATIONS
🔹 The composite ticker fails when 1 of the 3 isn't in market in the weekend, while the other 2 are.
That is the reason all tickers are crypto. I think it is possible to combine stock,... tickers, but they have to share the same market hours.
🔹 The number cannot be as large as you want, the limit lays around 15-16 digits.
This means when you have for example 123, 45.67 and 0.000000000089, you'll get issues when composing to this:
-> 123045670.000000000089 (21 digits)
Make sure the numbers are close to each other as possible, with 1 zero (or 2) in between:
-> 1.230045670089 (13 digits by doing -> (123 * 10e-3) + (45.67 * 10e-7) + 0.000000000089)
🔹 This script contains examples of calculated values, % change, SMA, RMA and RSI.
These values need to be calculated from HTF close data at current TF (timeframe).
This gives challenges. For example the SMA / %change is not a problem (same values at 1h TF from Daily data).
RMA , RSI is not so easy though...
Daily values are rather similar on a 2-3h TF, but 1h TF and lower is quite different.
At the moment I haven't figured out why, if someone has an idea, don't hesitate to share.
The main goal of this publication is 'composite tickers ~ request.security()' though.
🔹 When a ticker value changes substantially (x10, x100), the multiply number needs to be adjusted accordingly.
🔶 SETTINGS
SHOW SETS
SET
• Length : length of SMA, RMA and RSI
• HTF : Higher TimeFrame (default Daily)
TABLE
• Size table : \ _ Self-explanatory
• Include exchange name : /
• Sort : If exchange names are shown, the exchanges will be sorted first
COLOURS
• CH%
• RSI
• SMA (RMA)
DEBUG
Remember t46 , T16 ,... ?
This can be used for debugging/checking
ALWAYS DISABLE " sort " when doing so.
Example:
Set string -> T1 (tickers FIL, CAKE, SOL)
(Numbers are slightly different due to time passing by between screen captures)
Placing your tickers at the side panel makes it easy to compare with the printed label below the table (right side, 332201415014.45 ),
together with the line T1 in the script:
t1 = 'BINANCE:FILUSDT' , n1 = 10e10, r1 = 4, t2 = 'BINANCE:CAKEUSDT' , n2 = 10e5 , r2 = 3, t3 = 'BINANCE:SOLUSDT' , r3 = 2 // T1
FIL : 3.322
CAKE: 1.415
SOL : 14.56
Now it is easy to check whether the tickers are placed close enough to each other, with 1-2 zero's in between.
If you want to check a specific ticker, use " Show Ticker" , see out initial example:
Set string -> T16
Show ticker -> 46 (in the code -> t46 = 'BINANCE:MTLUSDT')
(Set at 0 to disable " check string " and NONE to disable " Set string ")
-> Debug/check/set away! 😀
🔶 OTHER TECHNIQUES
• REGEX ( Regular expression ) and str.match() is used to delete the exchange name from the ticker, in other words, everything before ":" is deleted by following regex:
exch(t) => incl_exch ? t : str.match(t, "(?<=:) +")
• To sort, array.sort_indices() is used (line 675 in the code), just as in my first "sort" publication Sort array alphabetically - educational
aSort = arrT.copy()
sort_Indices = array.sort_indices(id= aSort, order= order.ascending)
• Numbers and text colour will adjust automatically when switching between light/dark mode by using chart.fg_color / chart.bg_color
🔹 DISCLAIMER
Please don't ask me for custom screeners, thank you.
AIAE IndicatorAggregate (or Average) Investor Allocation to Equities.
When it comes to predicting long-term equity returns, several well-known indicators come to mind—for example, the CAPE ratio, Tobin’s Q, and Market Cap to GDP, to name a few.
Yet there is another indicator without nearly as high of a profile that has outperformed the aforementioned indicators significantly when it comes to both forecasting and tactical asset allocation.
That indicator, known as the Aggregate (or Average) Investor Allocation to Equities (AIAE), was developed by the pseudonymous financial pundit, Jesse Livermore, and published on his blog in 2013.
In an essay titled, “The Single Greatest Predictor of Future Stock Market Returns,” Livermore makes the case that the primary driver of long-term equity returns is not valuation, but rather the supply of equities relative to the combined supply of bonds and cash.
Accordingly, the AIAE is computed by taking the total market value of equities and dividing by the sum of a) the total market value of equities, b) the total market value of bonds, and c) the total amount of cash available to investors (i.e., that in circulation plus bank deposits):
This ratio gives the market-wide allocation to equities (or, equivalently, the average investor allocation to equities weighted by portfolio size). (Note that every share of stock, every bond, and every unit of cash in existence must be held in some portfolio somewhere at all times.)
Livermore explains that, in practice, the total market value of bonds plus cash can be estimated by the total liabilities held by the five classes of economic borrowers: Households, Non-Financial Corporations, State and Local Governments, the Federal Government, and the Rest of the World.
This follows from the fact that if these entities borrow directly from investors, new bonds are created. Whereas, if they borrow directly from banks, new bank deposits (cash) are created.
As the economy grows, the supply of bonds and cash steadily increases. Historically, the rate of increase of the supply of bonds and cash has been about 7.5% per annum. Consequently, if the market portfolio is to maintain the same allocation to equities, the supply of equities must increase at the exact same rate.
The supply of equities can increase either by new equity issuance or by price increases. Historically, net new equity issuance has been negligible (with issuances being offset by buybacks and acquisitions). Thus, in order for equities not to become an ever-smaller portion of the average investor’s portfolio, the price of stocks must rise over the long-term.
While we often hear that stock prices follow earnings, in the 1980s earnings fell slightly from the beginning of the decade to the end of the decade, yet stocks rose at an annualized rate of 17% during that time. How could this be?
Well, at the beginning of the decade the average investor’s portfolio had a 25% allocation to equities. During the decade, the supply of bonds and cash rose strongly. If the price of equities had not risen, the average investor’s allocation to equities would have fallen to a mere 13% (as the supply of cash and bonds grew). Thus, equities had no choice but to rise despite the fall in earnings.
US Market SentimentThe "US Market Sentiment" indicator is designed to provide insights into the sentiment of the US market. It is based on the calculation of an oscillator using data from the High Yield Ratio. This indicator can be helpful in assessing the overall sentiment and potential market trends.
Key Features:
Trend Direction: The indicator helps identify the general trend direction of market sentiment. Positive values indicate a bullish sentiment, while negative values indicate a bearish sentiment. Traders and investors can use this information to understand the prevailing market sentiment.
Overbought and Oversold Levels: The indicator can highlight overbought and oversold conditions in the market. When the oscillator reaches high positive levels, it suggests excessive optimism and a potential downside correction. Conversely, high negative levels indicate excessive pessimism and the possibility of an upside rebound.
Divergence Analysis: The indicator can reveal divergences between the sentiment oscillator and price movements. Divergences occur when the price reaches new highs or lows, but the sentiment oscillator fails to confirm the move. This can signal a potential trend reversal or weakening of the current trend.
Confirmation of Trading Signals: The "US Market Sentiment" indicator can be used to confirm other trading signals or indicators. For instance, if a momentum indicator generates a bullish signal, a positive reversal in the sentiment oscillator can provide additional confirmation for the trade.
Usage and Interpretation:
Positive values of the "US Market Sentiment" indicate a bullish sentiment, suggesting potential buying opportunities.
Negative values suggest a bearish sentiment, indicating potential selling or shorting opportunities.
Extreme positive or negative values may signal overbought or oversold conditions, respectively, and could precede a market reversal.
Divergences between the sentiment oscillator and price trends may suggest a potential change in the current market direction.
Traders and investors can combine the "US Market Sentiment" indicator with other technical analysis tools to enhance their decision-making process and gain deeper insights into the US market sentiment.