NexusFi: Find Your Edge


Home Menu

 





Drawing boxes around Market Sessions...


Discussion in Sierra Chart

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




 
Search this Thread

Drawing boxes around Market Sessions...

  #1 (permalink)
 funk101 
Margate, Fl.
 
Experience: Advanced
Platform: SierraCharts
Trading: Futures
Posts: 28 since Jun 2009
Thanks Given: 5
Thanks Received: 5

Is there a study that draws a rectangle around each of the market sessions? For instance, a rectangle would be drawn from the beginning of New York open to New York close and the rectangle's height would be *that* sessions highest-high to it's lowest-low. The same would hold true for London, Sydney, Asia. If there isn't one that exists, is there some code that can point me in the right direction?

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
34 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #2 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: Stage5, FCM:Dorman, Data:Denali, Routing:Teton
Trading: YM ES NQ
Posts: 474 since Nov 2009
Thanks Given: 219
Thanks Received: 603


funk101 View Post
Is there a study that draws a rectangle around each of the market sessions? For instance, a rectangle would be drawn from the beginning of New York open to New York close and the rectangle's height would be *that* sessions highest-high to it's lowest-low. The same would hold true for London, Sydney, Asia. If there isn't one that exists, is there some code that can point me in the right direction?

You can do something similar with a combination of the High/Low for Time Period study, and the Spreadsheet Study study.

Here are two links that explain some of the details:
[Reviewed] [AUTOLINK]ACD[/AUTOLINK] A levels & Opening Ranges - Sierra Chart
[Reviewed] Session OHLC study instead of Daily OHLC? - Sierra Chart

Use the Fill Top and Fill Bottom Draw Styles between the Subgraph pairs. It doesn't draw a rectangle, but it shades the background between the lines and within the times. Be sure to check Draw Study Underneath Main Price Graph.

If you need more help, post here again.

Reply With Quote
  #3 (permalink)
 funk101 
Margate, Fl.
 
Experience: Advanced
Platform: SierraCharts
Trading: Futures
Posts: 28 since Jun 2009
Thanks Given: 5
Thanks Received: 5


I'm trying to draw a rectangle at market session times, I'm hung up on getting a bar index at a specific date. Actually what I really want to do is define the different market start and end times, ny, london, etc. and grab the highest high to lowest low of each of those sessions, and draw a rectangle around that data. My code below is a feeble attempt at getting there, maybe someone can shed some light:

SCDateTime nyOpen, nyClose;

nyOpen.SetDateTimeYMDHMS(2012, 6, 20, 9, 00, 00);
nyClose.SetDateTimeYMDHMS(2012, 6, 20, 16, 00, 00);

---

Tool.ChartNumber = sc.ChartNumber;
Tool.DrawingType = DRAWING_RECTANGLEHIGHLIGHT;
Tool.Region = 0;
Tool.LineNumber = uniqueLineNumber;
Tool.BeginDateTime = nyOpen;
Tool.EndDateTime = nyClose;

Tool.BeginValue = sc.High[sc.BaseDateTimeIn[nyOpen]]; <-- possible??
Tool.EndValue = sc.Low[sc.BaseDateTimeIn[nyClose]]; <-- possible??


Tool.Color = COLOR_LIGHTBLUE;
Tool.SecondaryColor = COLOR_LIGHTBLUE;
Tool.AddMethod = UTAM_ADD_OR_ADJUST;
Tool.LineWidth = 2;

sc.UseTool(Tool);

Started this thread Reply With Quote




Last Updated on June 20, 2012


© 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