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.

Insight on using Alerts for %D, %K cross-over

I've set up an alert as follows to capture when the %K crosses the %D on a weekly basis for Full Stoh setting (5,3,3) instead of (14,5,5) for TQQQ.

The alert looks like this:

[symbol starts with 'TQQQ']
// This alert finds when TQQQ Full Stoh's %K crosses Full Stoh's %D & vice-versa on a weekly basis
AND [Weekly Full Stoch %K(5,3,3) X Weekly Full Stoch %D(5,3,3)]
OR [Weekly Full Stoch %D(5,3,3) X Weekly Full Stoch %K(5,3,3)]

However, this has been running for the past 5 market days but I get an alert message every morning. It is clear on the charts, that no condition has occurred that should have triggered a message.

What am I missing or not have correct?

VicD

Comments

  • markdmarkd mod
    edited October 2023
    probably a brackets syntax problem

    try this

    [symbol starts with 'TQQQ']

    AND

    [ // begin 'or' alternatives

    [Weekly Full Stoch %K(5,3,3) X Weekly Full Stoch %D(5,3,3)]

    OR

    [Weekly Full Stoch %D(5,3,3) X Weekly Full Stoch %K(5,3,3)]

    ] // end 'or' alternatives


    An "or" statement not contained in its "own" brackets returns a symbol (or alert) when ANY condition in the scan is true. So this alert would click everyday because [symbol starts with 'TQQQ'] is always true.

    p.s. you could probably use [symbol is 'TQQQ'] instead of start with; in case there is (or will be) another symbol that really does start with TQQQ.
  • Thank you Mark. I'll give this a try and report back in a few days as to the results. If this works, it certainly is a subtle difference in how you construct the alert
  • markdmarkd mod
    edited October 2023
    This is pretty hard to find, since the Help search engine is so poor, but it explains using "or" :


    https://support.stockcharts.com/doku.php?id=scans:advanced_scan_syntax:or_clauses
  • Mark, thanks for your recommendation on 16-Oct. I'm now getting the alerts. However, I am getting the alert everyday and not just on cross-over days. I will study the "Or' link you provided to see if that has anything to do with this daily alert. Thanks again for all the support.
  • markdmarkd mod
    edited October 2023
    Possibly it hits everyday because its a weekly scan, but runs daily.

    I'm guessing it could hit every day during the first week each time the condition is met. Each day's intraday update in the current week is considered the close of the current week, and it gets compared to the final close of the previous week. Then, each night, I'm guessing, the previous day's alerts are cleared, even if its a weekly scan, so that would allow the alert to trigger again the next day if the condition is still true (or true again if it closed the previous day not true). That could happen multiple times in the first week. Then the first day of the second week it would not trigger if the first week's hit was true at its final close.
  • A weekly indicator can be tricky on alerts, especially on a volatile security that gaps a lot on a daily basis.
Sign In or Register to comment.