weekly High & Low S&R breakout strategy on the daily timeframe - futures io
futures io



weekly High & Low S&R breakout strategy on the daily timeframe


Discussion in EasyLanguage Programming

Updated
    1. trending_up 833 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 1 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
 

weekly High & Low S&R breakout strategy on the daily timeframe

(login for full post details)
  #1 (permalink)
Stranderik
Skien, Norway
 
 
Posts: 5 since Jun 2022
Thanks: 1 given, 0 received

Hi, everyone!
Iím trying to code a weekly High & Low S&R breakout strategy on the daily timeframe.

On the weekly timeframe the strategy would simply be:
Buy next bar at High Stop;
Sellshort next bar at Low Stop;

Very simple.
But to do this on the daily timeframe with the last week High/Low isnít as easy.

I can get close by using the OHLCPeriodsAgo function and create a weekly channel that I use for my Buy and Sellshort orders, only problem is it doesnít seem to work before Monday has closed, making every breakout on Monday stay with the previous weeks period High/Low.





Is there a better way of doing this or can the OHLCPeriodsAgo function be modified so that Mondays also work as intended?

Appreciate all the help I can get.
Stranderik

Reply With Quote

Can you help answer these questions
from other members on futures io?
Multi Time Frame High/Low/Median levels
NinjaTrader
help with take profit several targets
TradeStation
in depth understanding of last, bid, and ask volume in c …
NinjaTrader
NT8 Order Management Strategy
The Elite Circle
Market on Close data within IB
Platforms and Indicators
 
 
(login for full post details)
  #2 (permalink)
Stranderik
Skien, Norway
 
 
Posts: 5 since Jun 2022
Thanks: 1 given, 0 received

Oh, and here is the code for plotting the weekly channels:

Vars: oPeriodOpen1(0), oPeriodHigh1(0), oPeriodLow1(0), oPeriodClose1(0),
oPeriodOpen2(0), oPeriodHigh2(0), oPeriodLow2(0), oPeriodClose2(0);

// OHLCPeriodsAgo( PeriodType, PeriodsAgo, oPeriodOpen, oPeriodHigh, oPeriodLow, oPeriodClose )
// PeriodType sets the time period on which to base values (1 = Day, 2 = Week, 3 = Month, 4 = Year)

Value1 = OHLCPeriodsAgo( 2, 1, oPeriodOpen1, oPeriodHigh1, oPeriodLow1, oPeriodClose1 );

Value3 = oPeriodHigh1;
Value4 = oPeriodLow1;

Plot1( Value3 );
Plot2( Value4 );


And here is the code for the strategy:

Vars: oPeriodOpen1(0), oPeriodHigh1(0), oPeriodLow1(0), oPeriodClose1(0),
oPeriodOpen2(0), oPeriodHigh2(0), oPeriodLow2(0), oPeriodClose2(0);

// OHLCPeriodsAgo( PeriodType, PeriodsAgo, oPeriodOpen, oPeriodHigh, oPeriodLow, oPeriodClose )
// PeriodType sets the time period on which to base values (1 = Day, 2 = Week, 3 = Month, 4 = Year)

Value1 = OHLCPeriodsAgo( 2, 1, oPeriodOpen1, oPeriodHigh1, oPeriodLow1, oPeriodClose1 );

Value3 = oPeriodHigh1;
Value4 = oPeriodLow1;

Buy("BuyLong") next bar at Value3 Stop;
Sellshort("SellShort") next bar at Value4 Stop;

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > weekly High & Low S&R breakout strategy on the daily timeframe


Last Updated on November 15, 2022


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



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