Displaying 1 result from an estimated 1 matches for "zerodups".
Did you mean:
zero_ops
2012 Sep 04
1
Producing a SMA signal when closing price is above the moving average for 3 days
I have loaded price data for GE and then calculated a 50 day simple moving
average. Then I have a created a ifelse statement that produce a 1 when
GE's closing price is above the simple moving average and a 0 when GE
Closing price is below the 50 day simple moving average.
However, what I really want to do is to produce a 1 for when the price is
above the simple moving average for 3 days