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

Re: [amibroker] Optimizing moving averages



PureBytes Links

Trading Reference Links

You could try something like this

type = optimize( "MA Type", 1, 1, 6, 1 );

Period = optimize( "MA Period", 20, 10, 40, 1 );

if( type==1 ) Line = MA( c, Period );
if( type==2 ) Line = EMA( c, Period );
if( type==3 ) Line = WMA( c, Period );
if( type==4 ) Line = Wilder( c, Period );
if( type==5 ) Line = DEMA( c, Period );
if( type==6 ) Line = TEMA( c, Period );

Use Line in place of the M in your trade conditions

On 12/21/05, blairlittlejohn <blairl@xxxxxxxx> wrote:
> I am trying to determine the optimum moving average (type and period)
> for a list of tickers.  So far there seems to be eighteen (18)
> seperate optimizations for each ticker: e.g. simple, exponential,
> double, triple, weighted and Wilder moving averages plus a one, two
> and three day buy delay for each.  There may be one or two more types -
> I just found AMA and AMA2.
>
> Each optimization now takes from four to twenty minutes.
>
> Is there a way to automate the running of these eighteen moving
> averages so I don't have to run each optimization for each ticker
> individually? And if so, can you help with the code?
>
> Thanks
> Blair LittleJohn
>
>
>
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>


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


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