NexusFi: Find Your Edge


Home Menu

 





Drawing boxes around Market Sessions...


Discussion in Sierra Chart

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




 
Search this Thread
  #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?
The Backwardation Signal: How the CL Futures Curve Tells …
Commodities
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
CPI Eve: Fed Hike Odds Hold at 52% for the First Time, I …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: EdgeClear, FCM:Phillip, Data:Denali, Routing:Teton
Trading: YM RTY ES NQ
Posts: 480 since Nov 2009
Thanks Given: 222
Thanks Received: 608


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] ACD 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


© 2026 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 - Downloads - Top
no new posts