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 31,864 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

  #41 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

GustavMejlvang,

what did you check exactly i.e. what's the code you used for the check?

It probably comes down to a settings or setup issue, but without knowing what you used exactly for inputs, strategy properties etc. one could only guess.
Using your default inputs on EURUSD for example, the condition "EMA_spread>EMAspread" will not become true (unless EURUSD trades a lot higher).

Regards,

ABCTG

Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Are there any eval firms that allow you to sink to your …
Traders Hideout
 

  #42 (permalink)
GustavMejlvang
Copenhagen, Denmark
 
Posts: 15 since May 2017
Thanks Given: 6
Thanks Received: 3


ABCTG View Post
GustavMejlvang,

what did you check exactly i.e. what's the code you used for the check?

It probably comes down to a settings or setup issue, but without knowing what you used exactly for inputs, strategy properties etc. one could only guess.
Using your default inputs on EURUSD for example, the condition "EMA_spread>EMAspread" will not become true (unless EURUSD trades a lot higher).

Regards,

ABCTG

Hmm, that's weird as that coindition just tells that the difference between the two EMA's (200+21) should be more than 4 pips.

I did not use a code to check, I just went back and looked at some dates where there should have been trades and there wasn't. Sorry ABC, I am a beginner in EL and this is my first attempt to create my own signal. I have played around in EL with some of the build-in signals but this is my first month lol.

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



ABCTG View Post
GustavMejlvang,

what did you check exactly i.e. what's the code you used for the check?

It probably comes down to a settings or setup issue, but without knowing what you used exactly for inputs, strategy properties etc. one could only guess.
Using your default inputs on EURUSD for example, the condition "EMA_spread>EMAspread" will not become true (unless EURUSD trades a lot higher).

Regards,

ABCTG

I really appreciate your help btw!! Thanks a lot

Reply With Quote
  #44 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

GustavMejlvang,

check this using "print" and see if it does what you think it does.

Regards,

ABCTG


GustavMejlvang View Post
Hmm, that's weird as that coindition just tells that the difference between the two EMA's (200+21) should be more than 4 pips.


Follow me on Twitter Reply With Quote
  #45 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

GustavMejlvang,

you are welcome. You can show your appreciation for posts here on futures.io by clicking the "Thanks" button next to the post.

Regards,

ABCTG


GustavMejlvang View Post
I really appreciate your help btw!! Thanks a lot


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


ABCTG View Post
GustavMejlvang,

you are welcome. You can show your appreciation for posts here on futures.io by clicking the "Thanks" button next to the post.

Regards,

ABCTG

I have now got it to work.

Now, I have one last problem. And that is that I have a rule that the price (long setup) after the OR range has formed 07-09 cannot break the low of the OR. What I have now is this:
 
Code
//Trading criteria
condition1= Time>=EndTime and time<=lastTradeTime and ((ORhigh-ORlow)>0.0012) and ((Ema_current2-Ema_current1)>0.0004)and Ema_current2>Ema_current1;

condition2= Time>=EndTime and low[1]>ORlow and tradestoday<1;


if time>=EndTime and time<=lastTradeTime and condition1 and condition2

then
begin


buy ("ORB_TrendLong") next bar at ORhigh stop;
But it still takes trade even if the low of the OR has been broken. WHAT I WANT is the script to end IF a low of a bar AFTER 09 breaks the OR low.

Just cannot figure out how to do a statement like that.....

I really hope you can help me out

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


GustavMejlvang View Post
I have now got it to work.

Now, I have one last problem. And that is that I have a rule that the price (long setup) after the OR range has formed 07-09 cannot break the low of the OR. What I have now is this:
 
Code
//Trading criteria
condition1= Time>=EndTime and time<=lastTradeTime and ((ORhigh-ORlow)>0.0012) and ((Ema_current2-Ema_current1)>0.0004)and Ema_current2>Ema_current1;

condition2= Time>=EndTime and low[1]>ORlow and tradestoday<1;


if time>=EndTime and time<=lastTradeTime and condition1 and condition2

then
begin


buy ("ORB_TrendLong") next bar at ORhigh stop;
But it still takes trade even if the low of the OR has been broken. WHAT I WANT is the script to end IF a low of a bar AFTER 09 breaks the OR low.

Just cannot figure out how to do a statement like that.....

I really hope you can help me out

Do you know if there is a function like:// if low<the 0900 low, then end. else // So the function can refer back to the 0900 bar, bar efter bar?

Reply With Quote
  #48 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

GustavMejlvang,

there is no function that will do that exactly, but you can code your own functionality.

Your code would have to save the low at 900 (or what ever value you look at - the OR Low for example) in a variable. Then when the low of bar is less than this variable, you can set a boolean variable to false.
This boolean variable can then be included in your order condition checks, so that orders can only be sent if this variable is "true" (besides your other conditions).
The last thing you'd have to do is to reset this variable every time when you want to allow trading again (for example at the beginning of the opening range period).

Regards,

ABCTG


GustavMejlvang View Post
Do you know if there is a function like:// if low<the 0900 low, then end. else // So the function can refer back to the 0900 bar, bar efter bar?


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


ABCTG View Post
GustavMejlvang,

there is no function that will do that exactly, but you can code your own functionality.

Your code would have to save the low at 900 (or what ever value you look at - the OR Low for example) in a variable. Then when the low of bar is less than this variable, you can set a boolean variable to false.
This boolean variable can then be included in your order condition checks, so that orders can only be sent if this variable is "true" (besides your other conditions).
The last thing you'd have to do is to reset this variable every time when you want to allow trading again (for example at the beginning of the opening range period).

Regards,

ABCTG

Thank you VERY much! Now I know what to do. Will probably take some time and tries, but at least there is a way.

Have a fantastic day!

Reply With Quote
Thanked by:





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