PureBytes Links
Trading Reference Links
|
Stephane,
Where is this periode involved in your example ?
Is it before or after the composite creation ?
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Stephane Carrasset"
<nenapacwanfr@xxxx> wrote:
> yes not a main problem, just a little deception, because I did
> believe that I could optimize on composite but it is not the case
> because as you said the result is aligned with the shortest history
> of the younger stock
>
> ex
> period=Optimize("pds",10,10,30,1);
> 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 );
>
> Buy=Cross(CCIa(C,14),0) AND Composite(1)>0;
> Sell=ExRemSpan(Ref(Buy,-3),3);
> > Stephane,
> > My greenglish are not better [!]
> > On the subject now, I always use composites in aligned database
and
> I
> > didn´t know this. I think it is not a main problem...
> > Dimitris Tsokakis
> > --- In amibroker@xxxxxxxxxxxxxxx, "Stephane Carrasset"
> > <nenapacwanfr@xxxx> wrote:
> > > Sorry for my frenglish
> > > yes that's exactly what i mean
> > > -->GetCategory function will give an output ONLY for the dates
> > > > of the younger stock
> > >
> > >
> > > > Anthony,
> > > > If you have, in the same group, stocks with different
starting
> > > date,
> > > > then the GetCategory function will give an output ONLY for
the
> > > dates
> > > > of the younger stock. Perhaps this is the meaning of
Stephane´s
> > > > comment...
> > > > Dimitris Tsokakis
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso"
> > > <ajf1111@xxxx>
> > > > wrote:
> > > > > Stephane,
> > > > >
> > > > > I do not understand your, "limited to the smallest range of
> > data
> > > > available"
> > > > >
> > > > > I use these functions everyday with success....I compared
> your
> > > > posted
> > > > > formulas and the outputs are the same.
> > > > >
> > > > > Anthony
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Stephane Carrasset" <nenapacwanfr@xxxx>
> > > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > > Sent: Thursday, November 06, 2003 5:25 AM
> > > > > Subject: [amibroker] Re: New Variable Class
> > > > >
> > > > >
> > > > > > 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
> > > > > >
> > > > > >
> > > > > >
> > > > > > Send BUG REPORTS to bugs@xxxx
> > > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > > -----------------------------------------
> > > > > > 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/
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > ---
> > > > > Outgoing mail is certified Virus Free.
> > > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > > Version: 6.0.536 / Virus Database: 331 - Release Date:
> 11/4/2003
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/
|