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.
Price > Average of High, Low, Close of Prior 3 days and 3 weeks
Is the below possible in Stockcharts. Appreciate it.
Logic: Price > Average of High, Low, Close of Prior 3 days and
Price > Average of High, Low, Close of Prior 3 Weeks.
Is this possible? Appreciate your feedback.
0
Comments
[group is sp500]
and [close > [[sma(3,high)+sma(3,close) +sma(3,low)]/3 ]]
and [weekly close > [[weekly sma(3,weekly high)+weekly sma(3, weekly close) +weekly sma(3,weekly low)]/3 ]]
The rub is that the values of high low and close are as of the last update. So if you run it during market hours, it uses the intraday values for the daily variables (and weekly). So by the end of the day your results may not match an intraday result. If you run it after hours but before close of business Friday, the daily values are accurate, but the weekly values are as of the current day of the week. So, you would be averaging the final values of the first two weeks, but an intraweek value for the third week. After the last after hours update on Friday and over the weekend the results are "final".