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.
Options

Pctchange starting 10 days back from Today.

Hey guys,
I am just wondering if I can do this : "and [ 10 days ago Pctchange(20, Sma) > 5]". What I wanna to do there, is to scan for the % change over 20 days starting 10 days back from now.
Please tell if I can do this.

Comments

  • Options
    The PctChange() function is explained here:

    stockcharts.com/articles/scanning/2011/05/percentage-change-indicator-added.html?st=pctchange%28

    The first parameter is the number of days in the look back period for calculating the change. So, if you want to know which symbols have advanced (on close) more than 5 per cent between today and 20 days ago, you would write:

    and [PctChange(20, close) > 5]

    If you want to know what symbols fit that criteria ten days ago (i.e., looking back 20 days from 10 days ago) you would write:

    and [10 days ago PctChange(20,close) > 5]

    If you want to look at the per cent change for an sma (as you have written in your question) you have to specify the length of the sma and what you are averaging. So let's say it's a 50 day sma of closes. It would be:

    and [10 days ago PctChange(20, sma(50,close)) > 5]
  • Options
    Thanks markd! Though I didn't write the question, I really appreciate your answer.
Sign In or Register to comment.