A rough example of my thinking
if
50 day SMA of S&P is rising
calculate 10 day SMA AAPL + ATR
else if
50 day SMA of S&P is sinking
calculate 10 day SMA AAPL - ATR
else
calculate 10 day SMA AAPL
My main question is: If possible how should I formulate the parts:
50 day SMA of S&P is rising
and
50 day SMA of S&P is sinking
should I perhaps use the DataSeries Class?
A practical code snippet would be much appreciated!
Comment