TradingView
siddarthshrikhande
Jun 4, 2023 7:04 AM

Previous Day Close and Average VWAP value, Current Day 30 min HL 

Nifty 50 IndexNSE

Description

The 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.
Comments
siddarthshrikhande
Please use the Pine script first, then look at the charts to see the outcomes. The representation on the graph is not what is displayed in this publication. THE REAL INCLUDES TWO
ADDITIONAL HORIZONTAL LINES DESIGNATED AS THE AVERAGE VWAP PRICE AND CLOSING PRICE OF THE PREVIOUS DAY
Smart_Money-Trader
Hi there, I would love to know the reason you chose to select the M30 at the specific time frame you did for the breakout strategy? Please can you send more details
siddarthshrikhande
@Smart_Money-Trader, So the day's initial 30 minutes of high and low are noted with horizontal dots that continue in the same direction. Having a nice range post with a 30 minute high and low enhances the likelihood of a brief rally whether it breaks out or down. gives you a confirmation on the transaction and raises the likelihood that this technique will be lucrative when combined with the previous day's close and vwap average.
purchase - above the close line from the previous day, the average VWAP line, and the break of the 30 minute short-term trend.
You can boost your risk-to-reward ratio and your win rate and percentage with this approach by using a low stop-loss level.
siddarthshrikhande
@siddarthshrikhande, vice versa for the short trade
siddarthshrikhande
@Smart_Money-Trader, You can use any timeframe as well. The levels that are marked will display the same levels at various times. It's just that applying it to multi-timeframe research will be very beneficial to you.
More