NexusFi: Find Your Edge


Home Menu

 





Opening Range Breakout


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one ABCTG with 18 posts (14 thanks)
    2. looks_two GustavMejlvang with 8 posts (2 thanks)
    3. looks_3 Gann Trader with 8 posts (1 thanks)
    4. looks_4 DougN with 7 posts (1 thanks)
      Best Posters
    1. looks_one Jeff65 with 9 thanks per post
    2. looks_two wldman with 1.5 thanks per post
    3. looks_3 ABCTG with 0.8 thanks per post
    4. looks_4 GustavMejlvang with 0.3 thanks per post
    1. trending_up 32,275 views
    2. thumb_up 32 thanks given
    3. group 16 followers
    1. forum 48 posts
    2. attach_file 7 attachments




 
Search this Thread

Opening Range Breakout

  #31 (permalink)
Gann Trader
New York, USA
 
Posts: 22 since Jan 2012
Thanks Given: 9
Thanks Received: 2

I only tried it with @ES not with the D at the end, it should not matter about the symbol, the D just designate the day session, it has to be something else, are you using the MC or TS platform

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
How to apply profiles
Traders Hideout
 
  #32 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

I tested it with Tradestation. Please try it with @ES.D then as the sessions are exactly what the strategy has problems with and why it doesn't work properly with @ES.
The reason for this is that the time settings are hard coded and the code would have to be changed to make it work fine on @ES in my opinion.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #33 (permalink)
Gann Trader
New York, USA
 
Posts: 22 since Jan 2012
Thanks Given: 9
Thanks Received: 2


ABCTG
WOW, thats amazing you are great at this, changing the symbol to ED made all the difference, I normally use ES because that represents the 24 hr Globexl session, I just noticed that the ED is just for the day session. Anyhow do you have any instructions on how to use this indicator, that is how to interpret the instructions that is plotted on the screen, there is a BroR_Sh1 and BroR_L1. Did you do the programming for this indicator and how difficult would it be to program some of the patterns from the Crabel book.
Thanks

Attached Thumbnails
Click image for larger version

Name:	orb.jpg
Views:	426
Size:	267.9 KB
ID:	138493  
Reply With Quote
  #34 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Gann Trader,

thanks. I didn't program that indicator, just made the ELD for you so that it would work. What it plots on the screen are the entries and their names. The difficulty to program a Crabel pattern depends from pattern to pattern obviously. Programming the OR Breakout with the stretch is not too hard.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #35 (permalink)
Gann Trader
New York, USA
 
Posts: 22 since Jan 2012
Thanks Given: 9
Thanks Received: 2

Guten Tag ABCTG
Just realized that you were located in Germany, all this time I thought you were in the USA, Yes I understand about the difficulty to program the various Crabel patterns, I read through the entire book and there are a few high percentage patterns that I would love to have programmed so as to test and review how reliable they are in todays market, actually it would not be necessary to program all the patterns mentioned in his book, you would just need to select a few, for example, the ORB NR4, ORB NR7, ID and ID/NR4
these are probably the best patterns, from your programming experience, how difficult do you believe it would be to program these patterns,
Danke

Gann Trader

Reply With Quote
  #36 (permalink)
w4rri0r
world's citizen
 
Posts: 45 since Oct 2015
Thanks Given: 10
Thanks Received: 7


ABCTG View Post
Gann Trader,

this code should compile fine in Tradestation 9.1. I am attaching it as ELD to this post.
I don't know the George Bysshe book, but from the code I can say it's not the Toby Crabel logic. If I recall correctly Crabel used a "stretch" in his Open Range Breakout and this code doesn't have that.

Regards,
ABCTG

Hi,
can you help me with a simple code? I've trie but it's really not my work......
I'm trying to code a simple breakout strategy:
> buy long (limit) if price goes 1rst minute candle + 0.01 cent
put a stop at 1rst minute low - 0.01 cent
position = distance from 1rst minute high and low / $fixed dollar amount

thanks!

Reply With Quote
  #37 (permalink)
GustavMejlvang
Copenhagen, Denmark
 
Posts: 15 since May 2017
Thanks Given: 6
Thanks Received: 3


ABCTG View Post
Gann Trader,

thanks. I didn't program that indicator, just made the ELD for you so that it would work. What it plots on the screen are the entries and their names. The difficulty to program a Crabel pattern depends from pattern to pattern obviously. Programming the OR Breakout with the stretch is not too hard.

Regards,
ABCTG

Hi ABC.

I have a problem with my Signal (ORB long system). It compiles, but no trades show up (EURGBP, 15min chart).

 
Code
[IntrabarOrderGeneration = True]

Inputs:

StartTime(0700),				//Start time of Open Range
EndTime(0900),				//End time of Open Range
price(Close),
OR_minimum(12),				//minimum size of OR
OR_extension(1),				//Extension of OR
Ema_length1(200), Ema_length2(21),
EMAspread(4);
{maybe include: Pointsize(0.0001) which is the actual point size of the instrument}

variables:

