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.

Chart scans

Hello to Everyone:

Is there a syntax in the StockCharts Advanced Scan Editor to scan for ADX signal line moving upwards and peaking in a downwards trendline and conversely for the PPO signal line moving downwards and into a upward trendline??

Any help is much appreciated!!!

John Train

Answers

  • markdmarkd mod
    edited April 2021
    There is nothing built-in that does that. I can think of two approaches.

    One would be to test whether the ADX Line x days ago is the max value over so many days (so its a possible peak), and then test whether the current ADX Line value is less than ADX line some number of days before the peak (max) value. So maybe

    and [10 days ago ADX Line(14) = 10 days ago max(20, ADX Line(14))]
    and [ADX Line(14) < 20 days ago ADX Line(14)]

    I'm just guessing at useful parameters (10, 20 days, max(20...)). You would have to inspect the results and modify them by trial and error. You would reverse the process for finding PPO turning up - use min instead of max, and test for today's value greater than some value before the min level.

    Another way would be to test for crossovers of a moving average. So if ADX crosses below its moving average of some length, it might be changing trend. For instance

    and [sma(14, ADX Line(14)) x ADX Line(14)]

    Again, you would have to test whether 14 is the right sma parameter. The MA approach might give you a more reliable signal sooner, but I'm not sure of that. SMA crossovers are the more conventional approach to change of trend. But any method is going to give you false positives.

    For PPO, you can use Line and Signal crossovers. If you specified Signal turning up and down instead of Line because the Line crossovers are too frequent, just change the length of the Signal parameter from 9 to say, 20, then test for PPO Hist crossing above 0.

    and [PPO Hist (12,26,20) x 0]





  • Just terrific Mark on your response and the suggested syntax is awesome!!!

    I will take all your syntax and suggestions and any other ideas that may occur to you and advise you of the result(s).

    Thank-you for taking the time to reply to my query!!

    Best,
    John Train
Sign In or Register to comment.