We have the DailyClose, DailyHigh, DailyLow, DailyOpen, and DailyVolume as reserved words.
Would it make sense to also have a SessionClose, SessionHigh, SessionLow, SessionOpen, and SessionVolume since we tend to make our calculations on session open to session close instead of midnight to midnight?
Or is there a simple trick to isolate these values?
Session high/low/close/open [SOLVED]
Re: Session high/low/close/open
Thanks.
Yes the reserved daily words would work if you only use the Regular trading session hours, but I don't... As it is, I need to screw around with code to isolate the inside of a session.
I was hoping that MC had some trick for me seeing as they plot the Session Breaks on each window.
Yes the reserved daily words would work if you only use the Regular trading session hours, but I don't... As it is, I need to screw around with code to isolate the inside of a session.
I was hoping that MC had some trick for me seeing as they plot the Session Breaks on each window.
- TJ
- Posts: 7717
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1032 times
- Been thanked: 2215 times
Re: Session high/low/close/open
Read carefully Arnie's post... those are not reserved words.Thanks.
Yes the reserved daily words would work if you only use the Regular trading session hours, but I don't... As it is, I need to screw around with code to isolate the inside of a session.
I was hoping that MC had some trick for me seeing as they plot the Session Breaks on each window.
ie you can modify the code to suite your need.
Re: Session high/low/close/open
TJ,
I'm not using Regular Trading Hour Templates and the suggested functions reset at the next day (midnight). Hence the start of this thread.
I apologize. HighD, LowD..CloseD are functions not reserved words.
Its not perfect, but this is my workaround:
I vote for the addition of SessionHigh, SessionLow, SessionOpen, SessionClose to our reserved words.
I'm not using Regular Trading Hour Templates and the suggested functions reset at the next day (midnight). Hence the start of this thread.
I apologize. HighD, LowD..CloseD are functions not reserved words.
Its not perfect, but this is my workaround:
Code: Select all
Variables:
SessionOpen( 0 ),
SessionHi( 0 ),
SessionLo( 0 ) ;
If Time=SessionStartTime(0,1)+Barinterval then begin
SessionOpen=O[1] ;
SessionHi=H[1] ;
SessionLo=L[1] ;
end else
If Time>SessionStartTime(0,1)+Barinterval or Time<SessionEndTime(0,1) then begin
if H>SessionHi then SessionHi=H ;
if L<SessionLo then SessionLo=L ;
end ;
//Edited to add in +barinterval to start the timer correctly
Last edited by MAtricks on 11 Jun 2014, edited 1 time in total.
- arnie
- Posts: 1594
- Joined: 11 Feb 2009
- Location: Portugal
- Has thanked: 481 times
- Been thanked: 514 times
Re: Session high/low/close/open
Indeed, the openD, highD, lowD and closeD can only work with RTH templates. If one want to use a 24h session template (for the ES I use 1700 to 1615) you really need to do some coding so you can have a correct reading since you are grabing data from previous day (prior midnight) and today's data to find the values you want.
One would imagine that a simple thing as calling a session high would be in fact simple.
ABC coded for me a couple of years ago a study that does exactly that.
In my case, it's based on time paramaters where I can select the time I want and I get the high, low, close, open or whatever calculations I want to based on that time. So if I want to have a session that started yesterday at 1300 and ends today at 1515 I'll have the data perfectly calculated.
Since I wanted to retrieve the RTH session within my 24h session, the time imputs were key.
Again, it's time based and not session template based.
For a more basic reading, yes, it would be very welcomed keywords or even functions that could recognize the time template used.
Here's a thought, since CurrentSession function is able to recognize the session template used, is there a way to merge it with the openD and the other functions so they could also recognize the session template?
One would imagine that a simple thing as calling a session high would be in fact simple.
ABC coded for me a couple of years ago a study that does exactly that.
In my case, it's based on time paramaters where I can select the time I want and I get the high, low, close, open or whatever calculations I want to based on that time. So if I want to have a session that started yesterday at 1300 and ends today at 1515 I'll have the data perfectly calculated.
Since I wanted to retrieve the RTH session within my 24h session, the time imputs were key.
Again, it's time based and not session template based.
For a more basic reading, yes, it would be very welcomed keywords or even functions that could recognize the time template used.
Here's a thought, since CurrentSession function is able to recognize the session template used, is there a way to merge it with the openD and the other functions so they could also recognize the session template?
Re: Session high/low/close/open
My above code can do that as well.. Just change the start/end time to an input format:
I don't see anyway to convert HighD, LowD, and OpenD to using sessions... HighD = DailyHigh.. However, the provided code here could be perfected and turned into a function.
I guess my point is to ask the question of why we have multiple ways to identify the features of a Day and very little for a session.
Code: Select all
Inputs:
StartTime( 1800 ),
EndTime( 1715 ) ;
Variables:
SessionOpen( 0 ),
SessionHi( 0 ),
SessionLo( 0 ) ;
If Time=StartTime then begin
SessionOpen=O[1] ;
SessionHi=H[1] ;
SessionLo=L[1] ;
end else
If Time>StartTime or Time<EndTime then begin
if H>SessionHi then SessionHi=H ;
if L<SessionLo then SessionLo=L ;
end ;
I guess my point is to ask the question of why we have multiple ways to identify the features of a Day and very little for a session.
- arnie
- Posts: 1594
- Joined: 11 Feb 2009
- Location: Portugal
- Has thanked: 481 times
- Been thanked: 514 times
Re: Session high/low/close/open
Simple, equities trading has been the realm for retail traders and the "Day" keywords and functions was sufficient to retrieve the data needed.I guess my point is to ask the question of why we have multiple ways to identify the features of a Day and very little for a session.
Only when retail traders started to embrace futures things start to change. Since futures trade almost 24h a day, the "Day" keywords started to not deliver the data needed.
Unfortunately, most platforms did not updated their platform to futures trading, leaving up to the traders that task.
Although the ability to build session templates help a lot in creating the sessions we want, keywords and functions were not updated to take advantage of the session templates.
Again, that task was left to the traders, or in this case, programmers to find ways to code what they need with the available keywords. Needless to say that traders without any type of programming skill are left alone, without any type of help, resulting obviously in moving away to another platform that is capable of offering the tools he need.
Re: Session high/low/close/open
And it would be great if the proposed SessionClose for intraday futures charts actually returned the settled daily closing price for past session which have completed..
Provided that it's the same symbol in QuoteManager and the daily data is up to date for that symbol.. could it be possible?
Currently I am having to write/retrieve settled daily closes to/from txt files
Provided that it's the same symbol in QuoteManager and the daily data is up to date for that symbol.. could it be possible?
Currently I am having to write/retrieve settled daily closes to/from txt files
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Session high/low/close/open
We are going to add prebuilt functions for accessing Session high/low/close/open in MultiCharts 9.1 beta 1.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Session high/low/close/open [SOLVED]
Added new built-in functions for returning Session Open/High/Low/Close prices (openS, highS, lowS, closeS) in MultiCharts 9.1 Beta 1.
Re: Session high/low/close/open
What about OpenD and CloseD? Are they day open and day close? How are they different from OpenS and CloseS?Added new built-in functions for returning Session Open/High/Low/Close prices (openS, highS, lowS, closeS) in MultiCharts 9.1 Beta 1.
Could I request engineer team to add sufficient description to reference? As in the attached pic, it does not have any description in reference.
Thanks.
- Attachments
-
- Image 8.png
- (9.87 KiB) Downloaded 4995 times
- TJ
- Posts: 7717
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1032 times
- Been thanked: 2215 times
Re: Session high/low/close/open
OpenD and CloseD are based on changing DATE.What about OpenD and CloseD? Are they day open and day close? How are they different from OpenS and CloseS?Added new built-in functions for returning Session Open/High/Low/Close prices (openS, highS, lowS, closeS) in MultiCharts 9.1 Beta 1.
Could I request engineer team to add sufficient description to reference? As in the attached pic, it does not have any description in reference.
Thanks.
OpenS and CloseS are based on changing SESSION.
The EasyLanguage Functions & Reserved Words Reference is a complete reference listing of every EasyLanguage reserved word and EasyLanguage function. This comprehensive guide gives complete descriptions, usages, input declarations, and code examples for each EasyLanguage syntax element.
Additional Information Sources.
Re: Session high/low/close/open
These are great to have so thank you.
I'm having an issue.. HighS, LowS, CloseS, and OpenS do not work on tick based charts. Any thoughts? I have a Point bar chart up and the calculation is done from the beginning of the chart to the end.
I'm having an issue.. HighS, LowS, CloseS, and OpenS do not work on tick based charts. Any thoughts? I have a Point bar chart up and the calculation is done from the beginning of the chart to the end.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Session high/low/close/open
Hello MAtricks,These are great to have so thank you.
I'm having an issue.. HighS, LowS, CloseS, and OpenS do not work on tick based charts. Any thoughts? I have a Point bar chart up and the calculation is done from the beginning of the chart to the end.
These functions work ok on our end. Please make sure you have at least one session break on your chart.
Re: Session high/low/close/open
These are identical charts. Both go back 30 days on the ES. There's obviously a scaling issue, but more importantly, the calculation is done only once on the Point Bar chart.

