Opening Range Breakout Indicator for ThinkorSwim

N

nab

New member
Hello guys, my first and thank for all the info here. I'm looking someone to help to covert this Tradingview indicator to TOS. I know there is ORB but I'm really interest in this because it gives ranged based on PM.
Thank you

Code:
//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)
 
Last edited by a moderator:
BenTen

BenTen

Administrative
Staff
VIP
@nab How is this different from the ORB indicator posted on the first page of this thread?
 
N

nab

New member
@BenTen Hi Ben, I find ORB gives 30/60 bit later where this is bit sooner. Also, also in TV i can set alerts if if it is crossing ORB 30 or 60. You cannot; unless, I don't know how to?
 
BenTen

BenTen

Administrative
Staff
VIP
@nab What do you mean 30/60 bit later? To set up alerts, you need to create a scanner, save the scanner as a watchlist, and then select the option to get alerted for when scan results change.
 
J

jonamez82

New member
@BenTen any way to remove bubbles "PC and RO" that are plotted
 
Vince Field

Vince Field

New member
@BenTen Hey, I have a couple questions if you don't mind.

You mentioned that you use Heikin Ashi candles. I understand how they work and the advantages and disadvantages of them. I'm curious as to why you use them as opposed to normal candles.

I'm also wondering about the target points. Do you use the targets included in Mobius' indicator? I saw the version with the fib targets and thought it looked interesting. Any thoughts on the difference between these different targets? What targets do you use?

Thanks!
 
BenTen

BenTen

Administrative
Staff
VIP
@Vince Field It has been a while since I last use this setup. The Heikin Ashi candles were for trend detection. I do not take advantage of the additional lines such as Risk on, Risk off, and target points.
 
Vince Field

Vince Field

New member
@BenTen Good to know. I assume you've found a more effective setup since then. If you don't mind sharing, I'd be interested to hear about your current day trading setup.
 
U

ukd1506

New member
Hello Ben,

I loaded this to TOS successfully, I could on top 2ndT & 3rdT in 1min char only for few tickers

Are they targets? if yes in what cases it may reach ?
 

Similar threads

Top