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

[amibroker] Re[7]: [AmiBroker-at] Balanced Portfolio Trading



PureBytes Links

Trading Reference Links

Thanks Graham,


I don't have experience with scripts... It seems the action statement doesn't work, try this:


Buy=Sell=Short=Cover=0;

ifStatus("action") == actionPortfolio ) _TRACE("# actionPortfolio test");


It doesn't give any output in DebugView, it is also not documented in the help...


herman.



Saturday, April 7, 2007, 1:16:03 AM, you wrote:


>

I recall that I got it to work if backtesting direct in AFL, but will not work if using OLE to backtest from script file


One idea is something I do in these cases is run from script to do backtest then have another AFL to copy the ~~~equity symbol 



-- 

Cheers

Graham

AB-Write >< Professional AFL Writing Service

Yes, I write AFL code to your requirements

http://www.aflwriting.com 




On 07/04/07, Herman <psytek@xxxxxxxx> wrote:

it would seem that using optimize to run the system first Long and then Short and then summing the equities would at least give me an equity curve to look at. I found the code to copy the ~~~Equity in the Knowledge base but it doesn't want to work. How does one use this code? 


I would just like to stick functionally identical code to the end of my portfolio system's code...is the bo. stuff needed if i run my BT from the AA?


if( Status("action") == actionPortfolio )

{

 bo = GetBacktesterObject();

 bo.Backtest();

 AddToComposite( Foreign("~~~EQUITY","C"), 

                 "~~~MY_EQUITY_COPY", "X", 

                 atcFlagDeleteValues | atcFlagEnableInPortfolio );

}


herman


__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___