PureBytes Links
Trading Reference Links
|
Try this, it worked for me:
AA.Filter(0,"watchlist", 1) # use watchlist 1
jehmac
--- In amibroker@xxxxxxxxxxxxxxx, "Daniel T" <dtschurr@xxx> wrote:
>
> Hi,
> Any Python gurus out there ? I'm trying to use AmiBroker with Python
> through COM (see code below). All works well so far, only the
> AA.Filter command gives problems. The following error message appears:
>
> File "C:\Dokumente und Einstellungen\Daniel\Eigene
> Dateien\Trading\python\indatc.py", line 11
> AA.Filter(0,"watchlist") = 1
> SyntaxError: can't assign to function call
>
> I'm using AmiBroker 4.90 rc2 and ActiveState Python 2.5 on WinXP
>
> Any suggestions?
>
> Cheers,
>
> Daniel
>
> Python Script code:
> -----------------------------------------------------
> import win32com.client
>
> AB = win32com.client.Dispatch("Broker.Application")
> AA = AB.Analysis;
>
AA.LoadFormula("C:\\Programme\\AmiBroker\\Formulas\\Custom\\Explorations\\StockOverview.afl")
> AA.ClearFilters()
> AA.RangeMode = 1 # n last quotes
> AA.RangeN = 1 # nr of quotes
> AA.ApplyTo = 2 # Use filter
> AA.Filter(0,"watchlist") = 1
> AA.Explore()
> AA.Export("C:\\Dokumente und Einstellungen\\Daniel\\Eigene
> Dateien\\Trading\\python\\test_export.csv")
>
------------------------------------------------------------------------------------------
>
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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|