Skip to content
Back to formatted view

Raw Message

Message-ID: <CAK2H+eehM4Jf-WoMCym6z_A=r90drmZW0QTA=cGYZiFRL1katg@mail.gmail.com>
Date: 2013-10-02T16:09:56Z
From: Mark Knecht
Subject: Crosses above, crosses below
In-Reply-To: <CAPPM_gTAQmrqAC7J_FQffH4GEWCJKCbtaSkbp3JGvzu_62CSnw@mail.gmail.com>

On Wed, Oct 2, 2013 at 9:02 AM, Joshua Ulrich <josh.m.ulrich at gmail.com> wrote:
<SNIP>
>>
> Your original question only asked about a cross above.  If you want to test
> for a cross below, you need to test EMA.10 < EMA.20.
>
> If you want both crosses in one column, you can combine them by checking
> when the diffs of the logical comparisons equal 1.
>
> (diff(EMA.10 > EMA.20)==1) - (diff(EMA.10 < EMA.20)==1)
>
> Now the cross above will be 1 and the cross below will be -1.
>
>>    Again, thanks for the example code. It's helpful.
>>
>> Cheers,
>> Mark

Fair enough. I think this still misses the issue I was concerned about
but I wrote some functions that work the way I want using your inputs
so I'm set for now.

Thanks!

Cheers,
Mark