Sorry...formula below doesn't do what I want.

This formula always shows a blank 9 bars when I scroll the chart. If I scroll 
the chart and there is data available 9 bars into the future, I want the 
formula to use that data so the average is plotted over the entire visible 
portion of the chart.

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

I only want the first 9 bars of the entire plot to be blank, so when I scroll 
the chart, the blank bars disappear from view. I need to expand the sample data 
field 9 bars into the future, so when I scroll the chart, the blank portion of 
the plot disappears.

Hope this is clear.

Thanks


  ----- Original Message ----- 
  From: Dennis Lipter 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, September 01, 2010 11:47 AM
  Subject: Re: [amibroker] Re: Moving Average


    

  flyboypa,

  This worked!
  mp=IIf(C,(H+L+C)/3,(H+L)/2);

  x=MA(mp,18);

  Plot(x,"Centered ", colorRed, styleLine, Null, Null,-9);

  Thanks!


    ----- Original Message ----- 
    From: flyboypa30 
    To: amibroker@yahoogroups.com 
    Sent: Wednesday, September 01, 2010 8:50 AM
    Subject: [amibroker] Re: Moving Average


      
    Dennis,

    Try the following:

    x = MA(mp,18);

    Plot(x,"Centered ", colorred, styleline, null, null, -9);

    This will do the "centering" of the MA in the Plot statement.




  

Reply via email to