Timed breakout box - EasyLanguage Programming | futures io social day trading
futures io futures trading


Timed breakout box
Updated: Views / Replies:4,619 / 17
Created: by TwoHands Attachments:3

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 90,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

Reply
 3  
 
Thread Tools Search this Thread
 

Timed breakout box

  #1 (permalink)
Elite Member
Fort Lauderdale, Florida
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: ES
 
Posts: 111 since Apr 2011
Thanks: 97 given, 149 received

Timed breakout box

Has anyone written or know where I can find a breakout box? I'd like it to allow me to input start and end times and show the high and low of that period. Also need it to automatically change for each day based on the chart's session hours.

The image is using manually entered horizontal and vertical lines to give an idea what I'm looking for.

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

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


Have that available for NinjaTrader, but not for TradeStation.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #4 (permalink)
Scarecrow
CA USA
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: DDT+land/Rithmic/IQ
Favorite Futures: S&P500,6E,YM
 
program's Avatar
 
Posts: 100 since Nov 2010
Thanks: 127 given, 63 received

This might get you started in the right direction... it did for me.
should work for TS ORB

I have approximate answers, possible beliefs and different degrees of certainty of different things. But I'm not absolutely sure of anything and there are many things i don't know anything about.
Reply With Quote
The following user says Thank You to program for this post:
 
  #5 (permalink)
Elite Member
Fort Lauderdale, Florida
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: ES
 
Posts: 111 since Apr 2011
Thanks: 97 given, 149 received


program View Post
This might get you started in the right direction... it did for me.
should work for TS ORB

Thanks Program, but I don't think I can use a .pla file in Tradestation.

Reply With Quote
 
  #6 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary

in ninja we call it open range indicator maybe you can search for the same thing in TS.

Reply With Quote
The following user says Thank You to cory for this post:
 
  #7 (permalink)
Elite Member
Fort Lauderdale, Florida
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: ES
 
Posts: 111 since Apr 2011
Thanks: 97 given, 149 received


cory View Post
in ninja we call it open range indicator maybe you can search for the same thing in TS.

Thanks Cory. Found one but not for Tradestation. The hunt continues

Reply With Quote
 
  #8 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary

maybe this
https://futures.io/easylanguage-programming/6646-openning-range-breakout.html

Reply With Quote
The following user says Thank You to cory for this post:
 
  #9 (permalink)
Elite Member
Fort Lauderdale, Florida
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: ES
 
Posts: 111 since Apr 2011
Thanks: 97 given, 149 received



Alas doesn't compile in TS 9.0. I was also looking more for an indicator than an automated strategy, which this seems to be.

Lines 12 & 45 Position information function not allowed in a study

 
Code
Input:
   orb(0.3);
Variables:
   MP(0),
   TodaysOpen(0),
   MyTrueRange(0), 
   PreTrueRange(0),
   tempOpen(0), 
   answer(0), 
   answerSell(0);

MP = MarketPosition;

// New Day

If date <> date[1] then begin
   TodaysOpen = Open;
   PreTrueRange = TrueHigh[1] of data2 - TrueLow[1] of data2;
   answer = TodaysOpen + (PreTrueRange * orb);
   answerSell = TodaysOpen - (PreTrueRange * orb);
end;

// Enter trade on breakout

If ( Time >= 900 ) And ( Time <= 1430 ) And ( MP = 0 ) And ( EntriesToday(Date) = 0 )  Then
Begin
   Buy ("LE") next bar at answer stop;
   Sellshort("SE") next bar at answerSell stop;
End;

// Stop Loss

If ( MP = 1 ) Then Sell next bar at answerSell stop;
If ( MP = -1 ) Then Buy to cover next bar at answer stop;
   
// Exit at end-of-day

If ( Time = 1500 ) And ( MP <> 0 ) Then
Begin
   Sell this bar at close;
   Buy to cover this bar at close;
End;

{************************************************* *********}
IF MarketPosition = 1 THEN BEGIN
Alert("Still Long");
END;

Reply With Quote
 
  #10 (permalink)
Scarecrow
CA USA
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: DDT+land/Rithmic/IQ
Favorite Futures: S&P500,6E,YM
 
program's Avatar
 
Posts: 100 since Nov 2010
Thanks: 127 given, 63 received

Code


Here is the code, copy and paste... maybe with a little tweaking it will compile in TS.

 
Code
Inputs:
	StartTime(800),						// Start time of session
	EndTime(900),							// End time of openingsrange
	ExtendOpeningsRange(False),		// Extending the openings range
	TextOffSet(1),							// The distance between the text and the lines, in points of the pricescale
	TextAlignment(2),						// Alignment of the text object: 0: to right of bar, 1: to left of bar, 2: centered on bar
	FontSize(9),							// Font size of the text objects
	FontName("Verdana"),					// Font type of the text objects
	High_Color(RGB(0, 255, 0)),		// Color for the high line and text
	Mid_Color(RGB(255, 128, 0)),		// Color for the mid line and text
	Low_Color(RGB(255, 0, 0)),			// Color for the low line and text
	High_Line_Tickness(2),				// Tickness of the high line
	Mid_Line_Tickness(1),				// Tickness of the middle line
	Low_Line_Tickness(2),				// Tickness of the low line
	High_Line_Style(2),					// Style of the high line
	Mid_Line_Style(3),					// Style of the mid line
	Low_Line_Style(2)						// Style of the low line
	;

