Help finishing a script plotting opening 30 min levels - ThinkOrSwim | futures io social day trading
futures io futures trading

Help finishing a script plotting opening 30 min levels
Updated: Views / Replies:100 / 1
Created: by nueces123 Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

Help finishing a script plotting opening 30 min levels

  #1 (permalink)
Austin, Texas
Posts: 1 since Aug 2019
Thanks: 0 given, 0 received

Help finishing a script plotting opening 30 min levels

I need help finishing a script I pieced off of here. I want to plot the high, low and then 25%, 50% and 75%of the opening 30 minute range. The script I have pasted does this but then it goes to the next 30 minutes and plots the high, low etc. of that and so on and so on as the pic I have attached shows. I just want the first 30 minutes plotted and then for those levels to extend for the rest of the day. Any help is appreciated. The way I plan to use this is those levels tend to be important levels the rest of the day, especially the 50% mark. It is based off the Michael Shadkin rules.

Please register on to view futures trading content such as post attachment(s), image(s), and screenshot(s).

plot hod = high(period = AggregationPeriod.THIRTY_MIN);
hod.SetDefaultColor(CreateColor(245, 127, 23));

plot lod = low(period = AggregationPeriod.THIRTY_MIN);
lod.SetDefaultColor(CreateColor(245, 127, 23));

def range = hod - lod;

plot hod764 = (range * 0.75) + lod;
hod764.SetDefaultColor(CreateColor(251, 192, 45));

plot lod236 = (range * 0.25) + lod;
lod236.SetDefaultColor(CreateColor(251, 192, 45));

plot mid50 = (range * 0.5) + lod;
mid50.SetDefaultColor(CreateColor(255, 235, 59));

hod.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
lod.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
hod764.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
lod236.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);
mid50.SetPaintingStrategy (PaintingStrategy.HORIZONTAL);

Reply With Quote
  #2 (permalink)
Seattle, WA/USA
Trading Experience: Intermediate
Platform: TOS, TS
Favorite Futures: Forex, crude
Posts: 49 since Sep 2016
Thanks: 7 given, 15 received

The issue is that your aggregation period is simply looking at the 30 minute time buckets. You need to delineate which 30 minute period you are interested in. Check out this well commented example from reddit:
input opentime = 0930;
input ORend = 1000;
input opacity = .7;
def na = Double.NaN;
# Check if the opening range time is now
def ORActive = if GetLastDay() == GetDay() and SecondsFromTime(opentime) >= 0 and SecondsFromTime(ORend) < 
0 then 1 else 0;
# Track the OR high and low
def ORHigh = if ORActive then high else na;
def ORLow = if ORActive then low else na;
# Plot the OR high and low
plot ORAH = if GetLastDay() != GetDay() or !ORActive then na else HighestAll(ORHigh);
plot ORAL = if GetLastDay() != GetDay() or !ORActive then na else LowestAll(ORLow);
plot ORH = if GetLastDay() != GetDay() or SecondsFromTime(ORend) < 0 then na else HighestAll(ORHigh);
plot ORL = if GetLastDay() != GetDay() or SecondsFromTime(ORend) < 0 then na else LowestAll(ORLow);
# Formatting
# Add Cloud creates the shading
AddCloud(ORH, ORL);
AddCloud(ORAL, ORAH);
# Alerts:
def alerttrigger = if (high >= ORH and low <= ORH) or (high >= ORL and low <= ORL) then 1 else 0; #replace the 1 with 
your definition
input alerttext = "OR Breakout!";
input UseAlerts = {false, default true};
input AlertType = {default "BAR", "ONCE", "TICK"};
def at = AlertType;
input AlertSound = {"Bell", "Chimes", default "Ding", "NoSound", "Ring"};
Alert(alerttrigger and UseAlerts, alerttext, if at == 1 then Alert.ONCE else if at == 2 then Alert.TICK else Alert.BAR, 
modify that with your fibs, desired colors, and painting styles and voila!

Follow me on Twitter Reply With Quote


futures io > > > > Help finishing a script plotting opening 30 min levels

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading


Webinar: The Best Entries and Exits in trading & in life w/Agustin Lebron

Elite only

Webinar: NinjaTrader 8 Newest Features Release Sneak Peek

Sep 26

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with 5 min Opening Range breakout/breakdown bobbyb EasyLanguage Programming 2 July 23rd, 2019 03:10 AM
Help setting up 50 EMA with 1 min, 5 min, 15 min time intervals NCSUWolfpack99 TradeStation 1 January 28th, 2019 03:51 AM
15 min and 60 min MA on 5 min chart SanSan ThinkOrSwim 3 May 25th, 2018 01:28 PM
alert works on 1-min, but not on 60-min epictetus EasyLanguage Programming 2 May 9th, 2011 02:06 PM
need help finishing indicator GoldStandard The Elite Circle 7 March 5th, 2010 05:24 PM

All times are GMT -4. The time now is 05:53 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts