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

[amibroker] Re: New Variable Class



PureBytes Links

Trading Reference Links

Phsst,
Let us make it better !!
Since some indicators are OHLCV functions [not only Close, like RSI
()), SetForeign() gives the solution

function MeanRSIforGroup( listnum )
{
 list = GetCategorySymbols( categoryGroup, listnum );
 Average = 0; 
 for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
 {
SetForeign(sym,True,True);   
   f=RSI();
   
Average = Average + f;
 }
 return Average / i; 
}
MeanRSI=MeanRSIforgroup(254);
Plot( MeanRSIforGroup( 254 ), "MeanRSI", colorPink ); 

Now you may set f=StochD() to have the MeanStochD etc.
The above MeanRSI is a unique array for all tickers and may replace 
the composite procedure, when necessary.
Example: I need to watch every 1min the probable MeanRSI support 
breakout and, the same time, I need AA widow for other jobs. I need 
also clear mind and cold blood, 10 min before the end, to decide a 
Buy at Close ...[tomorrows Open will be probably higher...]
In this case, the price of this function alone is a [small] zero, 
ADDED after the last digit of amibroker price.
Tomasz offerred it for free, in some beta and, at least, we should 
know that ...
As for the delay, in my N100 database is less than 2sec.
 
Dimitris Tsokakis 
--- In amibroker@xxxxxxxxxxxxxxx, "Phsst" <phsst@xxxx> wrote:
> Dimitris,
> 
> Yes I did notice that, but I was not going to embarrass you by
> pointing out that little BUG... <LOL>  (Has anyone seen my dunce 
hat?)
> 
> Good work and thanks,
> 
> Phsst
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
<TSOKAKIS@xxxx>
> wrote:
> > Phsst,
> > But, did you see the results list ?
> > If positive, you should notice 300 *same* numbers, which was 300 
same 
> > MeanRSIs !!!
> > OK, it is written in the user's guide that we will have some 
delays 
> > with GetCategorySymbols(), but not so much !!!
> > Dimitris Tsokakis
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Phsst" <phsst@xxxx> wrote:
> > > Dimitris,
> > > 
> > > You are a Master at taking AB AFL into uncharted territory.
> > > 
> > > I ran this Explore against a 300 issue watchlist for N = 1 last 
> > days.
> > > I took 12 minutes to run.
> > > 
> > > Too long... A new persistant variable class with simple one-pass
> > > reporting would be quick and uncomplicated.
> > > 
> > > Regards,
> > > 
> > > Phsst
> > > --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
> > <TSOKAKIS@xxxx>
> > > wrote:
> > > > Phsst,
> > > > the procedure is described at GetCategorySymbols( category, 
> > index ) 
> > > > example.
> > > > Here is, for example, the MeanRSI
> > > > 
> > > > function MeanRSIforGroup( listnum )
> > > > {
> > > >  list = GetCategorySymbols( categoryGroup, listnum );
> > > >  Average = 0; 
> > > >  for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
> > > >  {
> > > >    C1 = Foreign( sym, "C" );
> > > >    f=RSIa(C1,14);
> > > >    if( i == 0 ) Average = f;
> > > >    else Average = Average + f;
> > > >  }
> > > >  return Average / i; 
> > > > }
> > > > Plot( MeanRSIforGroup( 254 ), "MeanRSI", colorPink ); 
> > > > Filter=MeanRSIforGroup(254)>50;
> > > > AddColumn(MeanRSIforGroup( 254 ), "");
> > > > 
> > > > It is a bit slow, but it is one-step composite creation for 
both 
> > > > IB/AA.
> > > > Dimitris Tsokakis
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "Phsst" <phsst@xxxx> wrote:
> > > > > Currently, all variables (global and local) reflect 
information 
> > > > about
> > > > > the current symbol only.
> > > > > 
> > > > > To perform calculations against multiple securities, you 
must 
> > use
> > > > > AddToComposite which restricts the user to O,H,L,C,V,OI 
fields 
> > along
> > > > > with their pre-defined constraining formats which preclude 
the
> > > > > calculation and storage of very large numbers. It also 
usually
> > > > > requires at least two passes against separate AFL or AFL/IB 
afl 
> > code
> > > > > to work with the results.  There is certainly a need for
> > > > > AddToComposite, but I think there is also a need for a 
simpler 
> > set 
> > > > of
> > > > > composite values.
> > > > > 
> > > > > I'd like to see a new variable class within AFL for 
computations
> > > > > across the entire database or watchlist. For lack of a 
better 
> > word, 
> > > > a
> > > > > "composite variable" whose value is maintained across 
multiple
> > > > > securities and which the AFL engine does not initialize 
with 
> > each 
> > > > new
> > > > > symbol. Also, a composite variable that can be displayed 
with
> > > > > AddColumn just like the other variables using Filter = 
LastBar 
> > > > logic.
> > > > > 
> > > > > This would allow the user to put together some quick, one-
pass
> > > > > explorations for calculating multiple issue stats and to 
> > display 
> > > > those
> > > > > figures in the same afl. No ~Composite files would be 
created, 
> > and
> > > > > very large numbers could be calculated and displayed using 
more
> > > > > flexable variable type declarations of float (or others).
> > > > > 
> > > > > I'm posting this here to see if I am alone in wanting this 
> > feature, 
> > > > in
> > > > > which case I won't pass it along to TJ as a suggestion.
> > > > > 
> > > > > Comments?
> > > > > 
> > > > > Phsst


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/xlw.sC/XP.FAA/3jkFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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