Variables:
	sessionStart(SessionStartTime(0, 1)), opRangeHigh(0), opRangeLow(999999), barsSinceStart(0), alreadyPlotted(False),
	numOfDecimals(Round(Log(PriceScale) / Log(10), 0)), offset(TextOffSet * (MinMove / PriceScale)), lineOffset(0), 
	tlHigh(0), tlLow(0), tlMid(0), opRangeActive(False),
	sessionEnd(SessionEndTime(0, SessionCount(0)) * 100), beginTime(StartTime * 100), endingTime(EndTime * 100);

// Reset previous values
if (Date <> Date[1]) then begin
	opRangeHigh		= 0;
	opRangeLow		= 999999;
	barsSinceStart = 0;
	alreadyPlotted	= False;
	opRangeActive	= True;
end;	
	
// Collect openingsbar range
if (Time_s >= beginTime) and (Time_s <= endingTime) then begin
	opRangeHigh 	= MaxList(High, opRangeHigh);
	opRangeLow		= MinList(Low, opRangeLow);
	barsSinceStart	= barsSinceStart + 1;
end;

// Start plotting
if (Time_s >= endingTime) and (alreadyPlotted = False) then begin

	// Save values for the trendlines (needed for extending later on)
	tlHigh 		= opRangeHigh;
	tlMid			= (opRangeHigh + opRangeLow) * 0.50;
	tlLow 		= opRangeLow;
		
	// Plot the text
	value20 = IFF(barsSinceStart > 1, barsSinceStart - 1, barsSinceStart);
	value1 = Text_New_s(Date, Time_s[value20 * 0.50], tlHigh + offset, 			Text("High = ", NumToStr(tlHigh, numOfDecimals)));
	value2 = Text_New_s(Date, Time_s[value20 * 0.50], tlLow - (offset * 2), 	Text("Midpoint = ", NumToStr(tlMid, numOfDecimals)));
	value3 = Text_New_s(Date, Time_s[value20 * 0.50], tlLow - offset, 			Text("Low = ", NumToStr(tlLow, numOfDecimals)));
	
	// Change colour of text instrument
	Text_SetColor(value1, High_Color);
	Text_SetColor(value2, Mid_Color);
	Text_SetColor(value3, Low_Color);
	
	// Change the alignment of the text object
	Text_SetStyle(value1, TextAlignment, 2);
	Text_SetStyle(value2, TextAlignment, 2);
	Text_SetStyle(value3, TextAlignment, 2);
	
	// Change the font size
	Text_SetSize(value1, FontSize);
	Text_SetSize(value2, FontSize);
	Text_SetSize(value3, FontSize);
	
	// Change the font type
	Text_SetFontName(value1, FontName);
	Text_SetFontName(value2, FontName);
	Text_SetFontName(value3, FontName);
	
	// Draw the trendlines
	value10 = TL_New_s(Date, Time_s[value20], tlHigh, Date, Time_s, tlHigh);
	value11 = TL_New_s(Date, Time_s[value20], tlMid, Date, Time_s, tlMid);
	value12 = TL_New_s(Date, Time_s[value20], tlLow, Date, Time_s, tlLow);
	
	// Change colour of the lines
	TL_SetColor(value10, High_Color);
	Tl_SetColor(value11, Mid_Color);
	TL_SetColor(value12, Low_Color);
	
	// Change the style of the lines
	TL_SetStyle(value10, High_Line_Style);
	TL_SetStyle(value11, Mid_Line_Style);
	TL_SetStyle(value12, Low_Line_Style);
	
	// Change the width of the lines
	TL_SetSize(value10, High_Line_Tickness);
	TL_SetSize(value11, Mid_Line_Tickness);
	TL_SetSize(value12, Low_Line_Tickness);

	alreadyPlotted = True;
end;

if (ExtendOpeningsRange = True) and (opRangeActive = True) and (Time_s < sessionEnd) and (Time_s > endingTime) then begin

	// Check if the openings range is still valid
	if (Close > tlHigh) or (Close < tlLow) then 
		opRangeActive = False;
		
	// Only extend lines as long as the openings range isn't violated
	if (opRangeActive = True) then begin
		value20 = TL_SetEnd_s(value10, Date, Time_s, tlHigh);
	   value21 = TL_SetEnd_s(value11, Date, Time_s, (tlHigh + tlLow) * 0.50);
		value22 = TL_SetEnd_s(value12, Date, Time_s, tlLow);
	end;

end; //: ExtendOpeningsRange

I have approximate answers, possible beliefs and different degrees of certainty of different things. But I'm not absolutely sure of anything and there are many things i don't know anything about.
Reply With Quote
The following user says Thank You to program for this post:

Reply



futures io > > > > > Timed breakout box

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
News Breakout!! kinkeadfx Currency Futures 1 July 25th, 2011 09:40 PM
Volume Breakout help ?.... isarhodes NinjaTrader Programming 3 July 11th, 2011 01:52 PM
Stall during breakout equals... ? josh Traders Hideout 2 March 19th, 2011 02:48 PM
CL Breakout tderrick Commodities Futures Trading 2 October 6th, 2010 01:08 PM
Timed exit in auto strategy nanobiotech NinjaTrader Programming 2 December 28th, 2009 08:57 PM


All times are GMT -4. The time now is 08:50 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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
Page generated 2017-12-16 in 0.12 seconds with 20 queries on phoenix via your IP 54.160.245.121