ChrisMoody

New Indicator!!! Opening Range_V1

Plots the Opening Range for the First Hour for Stocks and Forex. Option to Plot the first 30 Minutes Opening Range, or Both. See first Post for Specifics.
Remove from Favorite Scripts Add to Favorite Scripts
//Created by user ChrisMoody, with help from Alex in TechSupport and TheLark
//Currently works on Stocks
//Currently works on Forex but only based on the New York Session starting at 1700 East Coast Time
//Futurer Versions will have options to plot sessions bsed on Forex Europe Opening Range , Asia, etc.
study(title="CM_Opening-Range-V1", shorttitle="CM_OpenRnge-V1", overlay=true)
up60on = input(true, title="60 Minute Opening Range High")
down60on = input(true, title="60 Minute Opening Range Low")
up30on = input(false, title="30 Minute Opening Range High")
down30on = input(false, title="30 Minute Opening Range Low")

is_newbar(res) => change(time(res)) != 0 

adopt(r, s) => security(tickerid, r, s) 

high_range = valuewhen(is_newbar('D'),high,0)
low_range = valuewhen(is_newbar('D'),low,0)

high_rangeL = valuewhen(is_newbar('D'),high,0) 
low_rangeL = valuewhen(is_newbar('D'),low,0) 

up = plot(up60on ? adopt('60', high_range):na, color = lime, style=circles, linewidth=4)
down = plot(down60on ? adopt('60', low_range): na, color = #DC143C, style=circles, linewidth=4) 

trans60 = up60on ?  75 : 100
fill(up, down, color = white, transp=trans60)

up30 = plot(up30on ? adopt('30', high_rangeL): na, color = #7FFF00, style=circles, linewidth=2) 
down30 = plot(down30on ? adopt('30', low_rangeL): na, color = red, style=circles, linewidth=2) 

//trans30 = up30on ?  70 : 100
//fill(up30, down30, color = white, transp=trans30)
Hi Chris, Is there anyway to update this for futures? I'm looking to plot the 9:30am -10:30am EST opening range for Emini S&P futures. Thanks
Reply
Nice work!
Reply
Hi Chris, Great indicator. I see others have asked about different settings but to add to other comments, I am a forex trader and would like to be able to plot the range in Asia from 17:00 EST to 02:00 EST (540mins).
Many thanks for your great work.
Reply
Anxious to learn how many here are familiar with this instrument -
snapshot
and why it doesn't seem to get much attention. It trades round the clock and tracks the futures markets of the Dow 30, if I understand correctly. However, it's not the Far East but the Wall Street trading hours that are important in this market - it's when the real action happens - 9am-9:30am I believe. For me in London it's 2:30-9:00PM, which already can be confusing. Do you think I will ever be able to apply this code to track the wall street opening range, or would you propose a more suitable code for this issue? If ANYONE can shed any light on their experience trading this, please do so here or by PM.
+1 Reply
First why doesn't it seem to get much attention:

US residents can't trade it...unless they ca no pen up a trading account overseas with roughly a million dollars. Theres a few loopholes regarding creating a LLC (Business entity) and documenting you have a high net worth.

So this leaves us with people who live outside the United States who have a spot Forex Account...which is the majority of traders outside the US. The vast majority of those traders trade the Forex market exclusively. If they do trade (CFD's) I may have misspelled that...then the vast majority will trade the equivalent of the ES futures contract (S&P 500) vs. the Dow, or Spot Gold or Oil. Even in the US the Dow futures have pretty light volume...although there is plenty of volume to trade it.

How can you trade it:
The session can be customized to start plotting that indicator at the US open 9:30 New York time. Or you could simply use symbol DIA, the Dow 30 ETF on your chart...and if it breaks the opening range enter in the US30 you have access to. Th entries and exits should be 99.9% the same no matter which symbol you plot on the chart...Since the US30 is based on the DOW 30 if the prices were different their would be huge Arbitrage opportunities institutions would capitalize on...due to the liquidity those almost never exist. In my opinion the Dow futures trade "Cleaner" than the ES contract by far. One benefit of plotting the DIA symbol is you will be able to see gaps that the US30 won't show you. And you have to take Gaps in to account with the opening range trade....but that's a topic for another time....
Reply
Hey Chris, maybe you can help me uut here. Why is it that from the 19th to the 20th of June, SPY chart Gapped down at the open on the tradingview chart, when actually we gapped up ? Now, prior support/resistance line mismatch due to a chart glitch? Any idea?
Reply
I'll look in to it...have a new version I'm going to try and code today...slammed next few hours...If I don't respond by end of day remind me tomorrow...
Reply
pcmourao ChrisMoody
Have u checked the glitch out yet?
Reply
Interesting...The answer is they payed out a dividend. Here is what is confusing me. I just opened two platforms that both use Premium data from two different sources. One of the platforms back adjusted for the dividend and shows a gap up. The platform with what I would consider the highest quality data you can get...Period... Shows the same Gap down. Both of those platforms show a closing price of 198.20 based on the 7/3/2014 close... TradingView shows the same.

I'll call the Premium Data Vendor tomorrow and ask why they didn't back adjust the price and see what they say. And I'll call the other data vendor and see why they did back adjust the price. I don't trade stocks...but I know if a individual stock pays a dividend the price droops b/c the company has less money on their balance sheet so Wall Street adjusts the price accordingly. So my gut call is this is a rare situation where the SPY didn't show the same intraday chart as the SPX Index. I'll try and find out why one data vendor would show the historical prices different from the other one and TradingView....
Reply
pcmourao ChrisMoody
thanks
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out