PureBytes Links
Trading Reference Links
|
The "Check" menu command appears to actually run the script to find out how
many future (and past) bars are needed. So if your script works differently
under different conditions, be aware that you may miss some of the crystal
balling it does.
The "Check" command does seem to get confused by some spurious operations that
actually are not looking into the future, as far as I could see. I don't run
it frequently now, since I know my code well enough to know exactly what it
is doing now. But when I was running it, I would occasionally get warnings
that made no sense. (Sorry, can't remember the details now.)
Why not provide an automatic check for this? I think it should. There should
be an option to turn it OFF, but it should be ON by default. Ideally the
option should be setable in each script. New scripters need this option
especially because it is difficult to tell what AB scripts are doing until
you no longer need this aid, and even then, it is easy to make a sign error
on a Ref call.
Having said that, I now realize that there are a few situations in which it is
valuable to be able to look into the future, or equivalently, to modify the
past. There are two cases I can think of:
1. Indicators. For example, my Giant Candlesticks script must wait for an
entire bar to be finished before it can draw any of it. Many trend line
plots (e.g. zigzag) use future data to determine how best to plot the trend.
2. Training: For example, a system that learns patterns in a stock or market
by looking at ALL the available data, and then uses that learning to set
parameters for backtesting. I experimented with a candlestick pattern system
that does this. You have to be very careful with such a system, however, so
that you are not merely fullfilling your own prophecy.
dan
On Sunday 18 June 2006 04:46 am, Lester Vanhoff wrote:
> I don't know if this can be somehow done automatically but each formula can
> be tested manually if it looks into the future. See the screenshot here:
>
> http://img227.imageshack.us/img227/8584/checkfuture5nd.png
>
> Lester
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Chris" <c319chris@xxx> wrote:
> > If I have a trading system such as this:
> >
> > Buy = Cross( Close , EMA(Close, 10) );
> > Sell = Cross( EMA(Close, 10) , Close );
> >
> > and my buy and sell price settings are set to "Open" with Buy Delay =
> > 0, I have an untradeable system because the closing prices are not
> > known until after the trade has executed (open). If backtested, AB will
> > give unrealistic returns because the system is allowed to peek into the
> > future (knowing the closing prices at the open). Shouldn't AB detect
> > this sort of situation and flag the user? Would this be a worthwhile
> > feature request?
>
>
> 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
>
>
>
|