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

RE: [amibroker] Gettin Started



PureBytes Links

Trading Reference Links

Hi,

Thanks to b and Jayson for their help.

I am trading South African stocks, so unfortunately the getextradata 
function is not an option as I'm not aware of a getextradata-
compatible provider who carries full South African info.

b's suggestions of either an additional ticker or packing the values 
into open interest do look interesting. I will investigate them 
further.

What are your throughts about developing a fairly simple AFL plugin 
to return additional values from a database when passed a stock code 
and date? For example, I could have a database of dividend yields for 
all South African stocks for the last 10 years, I would then create 
an AFL plugin that, when passed a stock code and value, returns the 
appropriate value.

I have not worked with Amibroker before so I may be talking nonsense, 
however, it looks like developing an AFL plugin will be a superior 
solution as I can then create custom indicators using my new AFL 
functions.

Any comments?

Thanks for the help,

Russel

--- In amibroker@xxxxxxxxxxxxxxx, b <b519b@xxxx> wrote:
> Jayson's approach is the simplest one for actually trading.
> I had assumed, perhaps wrongly, that the original question
> was asked because the builtin getextradata call was not
> able to give sufficient data history for the testing of
> system settings.
> 
> In such cases, and assuming you have the additional data in
> an ascii or csv file, then the more awkward "secondary"
> ticker approach might be the only way to go to set up the
> "research" database in AB. Of course, one a good system has
> been developed one will then want to sign up with a data
> provider to have an easy way (via the getextradata call) to
> get current EY and DY data to actually trade the system.
> 
> --- Jayson <jcasavant@xxxx> wrote:
> > Russell,
> > another approach is to use the built-in getextradata
> > function though it
> > requires a pay data source...
> > 
> > Regards,
> > Jayson
> > 
> >       GETEXTRADATA
> >       - get extra data from external data source
> > Miscellaneous functions
> >       (AFL 1.9)
> > 
> > 
> >       SYNTAX  GetExtraData(
> >       RETURNS NUMBER or ARRAY or STRING
> >       FUNCTION  Retrieves data-source specific data.
> >       Currently only Quotes Plus and TC2000 plug-isn
> > support this function.
> >       The list of fields available via QP2 plug-in:
> >         a.. "AnnDividend"
> >         b.. "Shares"
> >         c.. "SharesFloat"
> >         d.. "IssueType" (string)
> >         e.. "SharesOut"
> >         f.. "SharesShort"
> >         g.. "TTMsales"
> >         h.. "Beta"
> >         i.. "TTMEps"
> >         j.. "HiPERange"
> >         k.. "LoPERange"
> >         l.. "PEG"
> >         m.. "InstHolds"
> >         n.. "LTDebtToEq"
> >         o.. "CashFlowPerShare"
> >         p.. "ROE"
> >         q.. "TTMSales"
> >         r.. "Yr1EPSGrowth"
> >         s.. "Yr5EPSGrowth"
> >         t.. "Yr1ProjEPSGrowth"
> >         u.. "Yr2ProjEPSGrowth"
> >         v.. "Yr3to5ProjEPSGrowth"
> >         w.. "BookValuePerShare"
> >         x.. "Briefing" (string)
> >         y.. "QRS" (array)
> >         z.. "HasOptions"
> >       The list of fields available via TC2000 plug-in:
> > 
> >         a.. "BOP" - balance of power indicator
> >         b.. "MoneyStream" - money stream indicator
> > 
> >       EXAMPLE GetExtraData("briefing"); /* gives briefing
> > text (STRING) */
> >       graph0 = GetExtraData("QRS"); /*gives Quotes Plus
> > relative strength
> > (ARRAY) */
> >       SEE ALSO
> > 
> > See updated/extended version on-line.
> > 
> > -----Original Message-----
> > From: b [mailto:b519b@x...]
> > Sent: Friday, January 09, 2004 11:13 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Getting extra data into AB (was
> > Dividend/Earnings
> > Yields)
> > 
> > 
> > Russel,
> > 
> > There are two ways to get the data into AB. Both will
> > require you to write
> > an
> > external program in Basic, C, or Delphi to pre-process
> > the data before
> > importing
> > into AB.
> > 
> > The first mehtod is that of putting the new data into the
> > OI field. To put 1
> > data
> > item into the OI field, you would multiply that item by
> > whatever is needed
> > to get
> > ride of the decimals (since the OI field only stores
> > integer values). So if
> > the EY
> > was 5.98% it could be stored in OI as 598 and then in
> > your AFL code you
> > could access
> > the EY value in AB with this code: oiEY = OI/100;
> > 
> > But since you want both EY and DY, you would need to
> > "pack" the two items
> > into the
> > one OI slot by shifting one of the values by 1000 during
> > the packing process
> > and
> > reversing the shift when using it in AB. Also packing
> > requires that ceiling
> > values
> > be put on the items to be packed so they do not overlap
> > each other when
> > packed. In
> > practice that means one could pack two 3 digit items in
> > the OI (or a 2 digit
> > and a 4
> > digit item). For example:
> > 
> > Packing code (in AFL for understanding, but will need to
> > be translated into
> > Basic or
> > C or Delphi to create the external pre-processing program
> > that will do the
> > packing.)
> > DY = ...whatever....
> > EY = ...whatever...
> > shiftedDY = DY*100;
> > shiftedDY = iif(shiftedDY > 999,999,shiftedDY);
> > shiftedEY = EY*100;
> > shiftedEY = iif(shiftedEY > 999,999,shiftedEY);
> > packedOI = DY*1000 + EY*1;
> > 
> > If you do not want to limit the DY and EY to a 9.99%
> > ceiling, you can not
> > use the OI
> > packing approach.
> > 
> > The alternative is to use create a "secondary" ticker for
> > every ticker
> > currently in
> > your database and put the DY and EY values into these
> > "secondary" tickers.
> > This
> > avoids the problems with packing and unpacking and
> > artifical ceilings on
> > values.
> > 
> > You will settle need to write an external program to
> > place the values in a
> > datafile
> > that will get imported into AB to create the secondary
> > ticker. It could do
> > something
> > like this. Again I will use AFL code to get the idea
> > across, but it will
> > need to be
> > translated into Basic or C or Delphi.
> > 
> > Open = EY;
> > High = DY;
> > Low = something else you might want to use in testing
> > Close = something else you might want to use in testing
> > Volume = something else you might want to use in testing
> > OI = something else you might want to use in testing
> > 
> > If the EY and DY data is for IBM, then give the new
> > ticker the name "IBM_2".
> > After
> > importing this secondary ticker into AB, you can get its
> > values by just
> > using the
> > following call:
> > 
> > EY = Foreign( Name() + "_2", "Open");
> > DY = Foreign( Name() + "_2", "High");
> > 
> > The secondary ticker approach is simplier to set up and
> > use and it has more
> > capacity
> > (up to 6 data items without packing), but there is a
> > small, but noticable
> > speed
> > penalty since AB has to line up the dates of the
> > secondary ticker with the
> > primary
> > one before returning the Foreign values for each date.
> > 
> > b
> > 
> > --- russel762003 <RWebber@xxxx> wrote:
> > > Hi,
> > >
> > > Does anyone know whether it is possible to import
> > dividend yields and
> > > earnings yields into Amibroker? And whether these
> > values can then be
> > > used in AFL?
> > >
> > > Thanks,
> > >
> > > Russel
> > >
> > >
> > >
> > >
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > 
> === message truncated ===
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus



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 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/amibroker/

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/