Timescale inconsistency

Questions about MultiCharts and user contributed studies.
seneca
Posts: 97
Joined: 02 Apr 2012
Has thanked: 38 times
Been thanked: 22 times

Timescale inconsistency

Postby seneca » 17 Oct 2015

After the update to MC 9.1, the timescale shows inconsistent behavior in some situations, please see attached pictures. This behavior can be reproduced by switching into playback mode.

As a consequence, an indicator I wrote to display vertical TL to indicate session breaks does not work as expected any more, the TL is not only drawn at the 1515 session end as expected, but also at 1507 (see attached picture).

I wrote the indicator since I don't like to get caught with an open position during session breaks...
I would also suggest that we get an option to show session breaks in advance as an implemented feature of MC, so additional indicators as the one below wouldn't be required any more.

The code is as follows:

Code: Select all

inputs:
session_end_time(1515),
session_end_time_friday(1515);

var:
tl(-1),
tl_warn(-1),
EoS(0),
EoS_friday(0),
count_a(1),
count_b(1),
tl_color(RGB(47,79,79)),
tl_friday_color(lightgray),
warn_color(cyan),
show_countdown(true),
countdown(0),
countdown_time_axis_offset(0),
HHmm_to_EoS(0),
jHHmm_to_EoS(0),
pre_tl_HHmm(30),
pre_tl_warn_HHmm(10),
pre_countdown_HHmm(10),
jbarinterval(0);


If bartype_ex >= 2 and bartype_ex <= 7 then begin

EoS = session_end_time;
jbarinterval = eltimetodatetime(barinterval);

if session_end_time_friday <> session_end_time then begin
if dayofweek(date)=5 then EoS = session_end_time_friday
else EoS = session_end_time;
end;

jHHmm_to_EoS = (eltimetodatetime(EoS) - eltimetodatetime(time)-jbarinterval);
if jHHmm_to_EoS > 0 then HHmm_to_EoS = datetime2eltime(jHHmm_to_EoS)
else HHmm_to_EoS = 0;

if HHmm_to_EoS < pre_tl_HHmm and jHHmm_to_EoS >0 and count_a = 1 then begin
count_a = count_a + 1;
tl = tl_new(date,EoS, h, date,EoS, h+100);
if dayofweek(date)<>5 then tl_setcolor(tl, tl_color);
if dayofweek(date)=5 then tl_setcolor(tl, tl_friday_color);
tl_setstyle(tl, 5);
tl_setextleft(tl, true);
tl_setextright(tl, true);
tl_lock(tl, true);
end;

If HHmm_to_EoS < pre_tl_warn_HHmm and jHHmm_to_EoS > 0 and count_b = 1 then begin
count_b = count_b + 1;
tl_warn = tl_new(date,EoS, h, date, EoS, h+100);
tl_setcolor(tl_warn, warn_color);
tl_setstyle(tl_warn, 5);
tl_setextleft(tl_warn, true);
tl_setextright(tl_warn, true);
tl_lock(tl_warn, false);
if show_countdown then begin
countdown = text_new(date, EoS+countdown_time_axis_offset,
(GetAppInfo(aihighestdispvalue) + getappinfo(ailowestdispvalue))*0.5," ");
text_setcolor(countdown,white);
text_setsize(countdown,13);
end;
end;

if show_countdown and barinterval <= 10 then begin
countdown=text_getfirst(1);
if HHmm_to_EoS <= pre_countdown_HHmm then begin
if dayofweek(date) <> 5 then
text_setstring(countdown,text(NumToStr((HHmm_to_EoS),0)," ","min"))
else
text_setstring(countdown,text(Spaces(7),"Attention!" +Newline+
"Friday Session ends" +Newline+ Spaces(8)+ "in"," ", NumToStr((HHmm_to_EoS),0) ," ","min"));
end;

end;

if time >= session_end_time or date<>date[1] then begin
count_a = 1;
count_b = 1;
if tl_getcolor(tl_warn) = warn_color then tl_delete(tl_warn);
text_delete(countdown);
end;
end;
Attachments
TL inconsistency.jpg
(68.34 KiB) Downloaded 750 times
timescale inconsistency.jpg
(187.79 KiB) Downloaded 751 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Timescale inconsistency

Postby TJ » 17 Oct 2015

Does this happen to different symbols?

Please check the session time on the chart.
Please check the exchange time on the chart.

seneca
Posts: 97
Joined: 02 Apr 2012
Has thanked: 38 times
Been thanked: 22 times

Re: Timescale inconsistency

Postby seneca » 17 Oct 2015

Does this happen to different symbols?

Please check the session time on the chart.
Please check the exchange time on the chart.

Yes, it happens with different symbols. "Time zone" in instrument settings is set to "Exchange" on all my charts. I also double checked the session templates in Quote Manager and the "Sessions" setting in instruments settings. I've also updated my Session templates according to the recently changed CME session times.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Timescale inconsistency

Postby Henry MultiСharts » 19 Oct 2015

Hello seneca,

This is a known issue that will be fixed MultiCharts 9.1 Release 2.

seneca
Posts: 97
Joined: 02 Apr 2012
Has thanked: 38 times
Been thanked: 22 times

Re: Timescale inconsistency

Postby seneca » 20 Nov 2015

Hello seneca,

This is a known issue that will be fixed MultiCharts 9.1 Release 2.
Release 2 seems to have fixed the issue that messed up my "end of session" lines, thanks for that. However, the timescale still shows inconsistencies in playback mode, please see attached picture.
Attachments
timescale.jpg
(151.33 KiB) Downloaded 714 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Timescale inconsistency

Postby Henry MultiСharts » 15 Dec 2015

Hello seneca,

This is a known issue that will be fixed MultiCharts 9.1 Release 2.
Release 2 seems to have fixed the issue that messed up my "end of session" lines, thanks for that. However, the timescale still shows inconsistencies in playback mode, please see attached picture.
Hello seneca,

We apologize for that. The fix is targeted to the next version now.


Return to “MultiCharts”