Today we're adding a new function to the Advanced Scan Engine called PctDiff. PctDiff will return the percentage difference between two values. PctDiff can be found in the Technical Indicators list on the Advanced Scan Workbench.
For example, PctDiff(close, SMA(50,close)) will return the percentage difference between the current closing price and the 50-day simple moving average of the close. Here is what a simple scan might look like:
[type = stock]
and [pctdiff(close,sma(50,close)) < 5]
Since PctDiff returns the difference between two values, it does not accept time modifiers. Saying '2 weeks ago' PctDiff doesn't mean anything and thus the Scan Engine ignores any time modifiers.