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

[amibroker] To sort the productivity



PureBytes Links

Trading Reference Links

Hello !!

I wihs to sort all my database's stocks by using the productivity's indicator .The sort uses only the 2 last bars for each single stock .

The matter is that I use a "For" loop by accessing to each elements .And that is not a array .

If  I want to sort I must use a filter  and the function  "setsortcolums"   .But "filter and sortcolumms"  need data array ?

The purpose is to compare the productivity's stocks .Thanks ...

Here is my code ?

  stockname = Name();
  listdestocks = CategoryGetSymbols( categoryMarket, 2) ;   

  nbstock = 0 ;
 


for( i = 0; ( sym = StrExtract( listdestocks, i ) ) != ""; i++ )  
 {
  nbstock = i ;
  action = Foreign( sym, "Close");    
for( j = BarCount-1; j > BarCount-2 ; j-- )
{
  
   Rapport[j] = action[j]/action[j-1];  
   _TRACE(sym);
   _TRACE(NumToStr(Rapport[j]));  // Good value that i want to sort on the last month to compare the stocks beetween each other .
 

}  

  }
  nbstock++ ;  

Filter = 1 ;
AddColumn(Rapport,"Rapport",1.3);



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

**** 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/