PureBytes Links
Trading Reference Links
|
Graham,
Not sure how that is supposed to be, I tried it though in the 3
barssince() that I am using and still returned no results.
Thanks
wdbaker
--- In amibroker@xxxx, kaveman <kavemanperth@xxxx> wrote:
> Shouldn't Barssince(s) be Barssince(S==1)
> Graham
>
> ----- Original Message -----
> From: "wdbaker8" <wdbaker8@xxxx>
> Date: Monday, October 21, 2002 11:41 am
> Subject: [amibroker] Re: Trendline, in over my head
>
> > <html><body>
> >
> >
> > <tt>
> > Ara,
> >
> > I checked the filter, it is ok, the problem is the barssince()
> >
> > When I replace barssince() with an actual value it works fine,
but
> > I
> >
> > need the value to vary, thats why I was trying to use the
> > barssince
> >
> > so that it would give me varying counts to divide by. Here is an
> >
> > example of what did work, maybe someone knows of a different
> > function
> >
> > to use other than barssince or a different way to use it.
> >
> > Below you can see that I removed the (BarsSince(s)-BarsSince(t))
> > and
> >
> > placed a 10 there. Same with the one below it. Trying to
calculate
> >
> > the slope as it changes.
> >
> >
> >
> > Thanks
> >
> > wdbaker
> >
> > Example that worked:
> >
> > Filter=TimeNum()>080000 AND TimeNum()<=150000;
> >
> > PositionSize=2500;
> >
> > s=Peak(Close,.01,3);
> >
> > t=Peak(Close,.01,2);
> >
> >
> >
> > slope=(t-s)/10;//(BarsSince(s)-BarsSince(t));//
> >
> > slope2=(C-s)/16;//BarsSince(s);
> >
> > test1=slope2<slope and s>t;
> >
> > Buy=Filter AND test1;
> >
> > Sell=TimeNum()>150000;
> >
> >
> >
> >
> >
> > Short=0;//Filter AND test2;
> >
> > Cover=0;//test4 OR TimeNum()>150000;
> >
> >
> >
> > --- In amibroker@xxxx, "akaloustian" <ara1@xxxx wrote:
> >
> > > Not sure, but the word "Filter" may be used
> > improperly because it's
> >
> > a
> >
> > > reserved word, so Buy = Filter and ... may be a problem.
Just
> > pick
> >
> > > any other word.
> >
> > >
> >
> > > Ara
> >
> > >
> >
> > > --- In amibroker@xxxx, "wdbaker8"
> > <wdbaker8@xxxx wrote:
> >
> > > > Ara,
> >
> > > > thanks, you are correct, I have changed this below.
> >
> > > > It still doesn't produce any results on a backtest
though,
> >
> > > > so still looking for more ideas. If I can get it to
> > produce any
> >
> > > > results, then I can look at that and work from there.
> >
> > > >
> >
> > > > thanks
> >
> > > > wdbaker
> >
> > > > Filter=TimeNum()>=080000 AND TimeNum()<=150000;
> >
> > > > PositionSize=2500;
> >
> > > > s=Peak(Close,.01,3);
> >
> > > > t=Peak(Close,.01,2);
> >
> > > > slope=(t-s)/(BarsSince(s)-BarsSince(t));
> >
> > > > slope2=(C-s)/BarsSince(s);
> >
> > > > test1=slope2<slope AND s>t;
> >
> > > > Buy=Filter AND test1;
> >
> > > > Sell=TimeNum()>150000;
> >
> > > >
> >
> > > > Short=0;
> >
> > > > Cover=0;
> >
> > > > --- In amibroker@xxxx, "akaloustian"
> > <ara1@xxxx wrote:
> >
> > > > > Seems like C is generally less than s or t, since
s
> > and t are
> >
> > > > defined
> >
> > > > > as peaks, so slope2 will generally be less than
slope.
> >
> > > > >
> >
> > > > > You may find some otherwise if you use a sizable
> > data set.
> >
> > > > >
> >
> > > > > Suggest you plot the zig-zag function to see where
> > the peaks
> >
> > are
> >
> > > to
> >
> > > > > get a feel for what is going on...
> >
> > > > >
> >
> > > > > Ara
> >
> > > > >
> >
> > > > > --- In amibroker@xxxx, "wdbaker8"
> > <wdbaker8@xxxx wrote:
> >
> > > > > > All,
> >
> > > > > > Attempting to figure out how to use the slope
> > between two
> >
> > past
> >
> > > > > points
> >
> > > > > > and then buy when the slope between the
> > farthest point and
> >
> > the
> >
> > > > > > current close becomes less than the slope
> > between the
> >
> > original
> >
> > > > two
> >
> > > > > > points, I'm not getting any errors, just not
> > getting anything
> >
> > > at
> >
> > > > > > all. Thought maybe there was an obvious
problem.
> >
> > > > > >
> >
> > > > > > Thanks for reviewing this and before you ask,
> >
> > > > > > I never finished high school so the slope
> > equations etc...
> >
> > > could
> >
> > > > be
> >
> > > > > > wrong.
> >
> > > > > >
> >
> > > > > > Thanks
> >
> > > > > > Bill Baker
> >
> > > > > > Filter=TimeNum()>=080000 AND
> > TimeNum()<=150000;
> >
> > > > > > PositionSize=2500;
> >
> > > > > > s=Peak(Close,.01,3);
> >
> > > > > > t=Peak(Close,.01,2);
> >
> > > > > >
> >
> > > > > > slope=(t-s)/(BarsSince(s)-BarsSince(t));
> >
> > > > > > slope2=(C-s)/BarsSince(s);
> >
> > > > > > test1=slope2>slope AND s>t;
> >
> > > > > > Buy=Filter AND test1;
> >
> > > > > > Sell=TimeNum()>150000;
> >
> > > > > >
> >
> > > > > >
> >
> > > > > > Short=0;
> >
> > > > > > Cover=0;
> >
> >
> >
> > </tt>
> >
> >
> >
> >
> > <!-- |**|begin egp html banner|**| -->
> >
> > <table border=0 cellspacing=0 cellpadding=2>
> > <tr bgcolor=#FFFFCC>
> > <td align=center><font size="-1" color=#003399><b>Yahoo! Groups
> > Sponsor</b></font></td></tr>
> > <tr bgcolor=#FFFFFF>
> > <td align=center width=470><table border=0 cellpadding=0
> > cellspacing=0><tr><td align=center><font face=arial
> > size=-2>ADVERTISEMENT</font>
> > <img
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
src="http://ad.doubleclick.net/ad/N879.ameritrade.yahoo/B1054521.11;sz
=300x250;adc=ZHS;ord=1035171718?"
> alt="" width="300"
> height="250"border="0"></td></tr></table></td></tr><tr><td><img
alt=""
> width=1 height=1
> src="http://us.adserver.yahoo.com/l?
M=219695.2310151.3725769.1980433/D=egroupmail/S=:HM/A=1226184/rand=899
086985"></td></tr></table><!--
> |**|end egp html banner|**| -->
> >
> > <tt>
> > Post AmiQuote-related messages ONLY to: amiquote@xxxx
> >
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> >
> >
> >
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html</tt>
> >
> >
> >
> >
> > <tt>Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service.</tt></br>
> >
> > </body></html>
> >
> >
>
> ----------------
> Powered by telstra.com
|