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

[EquisMetaStock Group] How do I plot a "factorial" moving average from a left-shifted point forward?



PureBytes Links

Trading Reference Links

THE PART I KNOW
I want to plot my moving average and envelope lines at the middle of 
the average span.  This is easily done by selecting a horizontal 
shift equal to the number of time periods divided by negative 2 
(rounded up).  For instance a 13 bar moving average or envelope is 
shifted by minus 7 bars by merely filling -7 in the horizontal shift 
parameter.  
    (13 / -2) = -6.5 = -7

THE PART I NEED HELP WITH
To explain the "factorial" question:
What I want to do after the "shifted" or "centered" moving average 
and envelopes are plotted is extend from the "shifted" or "centered" 
bar to the most recent bar in the following manner:
    Plot a 12 bar moving average and/or envelope six bars back;
    Plot an 11 bar moving average and/or envelope five bars back;
    Plot a 10 bar moving average and/or envelope four bars back;
    Plot a 9 bar moving average and/or envelope three bars back;
    Plot an 8 bar moving average and/or envelope two bars back; and
    Plot a 7 bar moving average and/or envelope on the current bar.

Obviously once I learn a couple of items, this could be done for 
other moving average and envelope time spans.

What I do not know how to do is to select (in the case above) only 
the last 12 (then 11, then 10, etc) bars of data AND how to plot 
that average and/or envelope only on the sixth (then fifth, then 
forth) preceding bar and so on.

I need help:
   1.  to gather only certain spans of the most recent data; and
   2.  to plot each successive result only on the respective bar; and
   3.  how to nest the formula or better yet allow it to pick a 
variable beginning with the horizontal shift plus 1.

Thanks:

Joe









------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/