time frames

is there syntax to scan for an event that happened between two dates in the past...
ie, looking to scan for 30% gain in 5 days that happened between 3 weeks and 4 weeks ago
Thanks

Answers

  • Two ways:

    1 - write the scan as if it is first occurring today, then use the calendar option (Starting x days from today) to run the scan as of some date in the past - .e.g. close > 4 days ago close *1.3, with a selected scan date 3 weeks ago.

    2 - use "days ago" modifiers that are five days apart - e.g. 20 days ago close > 24 days ago close *1.3 and run the scan as of today.




  • If your requirement is that it has to be up over 30% from day 1 to day 5, the PctChange is also an option.

    [PctChange(5,close) > 30]

  • That's even better. I keep forgetting about those functions.

    Here's the page where they are all defined:

    https://support.stockcharts.com/doku.php?id=scans:functions
  • Nothing to add to this topic, but wanted to thank 'markd'. I've never posted on here before now, but you've helped me many times already. Thank you.
  • Thanks for the kind words. I want to acknowledge @lmkwin as well, whose experience and depth of knowledge trading knowledge far exceeds my own.
  • @markd Thank you for your kind words. I echo @dtkrause, and most everyone else on these boards, in saying thank you for your devotion to helping people learn and understand things in a way that is, dare I say, perfect in tone and presentation.

    I walk in your shadow. It's very nice back here. Not too hot. Not too cold.
  • @lmkwin

    lol, as the kids say. Thanks.