Is there an indicator that would allow me to monitor surges or drops of an asset's price compared to the usual range it has traded in over a period of time?

I'm building a script so i'm trying to find something i can automate and have triggers when a stock is deviation X over Z period. X and Z being parameters

2 Answers 2


I'll spare you all of the gobbledygook about how people analyze and use the Stochastic Oscillator. However, it does depict the position of the underlying in relation to the past "X" days and would clearly show deviation from the range.

If you have access to analytical software, you could also calculate the average daily price change and then screen for time periods where price change exceeds that amount by whatever number amuses you.

Or you could simply look at the WSJ intraday list of largest price and percent movers and then look at a chart.

  • I'm building a software to automate the process, somethings are easy to see on a chart but less intuitive to automate. Your 2nd proposal is what i was going for but i'm wondering if there was something more out of the box on which i could feed the EOD price for a period.
    – techtrm
    May 22, 2019 at 4:33
  • You might take a look at Trade Station and Technifilter Plus. They allow you to build your filtering algorithms. May 22, 2019 at 13:08
  • Sorry, but that seriously depends on the definition of past range. Stochatics may end at 100% and take the current day into account,
    – TomTom
    Jun 21, 2019 at 9:08
  • By definition, Lane's Stochastics must include the current day. It would make no sense to look at a past Stochastic that did not include the current day in order to guess what tomorrow will bring. Also by definition, Stochastic ranges from 0 to 100 so it must end at 100, regardless of how much higher in price the security rises. Jun 21, 2019 at 11:17
  • sounds interesting, are you using python for this build? Oct 20, 2019 at 15:23

I understand that you want to calculate things on your own, but it is better not to reinvent the wheel.

People have created technical analysis libraries based on the renowned https://ta-lib.org/, such as https://github.com/mrjbq7/ta-lib for Python that contains 150+ indicators.

The simplest indicator that serves your purpose is probably Bollinger Bands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .