What's wrong with my aux2 data?

my database consists of OHLCV OI Aux1 Aux2. When I use my code (using aux2 / V inside) to execute or explore, only partial tickers arise out on the screen.
Rest tickers doesn't show the results, I've checked the database (symbol - quote editor), yes...databases complete, minute by minute, day by day.

what's wrong ? I think this isn't the code, because partial tickers still worked.
or the setting of AB database ?
Anyone help me ??

@gani, it seems difficult to help you based on what you described.

I suggest posting a working code snippet that on your system generates the issue you are reporting.
Moreover, please, let us know what kind of data is stored in your Aux2 field.

Seeing/testing your code will allow us to verify it with our databases/data and tell you if it works or not.
This will either find the issue or at least exclude one possible cause of the problem.

Aux2 is total value, this is my code :

VW = Aux2/V ;
VW5 = MA(VW,5);

Filter = 1;

AddColumn(VW,"VW");
AddColumn(VW5,"VW5");

The result show like this :
image

As you can see, only partial data arise out.
for example, if we see ticker code ABBA (row 2), this is ABBA content data (use symbol - quote editor) :
image
another sample : ticker code AKPI (row 20)
image

You have a mixture of INTRADAY and EOD data in the database but you are running exploration in DAILY mode. Some of your EOD records have ZERO volume so you got division by zero - which means not a number - blank output.

You need to keep your database tidy and correct. You should NOT have records with zero volume. If symbol wasn't traded at particular bar, there should be NO data record for that bar.

Run Tools->Database Purify to find data errors.

2 Likes

I did what you suggest, purify the database.

image

but the problem still exist (ticker ABBA - row 2)

image

It is not enough to click one button. You need to understand your data and realize basic math 101. If you have any incorrect calculations (like division by zero) you will end up with not-a-numbers / Null.
5 day moving average needs 5 CORRECT numbers to calculate. If ANYWHERE within last 5 bars you've got division by zero you would end up with not a number.
Your code may produce division by zero ANYWHERE where volume is zero

VW = Aux2/V; // this may produce not-a-number

If you want to average such potentially wrong data you must use Nz() function that would convert not-numbers into zeros

VW = Nz( Aux2/ V ); // convert nulls and Nans to zero
VW5 = MA( VW, 5 ); // you can only average correct values, not garbage (division by zero)

well done, thanks Tomasz