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

Re: Stephane re: Trendline Break System Test



PureBytes Links

Trading Reference Links

sorry to answer late, you're right in that( your) case, 
example:

slope= 
(Trough(L,7,1) - Trough(L,7,2)) /
(TroughBars(L,7,2) - TroughBars(L,7,1));

Stephane

> I am probably just mis-communicating, The first part of the 
equation
> (5-1) should always be the opposite way(1-5) or (recent price - 
less 
> recent price) and that would always establish if the slope is 
> positive or negative depending on if price were rising or falling, 
> then it would alway be divided by the period(20-2) or abs(2-20) 
which 
> would always be a positive #.
> 
> Hope that makes more sense
> wdbaker
> --- In amibroker@xxxx, "Stephane Carrasset" <nenapacwanfr@xxxx> 
wrote:
> > suppose 20 days ago the close is 5$
> > and 2 days ago the close is 1$
> > 
> > the slope of the price must be negative 1$ is less than 5$
> > BUT
> > (5-1)/ (20-2) is positive
> > 
> > 
> > Stephane,
> > > I have less than a highschool education so that could be 
getting 
> in 
> > > the way but I think that the first part of the equation 
> determines 
> > if 
> > > the slope is positive or negative, the last part of the 
equation 
> > just 
> > > establishes the period to divide by to get the slope. I just 
> > > recently began studying this though so could be wrong.
> > > 
> > > Thanks
> > > wdbaker
> > > --- In amibroker@xxxx, "Stephane Carrasset" 
<nenapacwanfr@xxxx> 
> > wrote:
> > > > 
> > > > 
> > > > > the w & y issue, I think the equation goes slope=(endval-
> > > startval)/
> > > > > (time or bars) and the way you have it written would give 
me 
> a 
> > > > > negative # of bars I think. 
> > > > 
> > > > yes, negative and 
> > > > if endval-startval is positive ( startval< endval)the slope 
is 
> > > > negative and
> > > > if endval-startval is negative( startval>endval) the slope 
is 
> > > positive
> > > > 
> > > > why do you want that the slope is always positive??
> > > > 
> > > > stephane