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.

Creating Alerts

I am new to stockcharts and a novice investor. I am trying to create a custom alert based on 3 factors.

- When the price goes above the 10 day moving average
- Slow Stochastic cross based on (14,5) (when the black line crosses over the red line)
- MACD Cross based on (8,17,9) (when the black line crosses over the red line)

anyone familiar with this and can help me out. I think I figured out the MACD but there is two options for Slow Stoch and I am not sure which one to use, or how to write it. Also not sure how to create one for a 10 day moving avg cross.

Thanks!

Comments

  • markdmarkd mod
    edited November 19
    At the bottom of the scan workbench page are very useful links to get you started writing scans. Scans and alerts are pretty similar, so by learning one you are learning the other.

    The sample scans on this page should be adaptable to your needs - if what you need is not already there, just substitute the indicators you want.

    https://stockcharts.com/docs/doku.php?id=scans:library:sample_scans

    One note, though. It looks like you are expecting all the cross over events to happen at the same time. That's very unlikely. Instead, write an alert where two conditions are already true (e.g. MACD Line > MACD Signal and Slow%K > Slow %D) and then look for the cross, e.g. close x MA.

    Refer to the Chart School articles on each indicator to learn their signals (what crosses what).

    https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators

    If you get stuck, post the code you have and someone will tweak it.
Sign In or Register to comment.