PureBytes Links
Trading Reference Links
|
Just wondering...
Shouldn't it be: pred = slope + Ref(TrV,+1); // +1?
Or am I missing something? Appreciate any corrections to my thinking.
Bill
--- In amibroker@xxxx, "elstephel" <elstephel@xxxx> wrote:
> --- In amibroker@xxxx, "epintoem" <epintoem@xxxx> wrote:
> > How can I calculate the next value of the trendline given the
previous
> > 2 days data?
>
> //TrV is trendline value
>
> slope = Ref(TrV,-1) - Ref(TrV,-2);
> pred = slope + Ref(TrV,-1);// "prediction" of the next trendline
value
>
> //**end of code
>
> works with rising and falling trendlines
>
> HTH
>
> Stephan
|