Centered moving average filter for ts 2000

Discussion in 'Strategy Development' started by fannerweb, Sep 25, 2008.

  1. fannerweb

    fannerweb

    Hello guys, is there someone that have an EL code to solve the project
    ( or forecast), price future direction?
    Example below i have a classic moving average with "displace" value;

    Inputs: Price(Close) , Length(20), Displace(10) ;

    If Displace >= 0 OR CurrentBar > AbsValue(Displace) Then Begin
    Plot1[Displace] (AverageFC( Price, Length), "SimpAvg1");

    {Alert Criteria}
    IF Price < Plot1 AND Plot1 < Plot1[1] AND Plot1[1] > Plot1[2] Then
    Alert("The Moving Average has just changed direction and is now
    bullish")
    Else
    If Price > Plot1 AND Plot1 > Plot1[1] AND Plot1[1] < Plot1[2] Then
    Alert("The Moving Average has just changed direction and is now
    bearish");

    If I have a Simple moving average with 20 periods and I insert the
    displace value of 10, I have a MA centered but (of course) I have
    always the latest bars discoveries. Is it possible to solve this
    problem with a forecast until the last bar ?
    I hope that I explained well my question.
    Thanks for your help!
    Paolo
     
  2. Wow, good luck....this can be as simple or as complex as you want it to be.

    Complex: use fourier analysis to determine cycle length, see where the last average price value is located in the cycle, then make the projection using the formula derived from the analysis.

    Simple: take the rate of change from the last two moving average values and simply project by 10 bars:

    FuturePrice = Last Moving Average + Delta Moving Average*10