PureBytes Links
Trading Reference Links
|
Next thing is really to remove up and down arrows from the bar after
a pivot point. Since a line is only drawn once the pivot point is
completed, it can't really be broken during the day immediately after
a pivot point because the line isn't drawn until after the close of
that day. Anyway, is there a way to exclude arrows from the day after
the pivot?
Another thing Demark writes about is the reliability of lines which
are penetrated at the close the day after the pivot point. Let's take
for example a new pivot low being created. Upon completion of this
most recent pivot low (higher lows on both sides) you connect the
second most recent pivotlow with this newformed one. As it turns out,
the line that is drawn between the two pivotlows is penetrated by the
close of the day after the most recent pivotlow, i.e. the last day on
the chart if a new pivotlow has just been created. In that case, says
Demark, it raises the question of reliability regarding that specific
line.
To program this I guess you would have to calculate the slope of the
trendline and add that value to the low of the last pivotlow (since
the trendline crosses through that point) and check whether or not
the close the day after is lower than the value of the line. And if
it is lower, no line would be drawn.
Demark writes that a close below the demand line on the day after a
pivotlow doesn't necessarily invalidate that line, but I think it's
better to assume that is the case. Because in order for the line not
to be broken the next day, the stock would have to gap up past the
line again and never retrace back to the line during the day.
Hope you understand me.
//Martin
--- In amibroker@xxxxxxxxxxxxxxx, "marmal417" <marmal@xxxx> wrote:
> Great, thank you.
>
> //Martin
>
> --- In amibroker@xxxxxxxxxxxxxxx, "johsun" <johanskatt@xxxx> wrote:
> > Hi,
> >
> > You could change the demandline/supplyline definitions to the
> > following to avoid plotting them when there is a new high/low:
> >
> > supplyline=IIf(x2==0,Null,LineArray(x2,y2,x3,y3,1));
> > demandLine=IIf(x0==0,Null,LineArray(x0,y0,x1,y1,1));
> >
> > Johan
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "marmal417" <marmal@xxxx> wrote:
> > > Yes, that's it! Now it automatically draws the most recent
demand
> > > line. I took the liberty to add a supply line by mirroring your
> > code
> > > and making the small changes necessary, but I never understood
> > what I
> > > was doing :-) I noticed a weird thing when this indicator is
> > applied
> > > to a stock making a new all time high. If the most recent
> > pivothigh
> > > is higher than any other pivothigh in the database then a line
is
> > > drawn from the bottom in the middle of the chart through the
most
> > > recent pivot high. It looks really strange. Can the code be
> > modified
> > > to draw no supplyline when there are no higher pivots to draw
the
> > > line from and draw no demand line when there are no lower
pivots
> > to
> > > draw the line from?
> > >
> > > The basis for the systems I have seen based on TD Lines is that
> > you
> > > buy/cover when the supplyline is exceeded and sell/short when
the
> > > demand line is broken. Trendlines let you know in advance the
day
> > > before, the value of the trendline for the next trading day by
> > > calculating the slope of the line and adding it to today's
value
> > of
> > > the line. Therefore, one can place the orders in the evening as
> > stop
> > > orders so if a line is broken during the day a position is
taken.
> > > Anyway, I wrote the values of the lines for the next day in the
> > > title. I realise it's not perfect, because some lines are no
> > longer
> > > valid lines (for example a supply line that has been exceeded
> > etc.).
> > > But more on that later.
> > >
> > > There are more improvements to be made, but I think it's
getting
> > > there :-)
> > > //Martin
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
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/
|