[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

3 Dimensional Arrays Do Not Work



PureBytes Links

Trading Reference Links

I recently discovered that three dimensional arrays do not function
properly in TradeStation. It appears that the program interchanges the
order of two of the indices between reads and writes to the array.

I created an array and initialized all elements to values related to their
indices. I then read several of the values and found the error. After
several tries, the EasyLanguage Support Group agrees with my conclusion and
says that it is "not functional".

Details are summarized below.

Bob Fulks

--------------
{Test Program Illustrating the Error}

Array: NS[7,7,7](0);
Array: TX[7,7](0);

if CurrentBar = 1 then begin

	NS[0,0,0] = 00; NS[0,0,1] = 01; NS[0,0,2] = 02; NS[0,0,3] = 03;
	NS[0,0,4] = 04; NS[0,0,5] = 05; NS[0,0,6] = 06; NS[0,0,7] = 07;
	NS[0,1,0] = 10; NS[0,1,1] = 11; NS[0,1,2] = 12; NS[0,1,3] = 13;
	NS[0,1,4] = 14; NS[0,1,5] = 15; NS[0,1,6] = 16; NS[0,1,7] = 17;
	NS[0,2,0] = 20; NS[0,2,1] = 21; NS[0,2,2] = 22; NS[0,2,3] = 23;
	NS[0,2,4] = 24; NS[0,2,5] = 25; NS[0,2,6] = 26; NS[0,2,7] = 27;
	NS[0,3,0] = 30; NS[0,3,1] = 31; NS[0,3,2] = 32; NS[0,3,3] = 33;
	NS[0,3,4] = 34; NS[0,3,5] = 35; NS[0,3,6] = 36; NS[0,3,7] = 37;
	NS[0,4,0] = 40; NS[0,4,1] = 41; NS[0,4,2] = 42; NS[0,4,3] = 43;
	NS[0,4,4] = 44; NS[0,4,5] = 45; NS[0,4,6] = 46; NS[0,4,7] = 47;
	NS[0,5,0] = 50; NS[0,5,1] = 51; NS[0,5,2] = 52; NS[0,5,3] = 53;
	NS[0,5,4] = 54; NS[0,5,5] = 55; NS[0,5,6] = 56; NS[0,5,7] = 57;
	NS[0,6,0] = 60; NS[0,6,1] = 61; NS[0,6,2] = 62; NS[0,6,3] = 63;
	NS[0,6,4] = 64; NS[0,6,5] = 65; NS[0,6,6] = 66; NS[0,6,7] = 67;
	NS[0,7,0] = 70; NS[0,7,1] = 71; NS[0,7,2] = 72; NS[0,7,3] = 73;
	NS[0,7,4] = 74; NS[0,7,5] = 75; NS[0,7,6] = 76; NS[0,7,7] = 77;

	TX[0,0] = 00; TX[0,1] = 01; TX[0,2] = 02; TX[0,3] = 03;
	TX[0,4] = 04; TX[0,5] = 05; TX[0,6] = 06; TX[0,7] = 07;

end;

Value1 = NS[0,0,7];
Value2 = NS[0,3,7];
Value3 = NS[0,7,7];
Value4 = TX[0,3];
Value5 = TX[0,7];

Print(Date:6:0, Time:5:0, Value1:3:0, Value2:3:0, Value3:3:0,
	Value4:3:0, Value5:3:0);

if FALSE then Plot1(Value1, "");


--------------

Resulting printout:

   980806 1615 70 73 77  3  7

It should be:

   980806 1615  7 37 77  3  7

Conclusions: Two dimensional arrays work but three dimensional arrays do
not due to an error in calculating the indexing. (Obviously, it never could
have been tested.)

--------------

Response from Omega (3rd response):

--------------

From: EasyLang <EasyLang@xxxxxxxxxxxxxxxxx>
To: "'Bob Fulks'" <bfulks@xxxxxxxxxxxx>
Subject: RE: Multidimensional Array
Date: Fri, 14 Aug 1998 16:03:50 -0400
MIME-Version: 1.0

980814BB

Thank you for taking the time to send us an inquiry.

After further testing, we have determined that three dimensional arrays
are not functional with the current version of our program.  The only
solution we can offer you is to create one or multiple arrays that are
at maximum two dimensional.

Regards,

Benjamin Blanco
Easy Language Specialist
Omega Research, Inc.