Cas,

The average is plotted exactly like I want except for the flat line. Using a -9 
in the formula shifts the average in the wrong direction. All I want to do is 
remove the flat portion of the plot.

Thanks


  ----- Original Message ----- 
  From: cas soni 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, September 01, 2010 3:17 AM
  Subject: Re: [amibroker] Moving Average


    
        Hello denis ,
        The average is shifted back 9-bars.
        it should be
        x= Ref(MA(mp,18) , -9 );


        --- On Wed, 1/9/10, Dennis Lipter <blackca...@verizon.net> wrote:


          From: Dennis Lipter <blackca...@verizon.net>
          Subject: [amibroker] Moving Average
          To: amibroker@yahoogroups.com
          Date: Wednesday, 1 September, 2010, 12:07 PM


            
          The code below is for a centered moving average.
          The average is shifted back 9-bars.
          The problem is that for those 9-bars, a flat line is plotted. I would 
prefer to have that portion of the plot blank instead of the flat line. 

          mp=IIf(C,(H+L+C)/3,(H+L)/2);
          x= Ref(MA(mp,18),9);
          Plot(x,"Centered MA-18 ",colorRed);

          Ideas would be appreciated.
          Thanks 



  

Reply via email to