New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Alert for OGIG when Aroon(12) crosses 8 day SMA

Having trouble with a simple script for an alert for OGIG.
I'm trying to write an alert for OGIG for when Aroon(12) value equals the 8 day SMA for Aroon(12).
Just cant seem to get the syntax right.
Any thoughts?


  • You might not want to test for "equals" because Aroon values are expressed in decimals, so its unlikely (though possible) that they equal each other very often. But they do cross over a lot. So you might want to use the cross over operator "x" instead of (or in addition to) the "=" operator.

    You can read about the crossover operator here:

    Also, your scan would need to specify which Aroon value you want. There are three - Aroon Up( ), Aroon Down( ) and Aroon Osc( ). You can select the one you want from the "Technical Indicators" drop down under the alert writing window on the Alert Workbench.

    I'll assume you want Aroon Osc. If you want one of the others, just substitute.

    and [Aroon Osc(12) x sma(8, Aroon Osc(12))]

    That says the Aroon crossed above it's sma.

    If you change the order,

    and [ sma(8, Aroon Osc(12)) x Aroon Osc(12)]

    it says the Aroon crossed below the sma.

    (Actually, it says the sma crossed above Aroon, which is the same thing, but since the Aroon moves faster, on the chart it looks like the Aroon is doing the crossing from above to below).

    If you want to include the "equals" case, just to be thorough, you need an "or" statement, which would look like this if you want to include both crossovers as well:

    and [

    [Aroon Osc(12) x sma(8, Aroon Osc(12))] // cross above

    or [ sma(8, Aroon Osc(12)) x Aroon Osc(12)] // cross below

    or [ sma(8, Aroon Osc(12)) = Aroon Osc(12)] // equal


    You need the bracket after "and" and the bracket by itself on the last line.

  • thanks Markd! does this look right to you?

    [symbol is 'ogig'] and [sma(8, Aroon Osc(12)) x Aroon Osc(12)]

    syntax checked fine.... here's an image of what i'm trying to catch:

  • Looks good.

    You can check using the regular scan workbench. Instead of [symbol is 'ogig'] put in something like

    [exchange is NYSE]

    You should get hits for the current date. If not, try another date. Save the results to a list and apply your chart style that includes Aroon Osc (unless Aroon Osc is in your default chart style). Then look at the charts to see if its what you want.
Sign In or Register to comment.