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

[amibroker] Re: For AFL backtest experts - how would I do this?



PureBytes Links

Trading Reference Links

Thanks Graham. PositionScore() is what I need. Will try it out later.

Paul

--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
>
> you have basically described as you would write it
> this is very rough layout of one way to do it
> 
> with AA set to weekly
> 
> setforeign( "SP500" )
> macdHistogram = whatever;
> restorepricearrays();
> 
> buy = MACDHistogram>0;
> short=MACDHistogram<0;
> 
> use PositionScore to determine which symbol is strongest to trade
> 
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> 
> > >   _____
> > >
> > > From: amibroker@xxxxxxxxxxxxxxx 
[mailto:amibroker@xxxxxxxxxxxxxxx]
> > On Behalf
> > > Of polomorabe
> > > Sent: Friday, October 21, 2005 10:49 AM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] For AFL backtest experts - how would I do 
this?
> > >
> > >
> > > Hello all,
> > >
> > > I have some experience with writing AFL scripts to perform
> > > backtesting. I was wondering how I would go about programming 
this
> > > scenario.
> > >
> > > On a weekly basis, check the SP-500 histogram. A buy signal is
> > > present so long it is positive, and a short signal if it is
> > negative.
> > > For a buy signal, go long the strongest ETF from a list of 
ETFs in a
> > > watchlist. As long as the buy signal is present, each week 
select
> > the
> > > strongest ETF from the list. If a short signal is present, each
> > week
> > > select the weakest ETF from the list. Use this as a backtest. 
I was
> > > thinking of using the ADX or RSI as the ETF selection criteria.
> > >
> > > if( S&P histogram > 0 )
> > > {
> > >   each week select the strongest ETF
> > > }
> > > else
> > > {
> > >   each week short the weakest ETF
> > > }
> > >
> > > Any ideas?
> > >
> > > Many thanks,
> > > Paul
> > >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/