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

RE: displaced moving average formula



PureBytes Links

Trading Reference Links

ref(mov(c,7,s),-5)

> -----Original Message-----
> From: owner-metastock@xxxxxxxxxxxxx
> [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Tom Sprunger
> Sent: Sunday, November 19, 2000 4:18 PM
> To: metastock@xxxxxxxxxxxxx
> Subject: displaced moving average formula
>
>
> Need help from one of you wizards out there.  I am trying to
> write a formula
> for use in backtesting.  I want to look at price crossing a moving average
> displaced forward by x bars.  Let's assume I want a 7 bar average
> displaced
> forward by 5 bars.  Its no problem doing this on the charts
> because the Mov
> Ave has a box in its properties window where you do this. However, I can't
> figure out how to do this in Formula language for use in backtesting and
> explorations.  From my manual, I can't find a descriptor for
> displacing the
> Mov ave.
>
> The code for flagging the price crossing above the 7 bar average is
>
> cross(mov(c,7,e))
>
> How do I modify this to displace the Mov Ave forward by 5 bars?
>
> Thanks
>
> Tom
>
>