Hi All,
I am having a little bit of trouble
putting together a piece of code.
What I am trying to do is detect the first
time price falls below a 9 period Moving Average with this to occur after the
MACD has crossed with its signal line.
Scenario.
1. Price is currently trending up and MACD
is in alignment (ie trending up).
2. Price continues to trend up, but MACD crosses
with its signal line and is now trending down.
3. Exit is taken at any point after the
cross, if the cross is still in effect (ie it hasn’t crossed back up) and price
closes beneath a nine period MA.
Any help with this would be appreciated,
even if is just seed ideas on how it should be constructed.
Thanks in advance.
Regards,
Tim Hyder
-------------------------------------------------------------
“Change the way you look at things, and the things you look
at change.”
-------------------------------------------------------------