how to know whether data 2 is null in easylanguage?  [SOLVED]

Questions about MultiCharts and user contributed studies.
maisatomai
Posts: 83
Joined: 18 Mar 2013
Has thanked: 11 times

how to know whether data 2 is null in easylanguage?

Postby maisatomai » 28 Mar 2016

Let say at time 1200 data 1 has a bar and data 2 has a null bar. How do you check data2 has a null bar?

is there something like "bar of data2=null"

User avatar
TJ
Posts: 7158
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 988 times
Been thanked: 2042 times

Re: how to know whether data 2 is null in easylanguage?

Postby TJ » 28 Mar 2016

Let say at time 1200 data 1 has a bar and data 2 has a null bar. How do you check data2 has a null bar?

is there something like "bar of data2=null"
What do you mean by "null"?

As in no trade?

Does data2 has the same resolution as data1?

maisatomai
Posts: 83
Joined: 18 Mar 2013
Has thanked: 11 times

Re: how to know whether data 2 is null in easylanguage?

Postby maisatomai » 28 Mar 2016

yes. same 5 minutes resolution.

For example, 22/2/2016, data 1 is trading and data 2 is a holiday.

If you try print(c of data2) when data 2 has no bar, it will give you the closeD of data2 of 21/2/2016 which is very misleading. This is a bug in multichart.

User avatar
TJ
Posts: 7158
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 988 times
Been thanked: 2042 times

Re: how to know whether data 2 is null in easylanguage?  [SOLVED]

Postby TJ » 28 Mar 2016

you can check the trade volume.

User avatar
ABC
Posts: 626
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 355 times
Contact:

Re: how to know whether data 2 is null in easylanguage?

Postby ABC » 29 Mar 2016

I don't think this is a bug, just standard program behavior. You could check for the date of the current last bar, specifically to make sure that it's the same as on data1. You can also write code to check if there is a holiday on the data symbol or on a regular trading day.

Regards,

ABC
yes. same 5 minutes resolution.

For example, 22/2/2016, data 1 is trading and data 2 is a holiday.

If you try print(c of data2) when data 2 has no bar, it will give you the closeD of data2 of 21/2/2016 which is very misleading. This is a bug in multichart.

maisatomai
Posts: 83
Joined: 18 Mar 2013
Has thanked: 11 times

Re: how to know whether data 2 is null in easylanguage?

Postby maisatomai » 29 Mar 2016

I don't think this is a bug, just standard program behavior. You could check for the date of the current last bar, specifically to make sure that it's the same as on data1. You can also write code to check if there is a holiday on the data symbol or on a regular trading day.

Regards,

ABC
yes. same 5 minutes resolution.

For example, 22/2/2016, data 1 is trading and data 2 is a holiday.

If you try print(c of data2) when data 2 has no bar, it will give you the closeD of data2 of 21/2/2016 which is very misleading. This is a bug in multichart.
actually d of data2 is a great idea. I will try it now

It works


Return to “MultiCharts”