Go Back   Traders Laboratory > Trading Resources > Trading Indicators > Coding Forum

Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Bookmarks
del.icio.us StumbleUpon Google Digg Facebook Furl Reddit Netscape

 
LinkBack Thread Tools Display Modes Language
  #1 (permalink)  
Old 05-02-2007, 01:44 PM
ImXotep ImXotep is offline
Registered Trader

 
Join Date: Jan 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Arrays

I have some questions:
1. is in TradeStation function returned an index of the maximal value in an one-dimensional array?!
2. If I create a dynamic array at each change of the size of a file of value of a array are nulled?
3. there is a function in TradeStation which nulls a array?

Reply With Quote
  #2 (permalink)  
Old 05-07-2007, 06:09 AM
swisstrader's Avatar
swisstrader swisstrader is offline
Registered Trader

 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Arrays

ImXotep,
1. yes, 'HighestArray', but this here is a faster running code:

Quote:
inputs:
PriceArray[MaxSize](NumericArrayRef),
Array_Size (NumericSimple);

vars:
ii(0), HH(-999999);

if MinList(MaxSize, Array_Size) > 1 and Array_Size <= MaxSize then begin
HH = -999999;
for ii = 1 to Array_Size begin
if PriceArray[ii] > HH then
HH = PriceArray[ii];
end;
end;

HighestArrayFC = HH;
2. that should be so, but with TS you never know what happens until you've tested it

3.
Quote:
inputs: PriceArray[MaxSize](NumericArrayRef);
vars: ii(0);

for ii = 0 to MaxSize begin
PriceArray[ii] = 0;
end;

ArrayNullSet = 0;
-swisstrader

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 07:21 PM.

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59