Breakout strategy daily range issue - futures io
futures io

Breakout strategy daily range issue

Discussion in EasyLanguage Programming

    1. trending_up 2,462 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 0 attachments

Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

Search this Thread

Breakout strategy daily range issue

(login for full post details)
  #1 (permalink)
Bucharest, Romania
Posts: 58 since Mar 2022
Thanks: 36 given, 13 received

I tried to code a strategy based on the Open Range Breakout using the previous daily range as a reference: Buy the Open + 0.50 of the previous daily range.
I noticed that on Mondays, the previous daily range (Friday in this case) is not taken into consideration, and the strategy sometimes executes the trade but not at the predefined 0.50 value.

inputs: MyPerc(0.5), StartTime(300), EndTime(600);

vars: MaxSetup(0), MinSetup(0), MyRange(0);

   MyRange =  highd(1) - lowd(1);
   MaxSetup = opend(0) + MyRange*MyPerc;
   MinSetup = opend(0) - MyRange*MyPerc;

// Entries Long only
close < MaxSetup                                            and
EntriesToday(date[0]) < 1                                   and 
Time > StartTime                                            and 
Time < EndTime                                              then 

   Buy next bar at MaxSetup on Stop;

Note: I tried to define MyRange with High[1] of Data2 - Low[1] of Data2 since Data2 are daily bars, but the same issue persists, thank you.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Big Mo Indicator for NT8
Multi Time Frame High/Low/Median levels
help with take profit several targets
How do I create Strategy with the Second Entry indicator
in depth understanding of last, bid, and ask volume in c …
Best Threads (Most Thanked)
in the last 7 days on futures io
Is anyone actually making money?
88 thanks
An embarrassing, honest confession
25 thanks experience and review
8 thanks
Sierra vs. Ninja : why I chose .....
8 thanks
Want your NinjaTrader indicator created, free?
7 thanks
(login for full post details)
  #2 (permalink)
danville ca usa
Posts: 33 since Aug 2015
Thanks: 8 given, 35 received

are you trading futures... if you are then any reference to yesterday on monday will reference sunday's open where the futures market opens sunday afternoon... so on monday, yesterday is sunday, not friday.


Reply With Quote
The following user says Thank You to toucan94506bm for this post:
(login for full post details)
  #3 (permalink)
seattle washington
Posts: 54 since Feb 2019
Thanks: 10 given, 25 received

Yeah, I agree with toucan, it's the time. Depending upon what you are trading you may find success with StartTime(0930), EndTime(1600).

Reply With Quote
The following user says Thank You to abev for this post:

futures io Trading Community Platforms and Indicators EasyLanguage Programming > Breakout strategy daily range issue

Last Updated on June 5, 2022

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Copyright © 2023 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, 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.
no new posts