LastBarOnChart not working with multiple data lines

Questions about MultiCharts .NET and user contributed studies.
dasepi
Posts: 4
Joined: 08 Aug 2014
Has thanked: 1 time

LastBarOnChart not working with multiple data lines

Postby dasepi » 22 Aug 2015

Just wanted to submit bug report. When chart has multiple data lines, under rare scenarios I have seen where Bars.LastBarOnChart will return false all the time. When debugging, I found out that in such case Bars.Status=None, and only one of the other data lines (say line 3) that has BarsOfData(3).Status=Close will have BarsOfData(3).LastBarOnChart=True. All other data lines will be reporting LastBarOnChart=False

I am running latest version 9.0 build 11212

This is a bug because if indicator is designed to be looking at just one data line, given by Bars, it will not be reporting LastBarOnChart properly.

Thanks,
Dave

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

Re: LastBarOnChart not working with multiple data lines

Postby Henry MultiСharts » 24 Aug 2015

Hello Dave,

We will check that.

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

Re: LastBarOnChart not working with multiple data lines

Postby Henry MultiСharts » 26 Aug 2015

Hello Dave,

We were unable to replicate this behavior on our end.
Please send us (support@multicharts.com) the following information for further analysis:
- workspace you are using;
- in QuoteManager select the symbols you are using, make a right click on it->Export data->Export instrument (without data). Send us the QMD export file for analysis;
- in PowerLanguage .NET editor->File->Export->export the studies you are using for replicating this behavior; send us the pln file;
- instructions for replicating the error.

andrei
Posts: 25
Joined: 24 Jan 2013
Has thanked: 2 times
Been thanked: 1 time

Re: LastBarOnChart not working with multiple data lines

Postby andrei » 14 Mar 2023

this does happen, look at the below situation:

https://ibb.co/NKFjh7D

What needs to happen is add some instruments in the same chart such that their sessions do not fully overlap. Then wait for that day time where the non-principal instruments (data2 or data3) are "ahead" of the main one (data1) - during that time interval, LastBarOnChart will ALWAYS return FALSE for data1 - which is messing up any strategies relying on LastBarOnChart.

This should definitely be fixed

User avatar
Vlada MultiCharts
Posts: 292
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: LastBarOnChart not working with multiple data lines

Postby Vlada MultiCharts » 16 Mar 2023

this does happen, look at the below situation:

https://ibb.co/NKFjh7D

What needs to happen is add some instruments in the same chart such that their sessions do not fully overlap. Then wait for that day time where the non-principal instruments (data2 or data3) are "ahead" of the main one (data1) - during that time interval, LastBarOnChart will ALWAYS return FALSE for data1 - which is messing up any strategies relying on LastBarOnChart.

This should definitely be fixed
Hello andrei,

Unfortunately, we did not manage to reproduce the behavior according to your instruction. Please see the attached screenshot. The yellow plot equals 1 if LastBarOnChart = True

If you want us to look into this matter, please reproduce the issue and send us the following:

1. The log files.
2. The study in PLA format.
3. The workspace file
Attachments
image (1).png
(24.03 KiB) Not downloaded yet


Return to “MultiCharts .NET”