Code: Select all
INPUTS:
PeriodsAgo( 1 ) ;
VARIABLES:
Cs( 0 ),
Os( 0 ),
Hs( 0 ),
Ls( 0 ) ;
Cs = OpenS(PeriodsAgo) ;
Os = CloseS(PeriodsAgo) ;
Hs = HighS(PeriodsAgo) ;
Ls = LowS(PeriodsAgo) ;
Plot1( Cs, "SessionClose" ) ;
Plot2( Os, "SessionOpen" ) ;
Plot3( Hs, "SessionHi") ;
Plot4( Ls, "SessionLo") ;
- Attachments
-
- Session OHLC functions.wsp
- (141.96 KiB) Downloaded 787 times
-
- Session OHLC.pla
- (5.62 KiB) Downloaded 785 times
-
- Session OHLC functions.png
- (170.53 KiB) Downloaded 5200 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Session high/low/close/open
Hello MAtricks,These are identical charts. Both go back 30 days on the ES. There's obviously a scaling issue, but more importantly, the calculation is done only once on the Point Bar chart.
Code: Select all
INPUTS:
PeriodsAgo( 1 ) ;
VARIABLES:
Cs( 0 ),
Os( 0 ),
Hs( 0 ),
Ls( 0 ) ;
Cs = OpenS(PeriodsAgo) ;
Os = CloseS(PeriodsAgo) ;
Hs = HighS(PeriodsAgo) ;
Ls = LowS(PeriodsAgo) ;
Plot1( Cs, "SessionClose" ) ;
Plot2( Os, "SessionOpen" ) ;
Plot3( Hs, "SessionHi") ;
Plot4( Ls, "SessionLo") ;
These functions can work only on Ticks & Contracts, Seconds, Minutes, & Hours, Days, Weeks, Months, Quarters, & Years resolutions.