PureBytes Links
Trading Reference Links
|
Dimitri , that's a great function
except that compared to the composite function the value are
unfortunately limited to the smallest range of data available
for example, compare
function Composite( listnum )
{
list = GetCategorySymbols( categoryWatchlist, listnum );
Average = 0;f=0;
for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
{
SetForeign(sym,True,True);
f=IIf(MFI(14)>50,1,-1);
Average = Average + f;
}
return Average ;
}
Plot( Composite(1), "MeanRSI", colorPink );
WITH
AddToComposite( IIf(MFI(14)>50,1,-1), "~CompMFI", "X");
Buy=Sell=0;
Plot(Foreign( "~CompMFI", "x"),"~MFI",colorBlue,1);
stephane
> Stephane,
> It is 1-1 equivalent to the "~MeanRSI" artificial ticker.
> It is impemented some time ago, the method is clearly described in
> Tomasz GetCategorysymbols() description, but, I will repeat it
here,
> the upgrades are so fast that many users dont even notice a lot of
> new [great] tools.
> See also the extended use of this function in my Hi-pass or
> Inspection Points series. This use is unique, AFAIK, to select the
> ticker with highest Equity from Ind.Builder.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "Stephane Carrasset"
> <nenapacwanfr@xxxx> wrote:
> > Dimitri,
> > I like too much this kind of "composite"..
> > stephane
> >
> > > 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 from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/I3w.vC/hP.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/
|