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

[amibroker] Re: Simple coding question...



PureBytes Links

Trading Reference Links

Thank you very much, Mike. I was close, but the negative values threw 
me off.  I had it like so:

Offset = Optimize("Offset", -.10, -.10, -.25, .05);
Buy = Close <= MA(Close, Periods) Offset;

Apparently AB doesn't like it that way.  ;-) 

Thanks again,

Grant



--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> Refer to Optimize reference here: 
> http://www.amibroker.com/guide/afl/afl_view.php?id=107
> 
> e.g. Continuing with the example at hand...
> 
> "Optimize for periods between 50 - 100 days, incrementing by 25 
days 
> (with a default of 50 days when not optimizing), and a drop of 10 
> cents - 25 cents, incrementing by 5 cents (with a default of 10 
cents 
> when not optimizing)".
> 
> Period = Optimize("Period", 50, 50, 100, 25);
> Offset = Optimize("Offset", 0.10, 0.10, 0.25, 0.05);
> Buy = Close <= MA(Close, Periods) - Offset;
> 
> The above would give you many redundant buy signals that you might 
> have to remove (via ExRem) depending on your backtesting mode. If 
> using the default backtester mode, AmiBroker will handle that for 
you.
> 
> Alternatively, you could use the Cross function and avoid the 
> duplicate signals, found here:
> http://www.amibroker.com/guide/afl/afl_view.php?name=cross
> 
> Mike
> 





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/