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

Re: [amibroker] Re: AmibrokerU Update


  • Date: Thu, 18 Mar 2010 16:33:02 -0400
  • From: Herman <psytek@xxxxxxxx>
  • Subject: Re: [amibroker] Re: AmibrokerU Update

PureBytes Links

Trading Reference Links

Jorgen, is this related to anything you do?

herman

> Rather than trying to diagnose with incomplete info, let me offer a
> procedure that should work on most any setup -

> 1. Set the chart ticker to SPY.
> 2. Load the sample program that I posted as an indicator on a chart
> tab.  (I'll also upload it to the original article later today).
> 3. Look at the From/To range in the AA windows and verify that the
> Start date is AFTER the start of the SPY data from your provider,
> AND that an AA function has been run with this Start date.
> 4. Set the watchlist number to a populated watchlist number in chart Parameters.
> 5. Using parameters, click Calculate.
> 6. The ATC average should appear in the chart window of the samples program.

> If that works, you don't need to read further unless you just want to know why I was specific.

> The original program was a basic example, without frills.  I used
> the AA window From/To user interface in order to control the list
> average result range.  You need to make sure that that date range is
> contained within the data that you have for the chart ticker.  SPY
> is usually a safe bet as it is in most databases and has a long
> history.  For example the one that I have loaded right now goes back
> to 1993.  I have the From/To range set to 1/1/2003 to 1/1/2020 (to
> get the last day always).  Remember that this range has to be
> "locked in" if you change it by executing an AA program.  It doesn't
> matter what that program is or even if it errors off - it will set the range.

> If you do the above exactly and still have issues, let me know.

> -- BruceR






> --- In amibroker@xxxxxxxxxxxxxxx, furinkazaan <furinkazaan@xxx> wrote:
>>
>> Bruce, I have problems getting this AFL to do the job.
>> I confirm having done the following
>> 
>> >ListAvg.afl in "include" folder
>> >saved the atc afl into custom folder. Can see it in my charts tab. also can
>> see atc in group 253.
>> >opened blank chart - File>new>blank Chart
>> > Run listavg.afl from charts tab and changed parameters with WL number and
>> clicked calculate
>> All I can see is a flat line at a NON-ZERO value
>> I have tried both with the original ATC formula, as well as the tweak you
>> provided that calls names atc with watchlist name, rather than wlnum.
>> Any ideas on what i am doing wrong?
>> 
>> 
>> On 18 March 2010 14:41, furinkazaan <furinkazaan@xxx> wrote:
>> 
>> > this is a free code project that Bruce posts in the free Library on the
>> > Amibroker University.
>> > http://www.amibrokeru.com/FreeLibrary/FreeCode
>> >
>> >
>> > On 1 January 2010 13:28, Gordon <gordonpelletier@xxx> wrote:
>> >
>> >>
>> >>
>> >> I m trying to follow this thread with some difficulty. I cannot find any
>> >> reference to ListAvg.afl anywhere is the literature. Would you please tell
>> >> me where it can be located.
>> >>
>> >> Thanks
>> >>
>> >>
>> >> --- In amibroker@xxxxxxxxxxxxxxx <amibroker%40yahoogroups.com>, "Bruce"
>> >> <brucer@> wrote:
>> >> >
>> >> > I'm buried in some end of the year paperwork right now, but let me offer
>> >> a couple of quick comments.
>> >> >
>> >> > 1. The dropdown list of names is in the expanded version that I plan to
>> >> put in the subscriber area along with some other functions related to
>> >> portfolio mixes, such as percentage allocations, re-balance intervals, etc.
>> >> My long-term intent is really to offer "starter" examples in the FREE CODE
>> >> area that users can expand on. We want to concentrate on breadth of topics
>> >> there.
>> >> >
>> >> > 2. One simple tip that might help deal with WL numbers in many places is
>> >> to name your watchlist to their number plus that name. That will make the
>> >> numbers easier to find in a long list of names in the watchlist tree. For
>> >> example, my watchlist 13 is named "13 - Select".
>> >> >
>> >> > 3. Lastly, the ATC should be going into Group 253 since atcFlagDefaults
>> >> was used in the ATC call in the example that I posted. I may have misread
>> >> your note, but it seemed to say that you believe are seeing it in the
>> >> watchlist. As far as what the ATC is named, you can use the name instead of
>> >> the number by changing the AddtoComposite statement to the following -
>> >> >
>> >> > AddToComposite( Lavg, "~ListAvg_" + CategoryGetName( categoryWatchlist,
>> >> wlnum ),
>> >> > "X", atcFlagDefaults + atcFlagEnableInIndicator );
>> >> >
>> >> >
>> >> > -- BruceR
>> >> >
>> >> >
>> >> > --- In amibroker@xxxxxxxxxxxxxxx <amibroker%40yahoogroups.com>,
>> >> furinkazaan <furinkazaan@> wrote:
>> >> > >
>> >> > > Bruce, I notice that the parameters use a WLNUMfor a watch list
>> >> number.
>> >> > > Since I intend to run this on many sectoral watchlists, I wonder if we
>> >> can
>> >> > > show the 'Watchlist Name' instead of/ in addition to WL NUM? Can the
>> >> > > Parameters dialog be coded to offer a drop-down list of all watchlists
>> >> to
>> >> > > the current market? Can the LAVG be defined to show "~ListAVg" +
>> >> Watchlist
>> >> > > Name?
>> >> > >
>> >> > > while its fantastic that each atc is written ijnto the watchlist
>> >> folder for
>> >> > > which it is computed, if I got them all into 1 group to check, say
>> >> relative
>> >> > > performance, then I'd have trouble identifying eact atc by just the WL
>> >> Num.
>> >> > >
>> >> > > can you help? Best wishes for a great year ahead!
>> >> > >
>> >> > >
>> >> > > 2009/12/11 furinkazaan <furinkazaan@>
>> >> > >
>> >> > > > Thanks very much Bruce. I intend to set this up over the weekend.
>> >> I'll
>> >> > > > report progress.
>> >> > > >
>> >> > > > 2009/12/9 Rick Osborn <ricko@>
>> >> > > >
>> >> > > >
>> >> > > >>
>> >> > > >>
>> >> > > >>
>> >> > > >> changed the AA range and ran a dummy scan. That did the trick
>> >> > > >> Thanks
>> >> > > >>
>> >> > > >>
>> >> > > >> ------------------------------
>> >> > > >> *From:* Bruce <brucer@>
>> >> > > >> *To:* amibroker@xxxxxxxxxxxxxxx <amibroker%40yahoogroups.com>
>> >> > > >> *Sent:* Tue, December 8, 2009 8:16:46 PM
>> >> > > >>
>> >> > > >> *Subject:* [amibroker] Re: AmibrokerU Update
>> >> > > >>
>> >> > > >>
>> >> > > >>
>> >> > > >> Rick -
>> >> > > >>
>> >> > > >>
>> >> > > >> Not much info, so I can't be sure. A SWAG would be to check the
>> >> From/To
>> >> > > >> range in the AA window. As I noted in the original article, I used
>> >> the
>> >> > > >> existing AA user interface as an easy way to control the range. If
>> >> that is
>> >> > > >> it, you can change the AA range and run a dummy scan to "set it".
>> >> Or, you
>> >> > > >> might want to look at the ListAvg AFL code for a comment that notes
>> >> that a
>> >> > > >> variable called "bir" can be set to 1 to use all bars by default.
>> >> > > >>
>> >> > > >> -- Bruce
>> >> > > >>
>> >> > > >> --- In amibroker@xxxxxxxxx ps.com <amibroker%40yahoogroups.com>,
>> >> Rick
>> >> > > >> Osborn <ricko@> wrote:
>> >> > > >> >
>> >> > > >> > Bruce
>> >> > > >> > All the values in all the watchlists are 1000.
>> >> > > >> > What am I doing wrong?
>> >> > > >> >
>> >> > > >> >
>> >> > > >> >
>> >> > > >> >
>> >> > > >> >
>> >> > > >> > ____________ _________ _________ __
>> >> > > >> > From: Bruce <brucer@>
>> >> > > >> > To: amibroker@xxxxxxxxx ps.com <amibroker%40yahoogroups.com>
>> >> > > >>
>> >> > > >> > Sent: Tue, December 8, 2009 2:28:20 PM
>> >> > > >> > Subject: [amibroker] Re: AmibrokerU Update
>> >> > > >> >
>> >> > > >> >
>> >> > > >> > Sure, I'll give a (hopefully) useful example. And, I'll try to do
>> >> more
>> >> > > >> > of this, where possible, in the future. In order to facilitate
>> >> this,
>> >> > > >> > though, it is best to use a Chart Template, Complete file and
>> >> record a
>> >> > > >> > generic procedure for how to use it. Rather than introduce that
>> >> now,
>> >> > > >> > I'll walk you through a manual install.
>> >> > > >> >
>> >> > > >> > So, download the ListAvg.afl file to your include directory. If
>> >> you
>> >> > > >> > have done a stock install, it will be at C:\Program
>> >> > > >> > Files\Amibroker\ Formulas\ Include. You can verify this by
>> >> selecting the
>> >> > > >> > Tools / Preferences menu and then the AFL tab. The standard
>> >> include
>> >> > > >> > path will be the first Pick button.
>> >> > > >> >
>> >> > > >> > Now, take the following code and either save it in your Custom
>> >> formulas
>> >> > > >> > directory, or enter it into the code editor. The editor can be
>> >> launched
>> >> > > >> > from the Analysis / Formula Editor menu.
>> >> > > >> >
>> >> > > >> > Once it is copied into the editor, you can use the Tools / Insert
>> >> Chart
>> >> > > >> > menu to get a chart.
>> >> > > >> >
>> >> > > >> > This indicator uses parameters to select a watchlist to perform
>> >> the
>> >> > > >> > ListAvg on. Right click on the chart and select parameters.. You
>> >> will
>> >> > > >> > need to enter a watchlist number. When ready, click the Calculate
>> >> > > >> > parameter button to perform the calculation. Since this can be
>> >> lengthy,
>> >> > > >> > it is only done on user action. But, it is written to an
>> >> AddtoComposite
>> >> > > >> > ticker ("~ListAvg" + number) for each watchlist, and simply read
>> >> > > >> > thereafter.
>> >> > > >> >
>> >> > > >> > #include <ListAvg.afl>
>> >> > > >> > wlnum = Param( "Watchlist", 13, 1, 100, 1 );
>> >> > > >> > trig = ParamTrigger( "Calculate", "CLICK" );
>> >> > > >> > Lavg = Nz( Foreign( "~ListAvg" + wlnum , "C" ) );
>> >> > > >> > if ( trig )
>> >> > > >> > {
>> >> > > >> > Lavg = ListAvg( CategoryGetSymbols( categoryWatchlist, wlnum
>> >> > > >> > ) );
>> >> > > >> > AddToComposite( Lavg, "~ListAvg" + wlnum, "X",
>> >> > > >> > atcFlagDefaults + atcFlagEnableInIndi cator );
>> >> > > >> > }
>> >> > > >> > Plot( Lavg, "Watchlist " + wlnum + " ListAvg", colorDefault );
>> >> > > >> >
>> >> > > >> > Lastly, since you mentioned sector averages - I'll mention one
>> >> example
>> >> > > >> > use from my experience. Technology averages do not typically
>> >> indicate
>> >> > > >> > the health of innovative small-cap tech stocks. The averages are
>> >> driven
>> >> > > >> > by Intel, Microsoft, etc. An average of targeted, innovative
>> >> small-cap
>> >> > > >> > tech companies in a watchlist can be more useful for stock
>> >> investing.
>> >> > > >> >
>> >> > > >> > Hope that helps.
>> >> > > >> > -- Bruce
>> >> > > >> >
>> >> > > >> > --- In amibroker@xxxxxxxxx ps.com, furinkazaan <furinkazaan@>
>> >> > > >> wrote:
>> >> > > >> > >
>> >> > > >> > > Bruce, thanks for the afl. It comes at the most oppurtune time
>> >> when
>> >> > > >> > I'm
>> >> > > >> > > considering creation of many sectoral indices. However, rookie
>> >> that I
>> >> > > >> > am, I
>> >> > > >> > > am not able to figure out how to use the AFL. I would
>> >> appreciate a
>> >> > > >> > > step-by-step detail on how to use it, including where to copy
>> >> the afl,
>> >> > > >> > where
>> >> > > >> > > to store the csv list of tickers etc., and how to run it.. Can
>> >> the afl
>> >> > > >> > be
>> >> > > >> > > pointed to a watchlist instead of a csv file of tickers?
>> >> > > >> > >
>> >> > > >> > > Thanks again.
>> >> > > >> > >
>> >> > > >> > >
>> >> > > >> > > 2009/11/18 Bruce brucer@
>> >> > > >> > >
>> >> > > >> > > >
>> >> > > >> > > >
>> >> > > >> > > > Quick update - I've added a Free Code module and Free Code
>> >> article
>> >> > > >> > to
>> >> > > >> > > > AmibrokerU called ListAvg. For those who need for an equal
>> >> weighted
>> >> > > >> > > > average of a list of tickers, the Code module provides a
>> >> function
>> >> > > >> > that
>> >> > > >> > > > implements the result in a single call. If you are interested
>> >> in the
>> >> > > >> > > > background on the need for this function, and the problem
>> >> with other
>> >> > > >> > > > types of index and list averages, the article should be of
>> >> interest.
>> >> > > >> > > > Here are the links (sorry they are long, I'll fix that soon)
>> >> -
>> >> > > >> > > >
>> >> > > >> > > >
>> >> > > >> > http://www.amibroke ru.com/FreeLibra ry/FreeCode/ tabid/99/
>> >> > > >> articleType/ Arti\
>> >> > > >> > \
>> >> > > >> > > >
>> >> > > >> > cleView/articleId/ 109/ListAvg- ndash-A-Function -to-Calculate-
>> >> > > >> an-Equal- Wei\
>> >> > > >> > \
>> >> > > >> > > >
>> >> > > >> > ghted-Average- of-a-List- of-Tickers. aspx<http://www.amibroke
>> >> > > >> ru.com/FreeLi\
>> >> > > >> > brary/FreeCode/ tabid/99/ articleType/ ArticleView/ articleId/
>> >> > > >> 109/ListAvg- nd\
>> >> > > >> > ash-A-Function- to-Calculate- an-Equal- Weighted- Average-of-
>> >> a-List-of-
>> >> > > >> Ticke\
>> >> > > >> > rs..aspx>
>> >> > > >> > > >
>> >> > > >> > > >
>> >> > > >> > http://www.amibroke ru.com/FreeLibra ry/FreeArticles/ tabid/63/
>> >> > > >> articleType/ \
>> >> > > >> > \
>> >> > > >> > > >
>> >> > > >> > ArticleView/ articleId/ 110/ListAvg- ndash-Uses- and-Example..
>> >> aspx<
>> >> > > >> http://www\
>> >>  <http://www>> > >> <http://www>> .amibrokeru. com/FreeLibrary/
>> >> FreeArticles/ tabid/63/
>> >> > > >> articleType/ ArticleVie\
>> >> > > >> > w/articleId/ 110/ListAvg- ndash-Uses- and-Example. aspx>
>> >> > > >> > > >
>> >> > > >> > > > As we prepare to open up subscriptions to AmibrokerU soon,
>> >> I've
>> >> > > >> > received
>> >> > > >> > > > some questions about what types of free and subscription
>> >> content
>> >> > > >> > that we
>> >> > > >> > > > plan to add. In general, we will offer "lite" of "subset"
>> >> versions
>> >> > > >> > of
>> >> > > >> > > > premium code and articles available in the subscription
>> >> sections.
>> >> > > >> > > > ListAvg is an example of that. It implements an equal
>> >> weighted
>> >> > > >> > average
>> >> > > >> > > > of a CSV list, and is effectively re-balanced daily. Plans
>> >> call for
>> >> > > >> > a
>> >> > > >> > > > full-featured routine in the subscription section called
>> >> WtMixRebal
>> >> > > >> > that
>> >> > > >> > > > implements weighed averages that can be re-balanced at
>> >> different
>> >> > > >> > periods
>> >> > > >> > > > or based upon a signal. This module is useful for index
>> >> averages as
>> >> > > >> > > > well as portfolio modeling of a weighted list of tickers with
>> >> > > >> > shorting
>> >> > > >> > > > and margin with a fast, single function call.
>> >> > > >> > > >
>> >> > > >> > > > In addition to educational articles, I'm going to try to
>> >> cover
>> >> > > >> > broader
>> >> > > >> > > > topics of applications, with examples, that I've found
>> >> useful. In
>> >> > > >> > that
>> >> > > >> > > > spirit, the next topic will be about connecting to Excel and
>> >> > > >> > > > manipulating spreadsheets, charts, and data. That may seem a
>> >> little
>> >> > > >> > > > odd, but there are many uses for such an interface - both for
>> >> input
>> >> > > >> > to
>> >> > > >> > > > and output from Amibroker. For example - summary bar charts,
>> >> command
>> >> > > >> > > > button trading control, etc. More later ....
>> >> > > >> > > >
>> >> > > >> > > > -- BruceR
>> >> > > >> > > >
>> >> > > >> > > >
>> >> > > >> > > >
>> >> > > >> > >
>> >> > > >> >
>> >> > > >>
>> >> > > >>
>> >> > > >>
>> >> > > >
>> >> > > >
>> >> > >
>> >> >
>> >>
>> >>  
>> >>
>> >
>> >
>>




> ------------------------------------

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