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

Re: [amibroker] Re: Easy way of finding MAX or a large list


  • Date: Thu, 21 Jan 2010 21:37:33 +0100
  • From: Tomasz Janeczko <groups@xxxxxxxxxxxxx>
  • Subject: Re: [amibroker] Re: Easy way of finding MAX or a large list

PureBytes Links

Trading Reference Links

Hello,

That is of course **NOT** true when it comes to array variables.
Array-aware MAX

x = MAX( array1, array2 );

is orders of magnitude faster than equivalent

for( i = 0; i < BarCount; i++ )
  if( array1[ i ] > array2[ i ] ) x[ i ] = array1[ i ];
  else x[ i ] = array2[ i ];

The original poster question was far too general. He did not mention
if he uses arrays or not and how he defines "the list" of values.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-01-21 19:50, Dennis Brown wrote:
> For a loop, it is much faster to use an if ( var1>  var2 ) { max1 = var1; }
> The max operator is much slower from my tests.
>
> I don't know about configuring it for an array operator.
>
> BR,
> Dennis
>
> On Jan 21, 2010, at 12:50 PM, Rob wrote:
>
>    
>> I should have added... I'm trying to find the max value of a large list of variables...
>>
>> --- In amibroker@xxxxxxxxxxxxxxx, "Rob"<sidhartha70@xxx>  wrote:
>>      
>>> Is there an easy way in AFL to find the maximum value of a large list...?
>>>
>>> Is it a case of a for...next loop or nested Max() statements...?
>>>
>>> Many Thanks
>>>
>>>        
>>
>>
>>
>> ------------------------------------
>>
>> **** IMPORTANT PLEASE READ ****
>> This group is for the discussion between users only.
>> This is *NOT* technical support channel.
>>
>> TO GET TECHNICAL SUPPORT send an e-mail directly to
>> SUPPORT {at} amibroker.com
>>
>> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
>> http://www.amibroker.com/feedback/
>> (submissions sent via other channels won't be considered)
>>
>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> Yahoo! Groups Links
>>
>>
>>
>>      
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
>
>    


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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/