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

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

Mar 28 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: 7774
Joined: Aug 29 2006
Location: Global Citizen
Has thanked: 1036 times
Been thanked: 2233 times

Mar 28 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: Mar 18 2013
Has thanked: 11 times

Mar 28 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: 7774
Joined: Aug 29 2006
Location: Global Citizen
Has thanked: 1036 times
Been thanked: 2233 times

Mar 28 2016

you can check the trade volume.

User avatar
ABC
Posts: 731
Joined: Dec 16 2006
Location: www.abctradinggroup.com
Has thanked: 126 times
Been thanked: 415 times
Contact:

Mar 29 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: Mar 18 2013
Has thanked: 11 times

Mar 29 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