• LIMITED TIME ONLY: Take $40 off VIP with code: BTD40.

Opening Range Breakout NinjaTrader-->TOS

Beltrame1

New member
VIP
Hello everyone,
I got this from in here somewhere (I thiink!) but I believe this is for Ninja Trader not TOS and if this is true, would someone be kind enough to convert it to TOS?
Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

// © theamazingninja


//@version=4

study(title="My Opening Range Breakout", shorttitle="MyORB", overlay=true)


//Opening Range Timeframe Inputs

up5on = input(true, title="5 Minute Opening Range High")

down5on = input(true, title="5 Minute Opening Range Low")

up15on = input(false, title="15 Minute Opening Range High")

down15on = input(false, title="15 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(syminfo.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(up5on ? adopt('05', high_range):na, color = color.lime, style=plot.style_circles, linewidth=4)

down = plot(down5on ? adopt('05', low_range): na, color = #DC143C, style=plot.style_circles, linewidth=4)



trans15 = up15on ? 75 : 100

fill(up, down, color = color.white, transp=trans15)



up15 = plot(up15on ? adopt('15', high_rangeL): na, color = #7FFF00, style=plot.style_circles, linewidth=2)

down15 = plot(down15on ? adopt('15', low_rangeL): na, color = color.red, style=plot.style_circles, linewidth=2)



up30 = plot(up30on ? adopt('30', high_rangeL): na, color = #7FFF00, style=plot.style_circles, linewidth=2)

down30 = plot(down30on ? adopt('30', low_rangeL): na, color = color.red, style=plot.style_circles, linewidth=2)



//plot fib extensions

TurnFibsOn = input(true, title="Turn on Fib Levels")

//fib_mid = (ORH + ORL) / 2

OR_Width = up5on and down5on ? (adopt('05', high_range)-adopt('05', low_range)) : up15on and down15on ? (adopt('15', high_rangeL)-adopt('15', low_rangeL)) : up30on and down30on ? (adopt('30', high_rangeL)-adopt('30', low_rangeL)): na



//fib extensions

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 0.272 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 0.272 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 0.272 : na, title="Fib Ext 1", color=color.green, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 0.618 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 0.618 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 0.618 : na, title="Fib Ext 1", color=color.green, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 1.0 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 1.0 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 1.0 : na, title="Fib Ext 2", color=color.green, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 1.272 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 1.272 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 1.272 : na, title="Fib Ext 1", color=color.green, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 1.618 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 1.618 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 1.618 : na, title="Fib Ext 1", color=color.green, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 2.0 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 2.0 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 2.0 : na, title="Fib Ext 1", color=color.green, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 2.618 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 2.618 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 2.618 : na, title="Fib Ext 1", color=color.green, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', high_range) + OR_Width * 3.236 : TurnFibsOn and up15on and down15on ? adopt('15', high_rangeL) + OR_Width * 3.236 : TurnFibsOn and up30on and down30on ? adopt('30', high_rangeL) + OR_Width * 3.236 : na, title="Fib Ext 1", color=color.green, style=plot.style_circles, linewidth=1)



//fib retracements

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -0.272 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -0.272 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -0.272 : na, title="Fib Ext 1", color=color.red, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -0.618 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -0.618 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -0.618 : na, title="Fib Ext 1", color=color.red, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -1.0 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -1.0 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -1.0 : na, title="Fib Ext 2", color=color.red, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -1.272 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -1.272 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -1.272 : na, title="Fib Ext 1", color=color.red, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -1.618 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -1.618 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -1.618 : na, title="Fib Ext 1", color=color.red, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -2.0 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -2.0 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -2.0 : na, title="Fib Ext 1", color=color.red, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -2.618 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -2.618 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -2.618 : na, title="Fib Ext 1", color=color.red, style=plot.style_circles, linewidth=1)

plot(TurnFibsOn and up5on and down5on ? adopt('05', low_range) + OR_Width * -3.236 : TurnFibsOn and up15on and down15on ? adopt('15', low_rangeL) + OR_Width * -3.236 : TurnFibsOn and up30on and down30on ? adopt('30', low_rangeL) + OR_Width * -3.236 : na, title="Fib Ext 1", color=color.red, style=plot.style_circles, linewidth=1)
 
Last edited by a moderator:

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
@Beltrame1
Want A Script Converted To TOS?
Be aware fulfillment of requests for conversions from other platforms seldom occur as there is no utility to do so. With 1000s of TOS studies on this forum, a better approach: try out existing indicators then if necessary post questions on how to customize it.

It is possible that someone has a TOS version of this indicator in their repository or something similar.
Help us help you:
Provide a link to the Indicator.
Provide at least one image of the whole chart and then any close-up screenshots of details you want to highlight.
Unsure of how to upload screenshots to the forum, Here are directions.

To garner interest in your indicator:
  • Explain in detail why you think this one is superior to the existing Opening Range Breakout Indicator.
  • Illustrate with screenshots: the comparisons, and differences.
Putting in the effort to provide the images and the explanations shows your level of interest in working on this conversion as a collaboration. The more abundant the information you provide, the better chance that some enterprising poster might become interested in making enhancements to an existing TOS indicator or even creating one from scratch.

When you are posting your question, please follow the guidelines found here:
https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-58016

When posting your question, make sure to include what aggregations you trade, examples of equities/futures.
Lastly, to generate enough interest for a poster to work on this, make sure you explain how this will enhance our trading.
 
Last edited:

Similar threads

Top