PureBytes Links
Trading Reference Links
|
When I put the original code you posted up with the AA settings you
had and hit back test there was NO signal on 2/20 because you had
from date set to 2/23. Changing ONLY the AA from date to 2/20 makes
the buy signal on 2/20 show up.
Again the equity calc did do the correct thing given what you told it
to do.
--- In amibroker@xxxxxxxxxxxxxxx, "Bill Barnard" <wbarnard@xxxx>
wrote:
> Fred,
>
> The ExRems must be removed to make it work from the first bar even
> after the code is changed from the Cross statement, which provides
a
> 1-day only "true" condition, to the "greater than" statement, which
> provides an ongoing "true" condition. At least that is what I found
> when I tried it. The code:
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> //Buy = Cross(Close, (1 + 0.002)*EMA(Close, 40));
> //Sell = Cross((1 - 0.002)*EMA(Close, 40), Close);
> Buy = Close > (1 + 0.002)*EMA(Close, 40);
> Sell = (1 - 0.002)*EMA(Close, 40) > Close;
> Short = Sell; Cover = Buy;
> Buy = ExRem(Buy,Sell); Sell = ExRem(Sell, Buy);
> Short = ExRem(Short, Cover); Cover = ExRem(Cover, Short);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> did not make the Equity calc and plot start on the first day of
> the test, but it did work after taking out the ExRems.
>
> The reason this is a big deal to me, and I don't just push the
start
> window back to the previous signal, is that I am working on a
system
> which does an iterative optimization routine and walks it forward.
> Thus, there are internally very many different sets of Cross dates,
> which need to be handled within the loops, and the accuracy of the
> calcs is considerably impacted by the equity calc not starting at
the
> chosen starting date.
>
> Thanks for your help.
>
> Bill
>
>
> > It's NOT the ExRem's that are the culprits here as they would not
> > have reduced the signals from a crossover condition anyway as the
> x/o
> > only occurs on one bar.
> >
> > I'm not sure why you seem to find this objectionable but in this
> > particular case why not just push the start window back to 2/20 ?
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Bill Barnard" <wbarnard@xxxx>
> > wrote:
> > > Fred,
> > >
> > > I appreciate your explanation. T changed the "Buy = Cross(A,
B)"
> > type
> > > of statement to "Buy = A > B" and removed the "ExRem"
statements,
> > and
> > > Voila! - the Equity plot begins "Short" on 2/23/01, as desired.
> > >
> > > Now I am going to have to think about this some more. I have
been
> > > routinely using the ExRem statements after the Buy and Sell
> > > assignments, thinking that it is always desirable to remove the
> > > redundant signals. Now I see that this is not necessarily the
> case.
> > >
> > > Thanks so much for providing the answer to my dilemma. Now I
will
> > > have to rework many of my afls to make them start properly at
the
> > > beginning of the test period.
> > >
> > > Bill
> > >
> > >
> > >
> > > > Your system as written is looking for a CROSS to occur. That
> > CROSS
> > > for
> > > > RUT-I took place on 2/20/2001 (See Attachment). Therefore
with
> a
> > > start
> > > > date of 2/23/2001 there is NO signal in play until the one in
> > April
> > > > (See Attachment). Therefore there is no equity gain/loss to
> > show.
> > > > Ergo the menaing of OUT in the AA list and report.
> > > >
> > > > Fred
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges & Refill Kits for Your Epson at Myinks.com
Free shipping on orders $50 or more to the US and Canada.
http://www.c1tracking.com/l.asp?cid=5705&lp=home/epson.asp
http://us.click.yahoo.com/brYXfA/_xWGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|