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

RE: [EquisMetaStock Group] RE: First Event Occurrence After an initial event



PureBytes Links

Trading Reference Links

I think I have this right. In the code below I'm using close as price. Pick the flavor (O,H,C,L) you need. The moving average is exponential. again pick the flavor you need.

{MACD below signal}

macd()<mov(macd(),9,e)

AND

{price goes below moving average}

cross(mov(C,9,e),c)

If price had been above the average, cross would give you the first instance of it going below.

Even if the above is right, Roy or Jose  will likely give a more elegant solution.

 

Ron




>From: "Tim" <prez@xxxxxxxxx>
>Reply-To: equismetastock@xxxxxxxxxxxxxxx
>To: <equismetastock@xxxxxxxxxxxxxxx>
>Subject: [EquisMetaStock Group] RE: First Event Occurrence After an initial event
>Date: Sat, 28 May 2005 14:12:51 +0800
>
>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.”
>-------------------------------------------------------------
>
>--
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.322 / Virus Database: 267.1.0 - Release Date: 27/May/2005
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG Anti-Virus.
>Version: 7.0.322 / Virus Database: 267.1.0 - Release Date: 27/May/2005
>
>
>--
>No virus found in this outgoing message.
>Checked by AVG Anti-Virus.
>Version: 7.0.322 / Virus Database: 267.1.0 - Release Date: 27/May/2005
>


Yahoo! Groups Links