Use this code to load current symbol  (for example !COMP)

Docs = AB.Documents
Docs.Open("!COMP")


On Mon, Oct 19, 2009 at 2:49 AM, gajanan <[email protected]> wrote:

>
>
> HI,
> Thanks a lotsteve.. that helped partially ...
>
> I'm having problem setting the "current symbol" through VB.
>
> AOneStk = AStks.Item(stkPosition) 'only1 added
> ADocs.Open(symbol) 'SHUD THIS SET THE CURRENT SYMBOL?
> AOneDoc = ADocs.Item(0)
> tempName = AOneDoc.Name
> ' add to watchllist 9
> 'AOneStk.WatchListBits = AOneStk.WatchListBits + (1 << 9)
> AB.RefreshAll()
> ' use watchlist 9
> AA.Filter(0, "watchlist") = 9 ' /* watch list number */;
> 'set explore prams
> AA.ApplyTo = 1 ' current stock..but how is this selected.
> AA.RangeMode = RngMode.RngMode_ALL ' all quotes
> AA.LoadFormula(AflFile)
> AA.LoadSettings(AbSettings)
> AA.Explore() '
>
> Any advice is immensely appreciated.
>
> Gajanan
>
> --- In [email protected] <amibroker%40yahoogroups.com>, "Steve
> Dugas" <sjdu...@...> wrote:
> >
> > Hi - I think this will do it...
> >
> > Steve
> >
> >
> > AA.ApplyTo = 1; // 0=all symbols, 1=current symbol, 2=use filter
> >
> >
> >
> > ----- Original Message -----
> > From: "gajanan" <gajan...@...>
> > To: <[email protected] <amibroker%40yahoogroups.com>>
> > Sent: Saturday, October 17, 2009 10:30 PM
> > Subject: [amibroker] activeX ..how to perform EXPLORE() on "current
> symbol"
> > only using ActiveX`
> >
> >
> > > HI,
> > > I wanted to automate Explore() in VB for Amibroker. I was able to do so
>
> > > for a watchlist. how do I do it for the "current symbol" or for only 1
> > > symbol.
> > >
> > > e.g. Code below..
> > > AB = CreateObject("Broker.Application")
> > > AA = AB.Analysis
> > > AA.ClearFilters()
> > > AA.Filter(0, "watchlist") = 6 ' /* watch list number */;
> > > AA.ApplyTo = 2 ' use filter
> > >
> > > ' set range
> > > AA.RangeMode = RngMode.RngMode_LastNDays ' all quotes
> > > AA.RangeN = AbLastNDays '- defines N (number of bars/days to
> > > backtest)
> > > 'AA.RangeFromDate() '- defines "From" date
> > > 'AA.RangeToDate() '- defines "To" date
> > >
> > > AA.LoadFormula(AflFile)
> > > AA.LoadSettings(AbSettings)
> > > AA.Explore()
> > >
> > > will perform Explore on Watchlist 6 for last N days.
> > > now
> > > instead of performing on watchlist 6 i just want to perform it on one
> > > stock symbol. How do I do that..
> > > I see 2 possible solutions
> > > 1) set current symbol only property somewhere ?
> > > 2) clear a watchlist, set it to have only one symbol..use it..
> > >
> > > Can any one plz suggest, how can i do either of the two?
> > >
> > > Thank You,
> > > Gajanan
> > >
> > >
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > **** 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
> > >
> > >
> > >
> > >
> >
>
>  
>

Reply via email to