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

[amibroker] Re: AmiBroker (AFL) beginer questions



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, Radek Simcik <radek.simcik@xxx> wrote:
>
> Hi all,
> 
> I am new to AmiBroker so my questions might have simple answers but  I have
> not found them anywhere ...
> 
> 1) Can I add text column to the exploration result based on the value either
> of buy/short. Something like
> AddTextColumn( WriteIf(Buy, "Buy", "Short"), "Buy/Short", 1.10,
> colorDefault, colorDefault,100); Writeif doesn't work and it seems to me
> that I cannot use IIF for text.

From: http://www.amibroker.com/devlog/index.php?s=addtextcolumn

AddColumn( IIf( Buy, Asc("B"), Asc("S")), "Signal", formatChar );
 
> 2) Can I get an index of the day/bar when trigger == 1 ? so I can use it in
> the code.

See ValueWhen: http://www.amibroker.com/guide/afl/afl_view.php?id=163

TriggerIndex = ValueWhen(Trigger, BarIndex());

 
> 3) Can I have an exploration like: Give me 10 stocks with highest H-O ??? I
> do not want to make a scan where I calculate H-O, display all stocks and
> then sort them in the result window. Let's say I want to save the result as
> a watch list. But I am interested only in 10 of them.

It's possible, but complicated and takes a long time to complete since you effectively have to sort at ever symbol iteration. It would be *much* easier to run the scan, sort by hand and then just add the top 10 to a watchlist.
 
> 4) Can I add custom column to a backtest or optimization result window? Can
> I sort the columns so when it finishes I can see immediately what I am most
> interested in?

http://www.amibroker.com/guide/a_custommetrics.html

Very recently Tomasz added the ability to sort the columns programatically. However, I believe that your custom columns would only be sorted relative to each other, not to the standard columns (not sure, haven't tried yet).
 
> 5) Can I save the backtest optimization result to a csv file from afl? I
> backtest on 3 different periods.If I am able to save the result from
> backtesting and optimization to a file can I also do the 3period backtesting
> in one go? One mouse click would create 3 output csv files.

Probably do-able. But, this would likely better be done via a separate JScript file using Ole Autmation: http://www.amibroker.com/guide/objects.html

Else, using BatMan for batch processing, found in Files section of this group.

> 6) is there available detailed report about backtesting saying: XXX was
> nominated but we did not enter the trade because of not enough capital. Or
> so?

Choose detailed reporting from AA settings: http://www.amibroker.com/guide/w_settings.html
 
> 7) can I import (metastock) data using command line? If I import metastock
> data does actually AB overwrite the current database or it only updates
> database with new data per new date?

I can't help you with this one.

Mike




------------------------------------

**** 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

<*> 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/