Page 1 of 1

how to know whether data 2 is null in easylanguage?

Posted: Mar 28 2016
by maisatomai
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"

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

Posted: Mar 28 2016
by TJ
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?

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

Posted: Mar 28 2016
by maisatomai
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.

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

Posted: Mar 28 2016
by TJ
you can check the trade volume.

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

Posted: Mar 29 2016
by ABC
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.

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

Posted: Mar 29 2016
by maisatomai
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