ORhigh(0),		//Open Range High
ORlow(999999),	//Open Range Low
Ema_current1(0),
Ema_current2(0),
Stop_lossMid(0),
EMA_spread(0),	//distance between EMA1 and 2
Trade_endingTime(0),	//ending time of the day for trades to be taken
Open_range(0),	//the OR in pips
Long_entry(0),	//buy-stop 1 pip above the OR high
MP(0);				//Market position (-1 = short, +1 = long)

Ema_Current1= XAverage(price,Ema_length1);
Ema_current2=XAverage(price,Ema_length2);
Open_range = ORhigh-ORlow;
EMA_spread = Ema_current2-Ema_current1;
Trade_endingTime=Time(1600);
Long_entry=(ORhigh+1 point);
Stop_lossMid=((ORhigh-ORlow)*0.5);


// Reset previous values
if (Date <> Date[1]) then begin
ORhigh		= 0;
ORlow		= 999999;
end;

//Open Range High and Low
if t>=StartTime and t<=EndTime then
begin
if High>ORhigh then ORhigh=High;
if Low<ORlow then ORlow=Low;
end;


//Trading criteria
if t>=StartTime and t<Trade_endingTime and Open_range > OR_minimum and Ema_current2>Ema_current1 and EMA_spread>EMAspread and low[1]>ORlow
then
begin

buy ("ORB_TrendLong")1 l contract next bar at Long_entry stop;
end;

if marketposition=1 then setstoploss_pt(stop_lossMid);
if marketposition=1 then setprofittarget
10:45
[IntrabarOrderGeneration = True]

Inputs:

StartTime(0700),				//Start time of Open Range
EndTime(0900),				//End time of Open Range
price(Close),
OR_minimum(12),				//minimum size of OR
OR_extension(1),				//Extension of OR
Ema_length1(200), Ema_length2(21),
EMAspread(4);
{maybe include: Pointsize(0.0001) which is the actual point size of the instrument}

variables:

ORhigh(0),		//Open Range High
ORlow(999999),	//Open Range Low
Ema_current1(0),
Ema_current2(0),
Stop_lossMid(0),
EMA_spread(0),	//distance between EMA1 and 2
Trade_endingTime(0),	//ending time of the day for trades to be taken
Open_range(0),	//the OR in pips
Long_entry(0),	//buy-stop 1 pip above the OR high
MP(0),				//Market position (-1 = short, +1 = long)
ORB_Target(0);

Ema_Current1= XAverage(price,Ema_length1);
Ema_current2=XAverage(price,Ema_length2);
Open_range = ORhigh-ORlow;
EMA_spread = Ema_current2-Ema_current1;
Trade_endingTime=Time(1600);
Long_entry=(ORhigh+1 point);
Stop_lossMid=((ORhigh-ORlow)*0.5);
ORB_Target=((OR_extension*Open_range)+ORhigh);


// Reset previous values
if (Date <> Date[1]) then begin
ORhigh		= 0;
ORlow		= 999999;
end;

//Open Range High and Low
if t>=StartTime and t<=EndTime then
begin
if High>ORhigh then ORhigh=High;
if Low<ORlow then ORlow=Low;
end;


//Trading criteria
if t>=StartTime and t<Trade_endingTime and Open_range > OR_minimum and Ema_current2>Ema_current1 and EMA_spread>EMAspread and low[1]>ORlow
then
begin

buy ("ORB_TrendLong") next bar at Long_entry stop;
end;

if marketposition=1 then setstoploss_pt(stop_lossMid);
if marketposition=1 then setprofittarget(ORB_Target);


//close at market at EOD if target is not met

if (Time=2230) and (MP=1) then
begin
sell this bar at close;
End;
I am a noob at EL, but I really don't understand why the signal does not produce any trades.

Thank you in advance for your help!

Reply With Quote
  #38 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

GustavMejlvang,

the first thing I'd suggest to check is, if there should have been entries based on the strategy logic on your chart.

If there should have been entries, check the variable values on those dates (using print statements for example https://www.multicharts.com/trading-software/index.php/Print) to see what is going on within your code.

This should help you in tracking down what's going on.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #39 (permalink)
GustavMejlvang
Copenhagen, Denmark
 
Posts: 15 since May 2017
Thanks Given: 6
Thanks Received: 3


ABCTG View Post
GustavMejlvang,

the first thing I'd suggest to check is, if there should have been entries based on the strategy logic on your chart.

If there should have been entries, check the variable values on those dates (using print statements for example to see what is going on within your code.

This should help you in tracking down what's going on.

Regards,

ABCTG

Yep, I did that already. There are no entries showing. Thanks, I will have a look at the print statement.

Reply With Quote
  #40 (permalink)
GustavMejlvang
Copenhagen, Denmark
 
Posts: 15 since May 2017
Thanks Given: 6
Thanks Received: 3



ABCTG View Post
GustavMejlvang,

the first thing I'd suggest to check is, if there should have been entries based on the strategy logic on your chart.

If there should have been entries, check the variable values on those dates (using print statements for example to see what is going on within your code.

This should help you in tracking down what's going on.

Regards,

ABCTG

I checked the variables on the dates where there should have been trades. Hmm, to be honest I don't know what to look for...

It seems that everything in my code is correct (it is obviously not, but can't spot the mistake)..

Reply With Quote




Last Updated on May 4, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts