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

Re: [amibroker] Count database quotations



PureBytes Links

Trading Reference Links

Graham,

G>  Is there any way to stop it changing the settings in AA window
G>  eg When i run explore, it changes things like the number of stocks, it
G>  changes to 'all symbol' when I had 'current symbol' chosen.

Yes, just remove or comment out the following lines of code. I put
them in to aid with the example, they are not at all required. FYI,
these lines of code simply control the AA settings; ApplyTo and Range

/* Remove this section for indicator use */
AA = AB.Analysis;
AA.ApplyTo = 0;
AA.RangeMode = 1;
AA.RangeN = 1;
/* Remove above section for indicator use */
 
G>  It also runs the AA even when I click on Check errors button in the edit window

Yes, I noticed that the AA window appears and comes into focus but doesn't
actually run, is this what you refer to. If so I'm at a loss as to why
this happens, you might have to lodge a support email.

Regards,
William Peters
www.amitools.com


ps. Extract from the Automation Object Model documentation.

Properties:
- long ApplyTo - defines apply to mode: 0 - all stocks, 1 - current stock, 2 - use filter
- long RangeMode - defines range mode: 0 - all quotes, 1 - n last quotes, 2 - n last days, 3 - from-to date
- long RangeN - defines N (number of bars/days to backtest)
- DATE RangeFromDate - defines "From" date
- DATE RangeToDate - defines "To" date
- Filter( nType: short, Category : String ) - sets/retrieves filter setting
nType argument defines type of filter 0 - include, 1 - exclude
Category argument defines filter category:
"index", "favorite", "market", "group", "sector", "index", "watchlist"





Wednesday, September 7, 2005, 6:19:37 PM, you wrote:
G>    Absolutley brilliant, thanks William

G>  AFL is easy, but this off shoot programming gets me stumped

G>  Is there any way to stop it changing the settings in AA window
G>  eg When i run explore, it changes things like the number of stocks, it
G>  changes to 'all symbol' when I had 'current symbol' chosen.


G>  It also runs the AA even when I click on Check errors button in the edit window

G>  -- 
G>  Cheers
G>  Graham
G>  AB-Write >< Professional AFL Writing Service
G>  Yes, I write AFL code to your requirements
G> http://e-wire.net.au/~eb_kavan/ab_write.htm



G>  On 9/7/05, William Peters <william@xxxxxxxxxxx> wrote:
 >> Hi Graham,
 >> 
 >> The difficulty when attempting to learn how to program with the object model
 >> documentation is that it presumes the person has certain knowledge and
 >> is really not designed as the first point of reference when your in
 >> the initial learning phase. There are books that focus on this
 >> subject, some very complex and some which present just the necessary basics of OLE
 >> automation.
 >> 
 >> I have taken your reference to 'time period' to mean 'periodicity', so
 >> the number of quotations will be equal to that set in Database
 >> setting:bars to load.
 >> You can run this as an exploration and then adapt to an indicator as
 >> required. The reference to the Analysis object is only required during
 >> an exploration.
 >> 
 >> /* Start of exploration code */
 >> AB = CreateStaticObject("Broker.Application");
 >> 
 >> /* Remove this section for indicator use */
 >> AA = AB.Analysis;
 >> AA.ApplyTo = 0;
 >> AA.RangeMode = 1;
 >> AA.RangeN = 1;
 >> /* Remove above section for indicator use */
 >> 
 >> Stock = AB.Stocks(Name()); /* Reference to current stock */
 >> Quotations = Stock.Quotations(); /* Reference to the
 >> quotations of the current stock */
 >> TotalQuotes = Quotations.Count(); /* Retreive count of the quotations collection */
 >> Filter = 1;
 >> AddColumn( TotalQuotes, "Total Quotes");
 >> /* End of exploration code */
 >> 
 >> 
 >> 
 >> /* Simple indicator code below */
 >> AB = CreateStaticObject("Broker.Application");
 >> 
 >> Stock = AB.Stocks(Name()); /* Reference to current stock */
 >> Quotations = Stock.Quotations(); /* Reference to the
 >> quotations of the current stock */
 >> TotalQuotes = Quotations.Count(); /* Retreive count of the quotations collection */
 >> 
 >> Title = "" + TotalQuotes;
 >> 
 >> 
 >> 
 >> Regards,
 >> William Peters
 >> www.amitools.com
 >> 
 >> 
 >> 
 >> 
 >> Wednesday, September 7, 2005, 6:54:21 AM, you wrote:
 >> G>    I am trying to learn a bit about using the object automation in AB
 >> G>  My purpose is to count the actual number of quotations in the database
 >> G>  and present in the chart, regardless of the time period setting of the
 >> G>  chart.
 >> 
 >> G>  I see this in the help screens and the few examples which seem to be
 >> G>  about running scans etc.
 >> 
 >> G>  Quotations (collection)
 >> G>  properties:
 >> G>  Count : number
 >> 
 >> G>  where do I start to learn what to do?
 >> 
 >> G>  --
 >> G>  Cheers
 >> G>  Graham
 >> G>  AB-Write >< Professional AFL Writing Service
 >> G>  Yes, I write AFL code to your requirements
 >> G> http://e-wire.net.au/~eb_kavan/ab_write.htm
 >> 
 >> 
 >> G>  Please note that this group is for discussion between users only.
 >> 
 >> G>  To get support from AmiBroker please send an e-mail directly to
 >> G>  SUPPORT {at} amibroker.com
 >> 
 >> G>  For other support material please check also:
 >> G> http://www.amibroker.com/support.html
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >> G>   SPONSORED LINKS
 >> G>         Investment management software      Real estate
 >> G> investment software      Investment property software
 >> G> Software support      Real estate investment analysis software
 >> G> Investment software
 >> 
 >> 
 >> 
 >> G>   YAHOO! GROUPS LINKS
 >> 
 >> G>   Visit your group "amibroker" on the web.
 >> G>  To unsubscribe from this group, send an email to:
 >> G> amibroker-unsubscribe@xxxxxxxxxxxxxxx
 >> G>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >> Please note that this group is for discussion between users only.
 >> 
 >> To get support from AmiBroker please send an e-mail directly to
 >> SUPPORT {at} amibroker.com
 >> 
 >> For other support material please check also:
 >> http://www.amibroker.com/support.html
 >> 
 >> 
 >> Yahoo! Groups Links
 >> 
 >> 
 >> 
 >> 
 >> 
 >> 
 >>
    

G>  Please note that this group is for discussion between users only.

G>  To get support from AmiBroker please send an e-mail directly to 
G>  SUPPORT {at} amibroker.com

G>  For other support material please check also:
G> http://www.amibroker.com/support.html



      

  
G>   SPONSORED LINKS  
G>         Investment management software      Real estate
G> investment software      Investment property software         
G> Software support      Real estate investment analysis software     
G> Investment software              
  
  

G>   YAHOO! GROUPS LINKS

G>    Visit your group "amibroker" on the web.
G>     To unsubscribe from this group, send an email to:
G>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
G>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

  


    
  




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a difference. Find and fund world-changing projects at GlobalGiving.
http://us.click.yahoo.com/PcNrnD/PbOLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/