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.
Scan for displaced moving average e.g. sma(1,h,20)
Dear team,
how we are going to scan for a moving average of the highs, which is forwarded for 20 days into the future? In a chart I can see the line.
The scan engine only takes two parameters and shows an error. Is there a way to get around?
Thank you for your input.
Best
stokkcharts
0
Comments
and [close > 20 days ago sma(20, high)]
If it's Ichimoku, that's based on formulas. You can replicate that formula or use the Ichimoku segment you are interested in, in your scan. It's available in the Technical Indicators dropdown in the Scan workbench. Some of the segments display "in the future" but that is more for a visual as to where the current data falls so that possible expected support and resistance are more visual.
sma(1, high) is just a line that connects all the highs. It's not really an "average" because the divisor is 1 and 1 into any number is the number, e.g. 12/1 = 12.
sma(1,20, high) is the sma(1,high) line pushed forward 20 bars, as if the value from 20 days ago is occurring 20 days later.
So, the scan would be as above, except using the crossover operator "x" and a scan date of Jun 11 or 12 (hard to tell from the chart).