TradingView
pbghosh
21 Nov 2019 pukul 11.17

15M 2PM-3PM High/Low 

RAMCO CEMENTS(THE)NSE

Huraian

This script will draw horizontal lines based on the high and low values between 2PM and 3PM (inclusive 2PM & 3PM) on 15 minute time frame. This indicator can be used in 15 minute time frame to plot the high and low lines correctly. This indicator can be used for previous day 2PM-3PM range breakout or breakdown trades.

Nota Keluaran

This script will draw horizontal lines based on the high and low values between 2PM and 3PM (inclusive 2PM & 3PM) on 15 minute time frame. This indicator can be used in 15 minute time frame to plot the high and low lines correctly. This indicator can be used for previous day 2PM-3PM range breakout or breakdown trades.

Nota Keluaran

The earlier version was showing incorrect high and low values with regard to previous day 15 minutes 2PM to 3PM time period during real time trading session. I have corrected the flaws encountered in the earlier version and now, you can use this script to plot the range during real time and after market session as well. By default, this script will calculate the high and low values based on NSE India and BSE India exchange timeframe period. If you want to work according to your exchange timeframe, you need to change the time range in the following code of my script:

time(timeframe.period, "0915-1530")

You may need to change the value of dayofweek.saturday and dayofweek.sunday in the following code as well because I have found different values with regards to exchanges:

if (x == 1 and dayofweek != 5 and dayofweek != 6)

Nota Keluaran

I have encountered a simple logical error in my previous version which I have corrected now.

Nota Keluaran

The lines were not plotting due to a logical error in the study statement, which is now corrected.

Nota Keluaran

The Pinescript named constants dayofweek.saturday and dayofweek.sunday were not working properly earlier and as a result I used literals. Now, the named constants are working perfectly well now and therefore, I have replaced the literals with the named constants in this version.

This version will also plot the previous day 2PM-3PM high and low for each day.

Nota Keluaran

In this version I have added resistance and support lines, price levels at the right side and changed the appearance of the horizontal lines.

Nota Keluaran

In this version, I have corrected the logic behind the calculation of 2PM-3PM high and low value and changed the line.new() function to plot() function.
Komen
SanjivJoshi
Sir this is another perfect strategy that i have been using in Banknifty and it really works. Thankyou.
Suryasur
Sir, any trading strategy on SR and high low levels.. Please
drashwinc
Hello Sir can you help me write a script for 10:15 candle 15min high/low. Have backtested for nifty and bnf. The range breakout helps gain a decent profit.
The-Trader-Investor
Is it possible to make the lines stat at 9:30 Am EST instead of 2-3 PM?
pbghosh
@BTExpress, The lines will start at 9:15AM. 2-3PM is the range of the previous day.
nilswap
Hello Sir, i want This script to use in live market.
Horizontal lines are added but not as wanted.
I want them to add "one by one" when market starts will you please help me.Thanks in advance

study("Horizontal lines for UPTRENDING STOCK", overlay=true)

plot(low[250], trackprice=true, offset=-9999)

plot(low[235], trackprice=true, offset=-9999)

plot(low[220], trackprice=true, offset=-9999)

plot(low[115], trackprice=true, offset=-9999)

plot(low[100], trackprice=true, offset=-9999)

plot(low[85], trackprice=true, offset=-9999)

plot(low[70], trackprice=true, offset=-9999)

plot(low[55], trackprice=true, offset=-9999)

plot(low[40], trackprice=true, offset=-9999)

plot(low[25], trackprice=true, offset=-9999)

plot(low[10], trackprice=true, offset=-9999)

plot(low, color=#FFFFFFFF)
pbghosh
@nilswap, I am not able to understand your requirement. Why so many plot statements with low values?
nilswap
@pbghosh, actually i want to plot horizontal lines at low[10] ,low[25], low[40],low[55]...likewise untill market close.As per my study low of these candles act as support in up trending stock.The script works but i want it to plot these lines from day start to end of market session....
nilswap
@pbghosh, low of 10 th 25 th 40th 55 th likewse candles. Sorry for the error in writing .I wrote values in square bracket in comment section but it does not show there i don't know why....
pbghosh
@nilswap, May I know the timeframe of these candles?
Lebih