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

Re: displaced moving average



PureBytes Links

Trading Reference Links


Whoa, now!  Hold them horses!  :-)

We're talking about two different things here...
 
Average(C[5], 13) is something totally different 
than Average(C, 13) displaced back in time 5 bars.

Try plotting the two...  You can use the 
following code:


Input:

Price(C),
Length(13),
Displace(5);

Plot1[Displace](Average(Price, Length), "Disp MA");
Plot2(Average(Price[Displace], Length), "TW MA");


What's the value of each on the current bar?



 ---- you wrote: 
> If Close < average(C[1],13) then exitlong at Low stop;
> 
> The above is one way to do it in TS4. C[1] is a displacement of one bar, C[5]
> would be 5, etc. Obviously you could change it to whatever exit signal you 
> like.
> Just flip it over to "exitshort."
> 
> What OM says is so, but this gets the basic idea done.
> 
> Bill Wynne
> SmartTrades.com