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

[amibroker] Re: Automation Object Model Documentation



PureBytes Links

Trading Reference Links

Hi Arold,

As you might have figured out by now, you can't change the periodicity
setting directly via the interface. However, you can do this indirectly by
first saving an AA settings file manually with say 'Weekly' periodicity
selected and then saving a settings file with 'Daily' periodicity
selected, name them 'Weekly.ABS' and Daily.ABS' respectively.
Once you have saved the two files to disk, you can load
either one via interface prior to running your AFL code.

You might have found another route using time frame functions but I'll
include this example for future reference.

Example using VB 2005:


Dim oAB As Object
Dim oAA As Object
Dim SettingsPath As String = "C:\Program Files\AmiBroker\Weekly.ABS"
Dim FormulaPath As String = "Formulas\Automatic Analysis\YourFormula.afl"

oAB = CreateObject("Broker.Application")
oAA = oAB.Analysis 'Create analysis object.

With oAA
   .loadsettings(SettingsPath)
   .LoadFormula(FormulaPath)
   .ApplyTo = 2 'Use filter.
   .RangeMode = 1 'n last quotations.
   .RangeN = 1
   .ClearFilters()
   .Filter(0, "market") = 1 'Filter includes second market in list.
   .Explore() 'Run Exploration.
End With

oAA = Nothing
oAB = Nothing


Regards,
William Peters
http://www.amitools.com




Sunday, September 11, 2005, 2:15:17 PM, you wrote:
A>    > Open AmiBroker Help-->Search
 >> Type in 'Automation' click the List Topics button
 >> and its the 3rd document in the resultant list.
 >> 
 >> 
 >> Regards,
 >> William Peters
 >> www.amitools.com
 >> 

A>  Thanks Wlliam, that's great.

A>  Unfortunateley, I'm unable to find what I'm looking for.

A>  I want to be able to change the Periodicity of a scan from my 
A>  automation client.  So far I'm able to run scans (explore) from my
A>  automation client successfully, but I need to be able to change 
A>  between daily and weekly scans and I can't figure out how to achieve
A>  this.

A>  Any ideas?

A>  Arold





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Put more honey in your pocket. (money matters made easy).
http://us.click.yahoo.com/r7D80C/dlQLAA/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/