Session breaks show always at midnight

Questions about MultiCharts and user contributed studies.
johnyx2
Posts: 36
Joined: 18 Apr 2008

Session breaks show always at midnight

Postby johnyx2 » 27 Dec 2008

Hello there,

Format Window -> Show Session Breaks
show the session break always at midnight disregarding of the Sessions setting in QM for that symbol.

User avatar
TJ
Posts: 6609
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1912 times

Postby TJ » 08 Jan 2009

go to QM>Symbol>Edit Symbol>Session

you can configure your session end time there.

johnyx2
Posts: 36
Joined: 18 Apr 2008

Postby johnyx2 » 08 Jan 2009

It does not take QM sessions time if the chart is set to show 24 hrs., even if QM sessions are RTH
That is the issue I am trying to bring attention to.
Even if I am looking at a 24hrs chart of YM, the end of the session is still 16:15 EST, not 00:00 EST

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 16 Jan 2009

Hi johnyx2,

There is little demand for the feature that you are requesting. This is why were are not planning to implement it in the nearest future.

However, you can achieve the effect that you are talking about by writing a code that will use SessionEndTime and SessionStartTime reserved words.

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 16 Jan 2009

See:

http://forum.tssupport.com/viewtopic.php?p=21656

I have another indicator that prints vertical TL on the price chart at session breaks and paints all the overnight bars blue, but I am not at my trading computer location right now or I would post that one also.

Note:

SessionStartTime(1,1) gives an erroneous return.
(ie: if the overnight session (session 1) Actually starts at 1530 Chicago Time (3:30 pm), the actual return of SessionStartTime(1,1) = 1700 (5:00 pm). I assume it's a bug.

Hope that helps

johnyx2
Posts: 36
Joined: 18 Apr 2008

Postby johnyx2 » 16 Jan 2009

Thanks, Robot

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 17 Jan 2009

(Best Andy Rooney imitation "ON")
Ever wonder why you can "Show Session Breaks" in the "Format Window" (see attached) and it only shows 1 break even thought the check box specifically is in the plural sense? Ever wonder why MC only thinks that the end of the day or middle of the night is the only significant time to show a break when there are really two separate trading sessions in real life for many futures contracts? This isn't forex. TSS has a program for that. If planes were built this way there would only be one wing, if cars were built this way there would only be two tires, if God built a day this way there would be no night, just daylight all the time.
Many of us don't trade the overnight session, unlike programmers, we are in bed asleep waiting for that magical time called "the open".
It's nice to look at the overnight once in a while, to see what has been happening while we drink our morning coffee and get ready for the real liquidity. But really, it's nice to see the line of demarcation. Kinda like a fence between your yard and your neighbors yard.
Maybe if more intraday traders actually used MC there would be more demand to show session "Breaks".
(Andy Rooney "OFF". Gosh that guy is annoying...)

Ok, all joking aside; Here's some code for overnight PaintBars and session breaks that works for emini sessions.

Code: Select all

// **BP Overnight
// "Sessions" must be set to "regular" and not "24 hr"

Input:   Sess1OpenBrk_ON(True), SessBrkColor(DarkGray),
      HHLL_ON(True), PriceLev(2.00) ;

Vars:      BSS(0), SpacerTxt("     "), SessTLref(-1), Flag(+1),
      HHval(H), HHref(-1), LLval(L), LLref(-1),
      Pt01(Close), Pt02(Close+1);

//Plot Paintbar of Overnight Session
//Detirmine HH and LL of Overnight Session
If (time > SessionEndTime(1,2)) or (time < SessionStartTime(1,2)) Then Begin
   PlotPaintBar(High, Low, "Overnight");
   BSS = BSS+1;
   HHval = Highest(High,BSS);
   LLval = Lowest(Low, BSS);
End
Else Begin
   {Both NoPlot statements must be included}
   NoPlot(1);
   NoPlot(2);
   BSS = 0;
End;

// Vertical TL at Session 1 (Overnight) Close
If Date<>Date[1] Then Flag = -1 ;
//If (time >= SessionEndTime(1,2)) Then Flag = -1 ;
If (time >= SessionStartTime(1,2)) and (time < SessionEndTime(1,2)) and Flag = -1 then begin
   Pt01 = close;
   Pt02 = Pt01 + 1 ;
   If Bartype = 0 then
      SessTLref=tl_new_Self_s(date,time_s[1],Pt01 ,date,time_s[1],Pt02 )
      else SessTLref=tl_new_Self_s(date,time_s,Pt01 ,date,time_s,Pt02 );
   tl_setcolor(SessTLref,SessBrkColor);
   tl_setsize(SessTLref,0);
   tl_setStyle(SessTLref,4);
   tl_setextleft(SessTLref,true);
   tl_setextright(SessTLref,true);
   Flag = +1;
end;


//Plot HH and LL of Overnight Session
If    HHLL_ON = True and Date = CurrentDate and (time >= SessionStartTime(1,2)) then begin
   
   If AbsValue(HHval-H) <= PriceLev then Begin
      Plot3(HHval, "HHovrnt");

      If HHref <> -1 Then Text_SetLocation_s(HHref, Date, Time_s, HHval)
         Else Begin
         HHref = Text_New_s(Date, Time_s, HHval, SpacerTxt + "HH");
         Text_SetStyle(HHref, 0, 2);
         Text_SetColor(HHref, RGB(0,0,255)) ;
      End;
   End;
   
   If AbsValue(LLval-L) <= PriceLev then Begin
      Plot4(LLval, "LLovrnt");

      If LLref <> -1 Then Text_SetLocation_s(LLref, Date, Time_s, LLval)
         Else Begin
         LLref = Text_New_s(Date, Time_s, LLval, SpacerTxt + "LL");
         Text_SetStyle(LLref, 0, 2);
         Text_SetColor(LLref, RGB(0,0,255) ) ;
      End;
   End;
End;

Attachments
FormatWindow.jpg
FormatWindow.jpg (41.22 KiB) Viewed 465 times
BP Overnight.jpg
BP Overnight.jpg (38.95 KiB) Viewed 468 times

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 23 Jan 2009

Are you by any chance talking about something like this?
Attachments
multiple session breaks.PNG
multiple session breaks.PNG (89.83 KiB) Viewed 470 times

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 23 Jan 2009

Hi Marina,

Has anyone told you today how amazing your are?
I have no idea how to get multiple session breaks to work like in your screen shot.

Here is as far as I got:
QMSessionsWindow.jpg - How I set up the session times.
FormatWindow.jpg - How I set up the Chart.
MCSessionBreaks.jpg - What it looks like plain.
RobotManBreaks.jpg - What it looks like with my indicator.

How do I get multiple session breaks without an indicator?
Attachments
RobotManBreaks.jpg
RobotManBreaks.jpg (152.39 KiB) Viewed 450 times
MCSessionBreaks.jpg
MCSessionBreaks.jpg (141.25 KiB) Viewed 453 times
FormatWindow.jpg
FormatWindow.jpg (43.71 KiB) Viewed 454 times
QMSessionsWindow.jpg
QMSessionsWindow.jpg (48.29 KiB) Viewed 459 times

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 26 Jan 2009

Hi Bob,

When setting sessions in QuoteManager, check the Session End box for every entry.

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 26 Jan 2009

Thanks Marina,

That seems to do the trick.
To create the custom session, I basically had to start from scratch and work backwards from the right hand side to the left, or the lines would jump around and it was very confusing. I also learned that I can't start with Sunday.

Is there a way to save my custom session so that I can use it in the "Custom Session Template" as the existing "CME: EquityIndex Futures [E-mini] (Combined)" does not allow changes to the session end times.

Thanks again.
Attachments
CustomSession.jpg
CustomSession.jpg (53.12 KiB) Viewed 444 times

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 28 Jan 2009

Hi Bob,

At the moment, there is no way to save the created session as a Custom Session Template.

What you can do (I am not sure if it will address your particular situation) is create your particular session for a particular exchange (in Tools -> Exchanges and ECN's). In this case, all the symbols from this exchange will share this specific session setup.

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 28 Jan 2009

Hi Marina,

Yes, that is a good solution.

Thanks!

User avatar
RobotMan
Posts: 375
Joined: 12 Jul 2006
Location: Los Altos, California, USA
Has thanked: 31 times
Been thanked: 12 times
Contact:

Postby RobotMan » 29 Jan 2009

Hi Marina,

I was messing around in QM and found that I can edit, add, and delete custom templates here:
Tools>Session Templates
I created a new one and applied it to a symbol and it works!

I can also edit the existing template: "CME: EquityIndex Futures [E-mini] (Combined)" for multi session breaks by checking each box under "Session End" and clicking ok.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 30 Jan 2009

Hi Bob,

I am glad you have been able to find a solution.

Regards.


Return to “MultiCharts”