Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 10-30-2009, 12:07 PM   #1

Join Date: May 2008
Location: amsterdam
Posts: 114
Ignore this user

Thanks: 25
Thanked 38 Times in 30 Posts



Array_GetMaxIndex + Array_SetMaxIndex

i have recently installed the old version of TradeStation, the 2000i and i am not able
to find both functions/reserved words

Array_GetMaxIndex
Array_SetMaxIndex

they do not seem to be a reserved word or function in this version of TradeStation.

i would apreciate it if anyone here could post both functions as text or let me know
if there is another way to reduce the number of index places inside an array after they
have been verified. i could program the Array_GetMaxIndex myself but i am not sure how
to handle the other one
flyingdutchmen is offline  
Reply With Quote
Old 10-30-2009, 12:24 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,590
Ignore this user

Thanks: 2,027
Thanked 1,402 Times in 862 Posts



Re: Array_GetMaxIndex + Array_SetMaxIndex

they are keywords, not functions.
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
Old 10-30-2009, 12:49 PM   #3

Join Date: May 2008
Location: amsterdam
Posts: 114
Ignore this user

Thanks: 25
Thanked 38 Times in 30 Posts



Re: Array_GetMaxIndex + Array_SetMaxIndex

how to get around it and still be able to increase or decrease the amount of indexplaces
inside an existing array,
is my observation correct that they did not exist yet in ts2ki version?

it does have the functions NthHighest_A and others but i am trying to find
the place where the second largest or N-largest number is stored inside an existing array
not the number itself but the indexplace.

does this TS version have any other way to find the amount of values stored in an
array?

lets say i have an array which has stored 50 values, then i am using NthHighestArray( MyArray, 50, 3 ) to find
the 3th highest number in that array.this 3th highest number i would like to change in another number, therefore i do need to know the
place where this 3th highest number is stored in order to be able to change it.

Last edited by flyingdutchmen; 10-30-2009 at 01:00 PM.
flyingdutchmen is offline  
Reply With Quote
Old 10-30-2009, 01:01 PM   #4

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,590
Ignore this user

Thanks: 2,027
Thanked 1,402 Times in 862 Posts



Re: Array_GetMaxIndex + Array_SetMaxIndex

depending on your time value of money...
MultiCharts might be cheaper



or is it the money value of your time
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
Old 10-30-2009, 01:05 PM   #5

Join Date: May 2008
Location: amsterdam
Posts: 114
Ignore this user

Thanks: 25
Thanked 38 Times in 30 Posts



Re: Array_GetMaxIndex + Array_SetMaxIndex

Quote:
Originally Posted by Tams »
depending on your time value of money...
MultiCharts might be cheaper



or is it the money value of your time
another platform is not an option, i am not here to discuss what software to use but rather
to find out how to solve this in this old ts version.

i have used another easy language compatible software which i am not using anymore for various reasons up till last month and this was a pretty easy task,
i find it hard to believe it cant be done even in an older version of tradestation.

if you do not see another way how i could do what i would like to do in this version of
ts just let me know.

Last edited by flyingdutchmen; 10-30-2009 at 01:11 PM.
flyingdutchmen is offline  
Reply With Quote
Old 10-30-2009, 01:07 PM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,590
Ignore this user

Thanks: 2,027
Thanked 1,402 Times in 862 Posts



Re: Array_GetMaxIndex + Array_SetMaxIndex

Quote:
Originally Posted by flyingdutchmen »
another platform is not an option, if you do not see another way how i could do what i would like to do in this version of
TS just let me know.

I guess if you really try... GV might help.
otherwise hashnum or pushpop?
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
Old 10-30-2009, 01:43 PM   #7

Join Date: May 2008
Location: amsterdam
Posts: 114
Ignore this user

Thanks: 25
Thanked 38 Times in 30 Posts



Re: Array_GetMaxIndex + Array_SetMaxIndex

gv = Global Variables ?
flyingdutchmen is offline  
Reply With Quote
Old 10-30-2009, 04:38 PM   #8

Join Date: May 2008
Location: amsterdam
Posts: 114
Ignore this user

Thanks: 25
Thanked 38 Times in 30 Posts



Re: Array_GetMaxIndex + Array_SetMaxIndex

tought i keep you updated.

i have found solutions for both isues, finding out where exactly the n-highest
or n-lowest value is stored wasnt to hard.i have codet an function to do the work.
no need for multi-charts or any other software

i now am able to change the N-highest value within an array
MyArray[ IndexOfNHighestArray( MyArray, N, ArraySize ) ] = anything;

i believe i even found a tricky way to decrease or increase the indices within an
existing array, this one i am still working on.

if there is any interest from other 2000i users i will post the scripts later on
flyingdutchmen is offline  
Reply With Quote

Reply

Tags
array

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


All times are GMT -4. The time now is 05:45 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.