NQ 7 IndexThis is a simple index-like script that adds up the market value of the magnificent 7 (AAPL, MSFT, NVDA, TSLA, META, AMZN, GOOG) and divided by a constant.
The way this works is similar to SPX and NDX, except that it doesn't have any special weighting mechanism.
Pine實用程式
Random Market «NoaTrader»This is a simple script for generating random data shown as candles. The purpose of it is the following:
1- To see what works here. If everything is random and something is working, is there really any reason behind it?
2- To see what NOT works here! this is probably the most interesting part. Human behaviors are more likely to generate bubbles so theories like Elliot waves don't work here but do work on real charts! that is an interesting thing!
3- To find out the exact parameters defining a market which is a bit more complicated and deeper. If you look closely to candles you can say that it is not natural like other candle charts. If you have watched different timeframes enough, you have a sense of the difference between them. Why? What is natural? The volume? The wicks? The seasonality? The amount of randomness? The cycle of momentum change? ... If you can generate candles more similar to real ones it means you know the details of market much better!
P.S: the random function of trading view works differently on different symbols and timeframes..
Normalized Adaptive Trend Lines [MAMA and FAMA]These indicators was originally developed by John F. Ehlers (Stocks & Commodities V. 19:10: MESA Adaptive Moving Averages). Everget wrote the initial functions for these in pine script. I have simply normalized the indicators and chosen to use the Laplace transformation instead of the hilbert transformation
How the Indicator Works:
The indicator employs a series of complex calculations, but we'll break it down into key steps to understand its functionality:
LaplaceTransform: Calculates the Laplace distribution for the given src input. The Laplace distribution is a continuous probability distribution, also known as the double exponential distribution. I use this because of the assymetrical return profile
MESA Period: The indicator calculates a MESA period, which represents the dominant cycle length in the price data. This period is continuously adjusted to adapt to market changes.
InPhase and Quadrature Components: The InPhase and Quadrature components are derived from the Hilbert Transform output. These components represent different aspects of the price's cyclical behavior.
Homodyne Discriminator: The Homodyne Discriminator is a phase-sensitive technique used to determine the phase and amplitude of a signal. It helps in detecting trend changes.
Alpha Calculation: Alpha represents the adaptive factor that adjusts the sensitivity of the indicator. It is based on the MESA period and the phase of the InPhase component. Alpha helps in dynamically adjusting the indicator's responsiveness to changes in market conditions.
MAMA and FAMA Calculation: The MAMA and FAMA values are calculated using the adaptive factor (alpha) and the input price data. These values are essentially adaptive moving averages that aim to capture the current trend more effectively than traditional moving averages.
But Omar, why would anyone want to use this?
The MAMA and FAMA lines offer benefits:
The indicator offers a distinct advantage over conventional moving averages due to its adaptive nature, which allows it to adjust to changing market conditions. This adaptability ensures that investors can stay on the right side of the trend, as the indicator becomes more responsive during trending periods and less sensitive in choppy or sideways markets.
One of the key strengths of this indicator lies in its ability to identify trends effectively by combining the MESA and MAMA techniques. By doing so, it efficiently filters out market noise, making it highly valuable for trend-following strategies. Investors can rely on this feature to gain clearer insights into the prevailing trends and make well-informed trading decisions.
This indicator is primarily suppoest to be used on the big timeframes to see which trend is prevailing, however I am not against someone using it on a timeframe below the 1D, just be careful if you are using this for modern portfolio theory, this is not suppoest to be a mid-term component, but rather a long term component that works well with proper use of detrended fluctuation analysis.
Dont hesitate to ask me if you have any questions
Again, I want to give credit to Everget and ChartPrime!
Normal Distribution CurveThis Normal Distribution Curve is designed to overlay a simple normal distribution curve on top of any TradingView indicator. This curve represents a probability distribution for a given dataset and can be used to gain insights into the likelihood of various data levels occurring within a specified range, providing traders and investors with a clear visualization of the distribution of values within a specific dataset. With the only inputs being the variable source and plot colour, I think this is by far the simplest and most intuitive iteration of any statistical analysis based indicator I've seen here!
Traders can quickly assess how data clusters around the mean in a bell curve and easily see the percentile frequency of the data; or perhaps with both and upper and lower peaks identify likely periods of upcoming volatility or mean reversion. Facilitating the identification of outliers was my main purpose when creating this tool, I believed fixed values for upper/lower bounds within most indicators are too static and do not dynamically fit the vastly different movements of all assets and timeframes - and being able to easily understand the spread of information simplifies the process of identifying key regions to take action.
The curve's tails, representing the extreme percentiles, can help identify outliers and potential areas of price reversal or trend acceleration. For example using the RSI which typically has static levels of 70 and 30, which will be breached considerably more on a less liquid or more volatile asset and therefore reduce the actionable effectiveness of the indicator, likewise for an asset with little to no directional volatility failing to ever reach this overbought/oversold areas. It makes considerably more sense to look for the top/bottom 5% or 10% levels of outlying data which are automatically calculated with this indicator, and may be a noticeable distance from the 70 and 30 values, as regions to be observing for your investing.
This normal distribution curve employs percentile linear interpolation to calculate the distribution. This interpolation technique considers the nearest data points and calculates the price values between them. This process ensures a smooth curve that accurately represents the probability distribution, even for percentiles not directly present in the original dataset; and applicable to any asset regardless of timeframe. The lookback period is set to a value of 5000 which should ensure ample data is taken into calculation and consideration without surpassing any TradingView constraints and limitations, for datasets smaller than this the indicator will adjust the length to just include all data. The labels providing the percentile and average levels can also be removed in the style tab if preferred.
Additionally, as an unplanned benefit is its applicability to the underlying price data as well as any derived indicators. Turning it into something comparable to a volume profile indicator but based on the time an assets price was within a specific range as opposed to the volume. This can therefore be used as a tool for identifying potential support and resistance zones, as well as areas that mark market inefficiencies as price rapidly accelerated through. This may then give a cleaner outlook as it eliminates the potential drawbacks of volume based profiles that maybe don't collate all exchange data or are misrepresented due to large unforeseen increases/decreases underlying capital inflows/outflows.
Thanks to @ALifeToMake, @Bjorgum, vgladkov on stackoverflow (and possibly some chatGPT!) for all the assistance in bringing this indicator to life. I really hope every user can find some use from this and help bring a unique and data driven perspective to their decision making. And make sure to please share any original implementaions of this tool too! If you've managed to apply this to the average price change once you've entered your position to better manage your trade management, or maybe overlaying on an implied volatility indicator to identify potential options arbitrage opportunities; let me know! And of course if anyone has any issues, questions, queries or requests please feel free to reach out! Thanks and enjoy.
PineConnector newsfilterThis script can send an eaoff message to the pineconnector-EA at a preset time, and an eaon message for when the EA should be reenabled.
Handy for temporarily disabling pineconnector during news events.
Can be adjusted according to the local timezone.
PineConnector newsfilterScript can send an eaoff message to the pineconnector-EA at a preset time, and an eaon message for when the EA should be reenabled.
Handy for temporarily disabling pineconnector during news events.
This version works for timezone UTC+2
Stock Open % ChangeWhile the percentage change in price from yesterday's close is important, wouldn't it be more interesting to see how much a stock price changes from the Market Open? Furthermore, you could track multiple indices to see which one has moment based on the percentage change in open, informing trading decisions.
This grid allows you to select 5 different ticker symbols, and display the change% from open, and from the close. Colors, rows, and grid placement may be customized as well.
Share CalculatorThis is a simple grid box that will calculate the number of total shares you can trade on two different stocks based on a principal amount you enter in the settings. The indicator updates throughout the trading day as price changes. The 25% column tells you the number of shares you can "scale into" the trade, 1/4 at a time, up to the total number of shares below.
The reason I built this indicator, is that I trade on a platform that isn't as flexible as some other platforms in terms of entering monetary amounts I want to trade in a stock. I have to enter the number of shares I want to purchase. Additionally, in some of the accounts I trade, I need to monitor both the Bull ETF and the Bear ETF, so it's helpful to have them side by side.
I was tired of going back and forth to excel and my trading platform! To use this, simply update the principal amount you have to trade, and update the Ticker symbols you want to use. Colors and grid placement are customizable.
Risk to Reward - FIXED SL BacktesterDon't know how to code? No problem! TradingView is an excellent platform for you. ✅ ✅
If you have an indicator that you want to backtest using a risk-to-reward ratio or fixed take profit/stop loss levels, then the Risk to Reward - FIXED SL Backtester script is the perfect solution for you.
introducing Risk to Reward - FIXED SL Backtester Script which will allow you to test any indicator / Signal with RR or Fixed SL system
How does it work ?!
Once you connect the script to your indicator, it will analyze your entry points and perform calculations based on them. It will then open trades for you according to the specified inputs in the script settings.
HOW TO CONNECT IT to your indicator?
simply open your indicator code and add the below line of code to it
plot(Signal ? 100 : 0,"Signal",display = display.data_window)
Replace Signal with the long condition from your own indicator. You can also modify the value 100 to any number you prefer. After that, open the settings.
Once the script is connected to your indicator, you can choose from two options:
Risk To Reward Ratio System
Fixed TP/ SL System
🔸if you select the Risk to Reward System ⤵️
The Risk-to-Reward System requires the calculation of a stop loss. That's why I have included three different types of stop-loss calculations for you to choose from:
ATR Based SL
Pivot Low SL
VWAP Based SL
Your stop loss and take profit levels will be automatically calculated based on the selected stop loss method and your risk-to-reward ratio.
You can also adjust their values to match your desired risk level. The trades will be displayed on the chart.
with the ability to change their values to match your risk.
once this is done, trades will be displayed on the chart
🔸if you select the Fixed system ⤵️
You have 2 inputs, which are FIXED TP & Fixed SL
input the values you want, and trades will be on your chart...
I have also added a Breakeven feature for you.
with this Breakeven feature the trade will not just move SL to Entry ?! NO NO, it will place it above entry by a % you input yourself, so you always win! 🚀
Here is an example
Enjoy, and have fun, if you have any questions do not hesitate to ask
RSI Momentum Trend ScreenerIntroducing The RSI Momentum Trend Screener, to have the ability to scan 40 symbols at once
The screener is based on RSI Momentum Trend Indicator
It will show Positive Or Negative based on the symbol condition.
You can change the values on the screener, symbols, activate/disable symbols and change table position and color
Volume+The enhanced Volume+ Indicator is a valuable tool that builds upon the traditional Volume indicator by incorporating a technique known as linear prediction.
In traditional Volume analysis, the volume data for a bar is only known once the bar has closed. However, with the enhanced Volume+ Indicator, we utilize linear prediction to estimate the closing volume of the k-bar before it actually closes. This estimation is based on historical volume observed in the market.
By employing this indicator, traders and investors can gain an early insight into the potential volume of the current bar, even before it concludes. This can be particularly useful for those who wish to make informed decisions based on volume analysis and its impact on price movements.
===========================中文版本===========================
增强的Volume+指标是一个有价值的工具,它通过结合一种称为线性预测的技术建立在传统成交量指标的基础上。
在传统的成交量分析中,只有在柱线收盘后才能知道柱线的成交量数据。然而,通过增强的Volume+指标,我们利用线性预测来估计 k 柱实际收盘前的收盘成交量。该估计基于市场观察到的历史交易量。
通过使用该指标,交易者和投资者可以在k柱结束之前就尽早了解当前柱的潜在交易量。对于那些希望根据交易量分析及其对价格变动的影响做出明智决策的人来说,这尤其有用。
kyle algo v1
Integration of multiple technical indicators: The strategy mainly combines two technical indicators - Keltner Channels and Supertrend, to generate trading signals. It also calculates fifteen exponential moving averages (EMAs) for the high price with different periods ranging from 9 to 51.
Unique combination of indicators: The traditional Supertrend typically uses Average True Range (ATR) to calculate its upper and lower bands. In contrast, this script modifies the approach to use Keltner Channels instead.
Flexible sensitivity adjustment: This strategy provides a "sensitivity" input parameter for users to adjust, which controls the multiplier for the range in the Supertrend calculation. This can make the signals more or less sensitive to price changes, allowing users to tailor the strategy to their own risk tolerance and trading style.
EMA Energy Representation: The code offers a visualization of "EMA Energy", which color-codes the EMA lines based on whether the closing price is above or below the EMA line. This can provide an intuitive understanding of market trends.
Clear visual signals: The strategy generates clear "BUY" and "SELL" signals, represented as labels on the chart. This makes it easy to identify potential entry and exit points in the market.
Customizable: The script provides several user inputs, making it possible to fine-tune the strategy according to different market conditions and individual trading preferences.
EMA (Exponential Moving Average) Principle:
The EMA is a type of moving average that assigns more weight to the most recent data.
It responds more quickly to recent price changes and is used to capture short-term price trends.
Principle of Color Change :
In this trading strategy, the color of the EMA line changes based on whether the closing price is above or below the EMA. If the closing price is above the EMA, the EMA line turns green,
indicating an upward price trend. Conversely, if the closing price is below the EMA, the EMA line turns red,
indicating a downward price trend. These color changes help traders to more intuitively identify price trends
In short, our team provides a lot of practical space
That is your development space
Enhanced Parabolic SAR + EMA 200 + MACD SignalsParabolic SAR + EMA 200 + MACD Signals Indicator is a popular technical analysis tool used by traders to identify potential entry and exit points in the market. It combines three widely used indicators: Parabolic SAR, EMA 200, and MACD.
The Parabolic SAR indicator helps determine potential price reversals. It places dots above or below the price chart to indicate the direction of the trend. When the dots are below the price, it suggests an upward trend, and when they are above the price, it indicates a downward trend.
The EMA 200 (Exponential Moving Average 200) is a moving average that gives more weight to recent price data. It is often used as a significant support or resistance level. Traders consider the price to be in an uptrend if it is above the EMA 200 and in a downtrend if it is below the EMA 200.
The MACD (Moving Average Convergence Divergence) is a trend-following momentum indicator that calculates the difference between two exponential moving averages. It consists of a MACD line and a signal line. When the MACD line crosses above the signal line, it generates a bullish signal, indicating a potential buying opportunity. Conversely, when the MACD line crosses below the signal line, it generates a bearish signal, suggesting a potential selling opportunity.
To use the MACD-Parabolic SAR-EMA200 Indicator for trading, you can follow these guidelines:
Buy conditions:
1. The price should be above the EMA 200.
2. The Parabolic SAR should indicate an upward trend (dots below the price).
3. The MACD delta (the difference between the MACD line and the signal line) should be positive.
Sell conditions:
1. The price should be below the EMA 200.
2. The Parabolic SAR should indicate a downward trend (dots above the price).
3. The MACD delta should be negative.
By combining these three indicators, traders can gain additional confirmation of the overall trend direction and make more informed trading decisions. However, it's important to note that no indicator guarantees successful trades, and it's always advisable to use additional analysis and risk management techniques in conjunction with technical indicators.
Default Strategy Template© CN_FX-999
Coded By Christian Nataliano
First Coded In 14/06/2023
Last Edited In 22/06/2023
This Is A Default Strategy Template That Can Make Your Strategy Scripts More Organized With The Benefit Of Having The Same Layouts & Not Needing To Copy Over The Common Codes Such As Displaying Backtest Results, Opening & Closing Trades, Pine Connector Capabilities And A Clean User Input Interface. This Is A Blank Strategy Script So Feel Free To Use It As Your Default Template For Your Future Strategies.
Credits To Some Of The Custom Code In The Scripts To © ZenAndTheArtOfTrading, Especially The Table Data Plotting
Lot Size Calculator - GER30 Variable Contract sizeLot size calculator is built for ger30 (dax) it has variable contract size to meet all different brokers requirements
right click and move to pane above to add to chart window, in settings you can change line colour to opaque
8AM Vertical LineThis script is a Pine Script indicator for TradingView. It draws a vertical line on the chart at a specific hour, which can be customized by the user. The default displayed hour is set to 8 AM, but it can be adjusted using the input options.
The indicator takes into account the timezone offset specified by the user to ensure the correct hour is displayed according to their local time. The vertical line is drawn with a specified color, style, and width, which can also be customized.
The purpose of this indicator is to visually mark a specific hour on the chart, allowing traders to easily identify and reference that particular time point. It can be useful for various trading strategies or analysis that involve specific hours of the day.
ASG Delta %This utility script provides a convenient way to calculate the percentage gain or drop of a token's price within a user-defined date range. It eliminates the need for manual measurement on individual charts, saving time and effort.
The script is particularly valuable when integrated into a daily token scanning routine for watchlists. By comparing the significant gains or drops among different tokens, traders can identify potential trading opportunities.
Simply select the desired date range, and the script will identify the highest and lowest price points achieved during that period. It then shows a visual representation in the form of a bullish or bearish box, displaying the percentage change (delta %). If the current price falls within the box's upper and lower bounds, additional percentage information can be shown in either the 'normal' or 'reverse' mode.
For instance, if a token experiences a -52.35% drop, enabling the 'Reverse' setting will reveal a potential 109.86% gain (from the low), or a 76.02% gain (from current price) or a potential drop of -16.5% (from current price) etc.. Having these basic statistics available, without having to manually chart them, especially during prolonged bear or bull markets, enables traders to make informed decisions and position themselves for more profitable trades.
I hope you find this script valuable. Your comments and recommendations are welcome as they will help improve the script's functionality further.
Ratio To Average - The Quant ScienceRatio To Average - The Quant Science is a quantitative indicator that calculates the percentage ratio of the market price in relation to a reference average. The indicator allows the calculation of the ratio using four different types of averages: SMA, EMA, WMA, and HMA. The ratio is represented by a series of histograms that highlight periods when the ratio is positive (in green) and periods when the ratio is negative (in red).
What is the Ratio to Average?
The Ratio to Average is a measure that tracks the price movements with one of its averages, calculating how much the price is above or below its own average, in percentage terms.
USER INTERFACE
Lenght: it adjusts the number of bars to include in the calculation of the average.
Moving Average: it allows you to choose the type of average to use.
Color Up/Color Down : it allows you to choose the color of the indicator for positive and negative ratios.
Autocorrelation - The Quant ScienceAutocorrelation - The Quant Science it is an indicator developed to quickly calculate the autocorrelation of a historical series. The objective of this indicator is to plot the autocorrelation values and highlight market moments where the value is positive and exceeds the attention threshold.
This indicator can be used for manual analysis when a trader needs to search for new price patterns within the historical series or to create complex formulas in estimating future prices.
What is autocorrelation?
Autocorrelation in trading is a statistical measure used to determine the presence of a relationship or pattern of dependence between values in a financial time series over time. It represents the correlation of past values in a series with its future values. In other words, autocorrelation in trading aims to identify if there are systematic relationships between the past prices or returns of a security or market and its future prices or returns. This analysis can be helpful in identifying patterns or trends that can be leveraged for informed trading decisions. The presence of autocorrelation may suggest that market prices or returns follow a certain pattern or trend over time.
Limitations of the model
It is important to note that autocorrelation does not necessarily imply a causal relationship between past and future values. Other variables or market factors may influence the dynamics of prices or returns, and therefore autocorrelation could be merely a random coincidence. Therefore, it is essential to carefully evaluate the results of autocorrelation analysis along with other information and trading strategies to make informed decisions.
How to use
The usage is very simple, you just need to add it to the current chart to activate the indicator.
From the user interface, you can manage two important features:
1. Lenght: the delay period applied to the historical series during the autocorrelation calculation can be managed from the user interface. By default, it is set to 20, which means that the autocorrelation ratio within the historical series is calculated with a delay of 20 bars.
2. Threshold: the threshold value that the autocorrelation level must meet can be managed from the user interface. By default, it is set to 0.50, which means that the autocorrelation value must be higher than this threshold to be considered valid and displayed on the chart.
3. Bar color: the color used to display the autocorrelation data and highlight the bars when autocorrelation is valid can be managed from the user interface.
To set up the chart
We recommend disabling the 'wick' and 'border' of the candlesticks from the chart settings for a high-quality user experience.
Support/ResistanceUse this code to stop support and resistance
This can be used with the momentum indicators that I have to see if we are likely to breakout or get rejected
Indicator Settings:
The indicator is titled "Support/Resistance | Breaks & Bounces" and is set to overlay on the price chart.
max_lines_count is set to 500, indicating the maximum number of support/resistance lines that can be plotted.
User Input:
The script allows users to customize the pivot method, sensitivity, and line width through input variables.
point_method determines whether the pivot calculation is based on "Candle Wicks" or "Candle Body".
left_bars represents the number of bars to the left used to identify pivot highs/lows.
right_bars is set equal to left_bars.
line_width controls the width of the support/resistance lines.
Global Variables and Arrays:
The script declares several variables and arrays to store information related to support and resistance levels, breakouts, and bounces.
high_source and low_source are calculated based on the selected pivot method.
fixed_pivot_high and fixed_pivot_low store the pivot highs and lows using the chosen sensitivity.
Variables and arrays are initialized for tracking support/resistance lines, breakout triggers, and bounce triggers.
Main Operation:
The main operation occurs when barstate.isconfirmed is true, indicating that a new bar has formed and its data is final.
The script iterates through the support/resistance lines to update their end points (x2) to the current bar.
For each support/resistance line, it checks if a breakout or bounce event has occurred based on the current and previous bar's price levels.
If a breakout or bounce event is detected, the corresponding trigger variables (red_breakout_trigger, red_rejection_trigger, green_breakout_trigger, green_rejection_trigger) are set to true.
The script also checks for changes in the pivot highs and lows and updates the support/resistance lines accordingly.
If a change is detected, it clears the existing lines, breakout, and bounce arrays and adds new lines for the updated pivot levels.
Annualized Spot-Future DifferenceThe "Annualized Spot-Future Difference" indicator (ASFD) compares the closing prices of a futures contract and its underlying spot asset. It calculates the price difference between the two instruments and annualizes this difference to provide a standardized measure for comparison.
The indicator takes inputs for the futures ticker symbol and the spot ticker symbol, allowing flexibility in selecting the specific assets for analysis. Additionally, it allows the user to input the contract date, which represents the expiration date of the futures contract.
The ASFD indicator plots the annualized difference between the futures and spot prices. It calculates the price difference by subtracting the spot price from the futures price. To annualize this difference, it considers the remaining days to the contract expiration and scales the difference accordingly.
The annualized difference can provide insights into market expectations, as it reflects the market's perception of the future price movement of the underlying asset. A positive value indicates that the futures price is higher than the spot price, potentially suggesting bullish sentiment. Conversely, a negative value suggests bearish sentiment, with the futures price lower than the spot price.
Traders and analysts can utilize the ASFD indicator to identify potential opportunities for arbitrage or evaluate market sentiment regarding the underlying asset. By monitoring changes in the annualized difference over time, they can gain insights into market dynamics and make informed trading decisions.
It's important to note that the ASFD indicator relies on accurate and up-to-date pricing data for both the futures and spot assets. Traders should verify that the selected ticker symbols correspond to the desired instruments and ensure that the contract date aligns with the relevant futures contract expiration.
Overall, the ASFD indicator provides a quantitative measure of the annualized price difference between futures and spot assets, enabling traders and analysts to assess market expectations and identify potential trading opportunities.
DZ SR Buy&Sell Enhanced StrategyThis ALGERIAN indicator titled "SR Buy&Sell with Enhanced Strategy" is designed to identify support and resistance levels on a financial chart, and generates enhanced buy and sell signals based on these levels. It is based on a trading strategy that uses a combination of moving means and standard deviation to calculate support and resistance levels.
The indicator plots support and resistance levels on the chart, with blue color for base level, red for resistance and green for support. Green arrows are displayed when a buy signal is generated, and red arrows when a sell signal is generated.
The market entry strategy is based on breaking support and resistance levels. When a buy signal is generated and no position is opened, a buy position is opened with a take profit and stop loss level calculated according to the parameters set by the user. Similarly, when a sell signal is generated and no position is opened, a sell position is opened with the corresponding take profit and stop loss levels.
The indicator also displays a “STOP” indicator when a position exit signal is generated, indicating to the trader that it is time to close the current position.
This indicator is a powerful tool for traders who want to exploit support and resistance levels to improve their trading decisions. It can be used in different financial markets and different time periods. Parameters such as average moving length, deviations and multiplier can be adjusted according to individual trader preferences.
Note: This indicator only provides potential signals and does not guarantee positive results with every trade. It is recommended to use this indicator in combination with other technical analysis and risk management tools to make informed decisions when trading.
Previous Day Close and Average VWAP value, Current Day 30 min HLThe code provided is a TradingView Pine Script that creates a combined indicator consisting of two separate components:
Indicator 1: Plot Lines with VWAP
This component plots lines on the chart using two different colors and widths.
It uses a custom function f_newLine to create a new line object with a specified color and width.
It uses another custom function f_moveLine to move a line to a specific location on the chart.
The line_close line is moved to a specific date and closing price.
The line_vwap line represents the VWAP (Volume Weighted Average Price) and is plotted using the line.new function.
The VWAP calculation is performed using the typical price (average of high, low, and close) and volume.
The VWAP is plotted on the chart using the plot function.
The previous day's VWAP is also plotted and connected to the current day's VWAP with a line.
Indicator 2: 30 Min high and low breakout
This component identifies a specific time range ("0915-0945") within each trading day.
It uses the ta.valuewhen function to find the highest and lowest prices during that time range.
The highest price is stored in the high_thirtymin variable, and the lowest price is stored in the low_thirtymin variable.
These prices are plotted on the chart as circles, with green representing the high and red representing the low.
The indicator combines these two components to provide visual information about the VWAP and the high/low breakout within a specific time range. The code also includes some additional logic to handle barstate and ensure correct calculations and plotting.