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

Re: [amibroker] Re: Announcing ABtool v0.9.3.6



PureBytes Links

Trading Reference Links

Hi Fred,
on April 23 I had posted some code which shows 
how to "remotely" control the AA part of AB (see below). 
Thanks to the AB COM API the realization of this is possible. 
If you have a concept in mind from the point of a
user how he/she would like to call such functions 
to do this, that would help much.
UM

----- Original Message ----- 
From: "Uenal Mutlu" <uenal.mutlu@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, April 23, 2003 12:35 AM
Subject: Re: [amibroker] Results of Scan/Exploration


> Hi Stewart,
> 
> here is some code which demonstrates the use
> of the Analysis module from within C++ (here the 
> "Explore" part is used from within an other application).
> In this example, it reads an AFL file named myscript.afl 
> from ABtool directory which is in the AB dir. And, it puts 
> the result into a text file named result.csv also in this dir. 
> myscript.afl must contain a valid AFL script (ie.
> at least Filter and AddColumn must be given).
> It runs the script on the watchlist number 11 for the date
> range 4/11/2003 to 4/14/2003 
> 
> UM
> 
> //--------------------------------------------------------------------
> bool AB_Analysis_Module()
>   { 
>     Broker::IApplicationPtr pAmiBroker("Broker.Application");
>     Broker::IAnalysisPtr    pAA = pAmiBroker->Analysis;
>     if (pAA == 0)
>        return false;
>     if (pAA->LoadFormula("ABtool\\myscript.afl") == 0)
>        return false;
>     pAA->ClearFilters();
>     pAA->ApplyTo   = 2;  // 0=all stocks, 1=current stock, 2=use filter
>     pAA->RangeMode = 3;  // 0=all quotes, 1=n last quotes, 2=n last days, 3=from-to date 
> 
>     pAA->RangeFromDate = COleDateTime(2003, 4, 11, 0, 0, 0);
>     pAA->RangeToDate   = COleDateTime(2003, 4, 14, 0, 0, 0);
> 
>     // if AppyTo == 2 --> set Filter here:
>     pAA->PutFilter(0, "watchlist", 11);  // nType: 0=include, 1=exclude
>                                          // Category: "index", "favorite", "market", "group", "sector", "index", "watchlist"
>                                          // 3rd param: WL nbr
> 
>     pAA->Explore();
>     pAA->Export("ABtool\\result.csv");
...


----- Original Message ----- 
From: "Fred" <fctonetti@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, May 11, 2003 1:43 AM
Subject: [amibroker] Re: Announcing ABtool v0.9.3.6


> Uenal,
> 
> With regards to EXEcuting external programs, it would be extremely 
> helpful to be able to from within AFL run an EXPLORE followed by an 
> AA followed by a ? and at each juncture be able to change ANY and ALL 
> the settings not just the ones that are currently allowable in AFL 
> i.e. the radials etc.
> 
> Any chance for a modification to accomplish this ?
> 
> Fred
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Fred" <fctonetti@xxxx> wrote:
> > Uenal,
> > 
> > Thanks for the new features.
> > 
> > This is an EXTREMELY beneficial tool and will be even more so with 
> > the new features.
> > 
> > Thanks again, Fred
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, uenal.mutlu@xxxx wrote:
> > > The latest version of the ABtool plugin for AB can be found at 
> the 
> > following locations:
> > >  - File area of the "amibroker" group at yahoo:
> > >      http://groups.yahoo.com/group/amibroker/files/ABtool/
> > > 
> > >  - In the support area / 3rd party downloads at www.amibroker.com:
> > >      http://www.amibroker.net/3rdparty.php
> > > 
> > >  - Or, email me:
> > >      uenal.mutlu@xxxx
> > > 
> > > HIGHLIGHTS OF THIS VERSION (see also History and ToDoList at the 
> > end of the reference file):
> > >      - Multi-Dimensional arrays
> > >      - Log file for user's own use
> > >      - Starting other programs from within AFL
> > >      - Getting/Setting environment variables
> > >      - Getting Date and Time of today
> > >      - Getting Day of Week (DOW)
> > >      - Getting current directory
> > >      - Exporting optionally only the top N rows of a table
> > > 
> > > Below is an example for the use of multidimensional arrays.
> > > Please note, that from now on all ABtool plugin functions have to 
> > be prefixed 
> > > with an "xx". For details see the reference text file in the 
> > distribution archiv.
> > > 
> > > UM
> > > 
> > > //----------------------------------------------------------------
> --
> > ------------
> > > // ArrayXXX.afl
> > > // Multidimensional Arrays in ABtool plugin v0.9.3.6+
> > > // Written 030510Sa by Uenal Mutlu
> > > 
> > >    xxABtoolInit();
> > >    Filter = True;
> > >    AddTextColumn(xxDirCurGet(), "curDir");
> > > 
> > >    // a 4D array with 4x6x15x30 elements of type 12 (int16; see 
> Doc)
> > >    hArr = xxArrayCreate(12, 0,  4, 6, 15, 30);
> > >    if (hArr >= 0)
> > >      {
> > >        for (i1 = 0; i1 <  4; i1++)
> > >        for (i2 = 0; i2 <  6; i2++)
> > >        for (i3 = 0; i3 < 15; i3++)
> > >        for (i4 = 0; i4 < 30; i4++)
> > >          {
> > >            valA = 100 + i1 + i2 + i3 + i4;   // testvalue
> > > 
> > >            // set element content
> > >            xxArrayNumValSet(valA, hArr, i1, i2, i3, i4);
> > > 
> > >            // get element content
> > >            valB = xxArrayValGet(hArr, i1, i2, i3, i4);
> > > 
> > >            //...
> > >          }
> > > 
> > >        //...
> > > 
> > >        xxMsgBox("Array filled", "Success");
> > >        xxArrayDelete(hArr);    // release the handle and the 
> memory 
> > it had used
> > >      }
> > >    else
> > >      xxMsgBox("Array could not be created. Check Dim 
> > params!", "Error!", 16);
> > > //----------------------------------------------------------------



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/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/