Underworlds 30 posts msg #90472 - Ignore Underworlds |
3/27/2010 6:28:10 PM
I am trying to calculate the average body height of candlesticks over the past 45 days using the CMA() function, as follows...
set{avgbodyheight,CMA(close,45) - CMA(open,45)}
The problem I am having is that the CMA() function includes the data from the most recent candlestick, which I need to exclude from the average.
Does anyone here know a trick or two that I might be able to use to exclude the last day's data from the CMA() function?
Thanx
|
four 5,087 posts msg #90474 - Ignore four |
3/27/2010 7:03:09 PM
|
Kevin_in_GA 4,599 posts msg #90475 - Ignore Kevin_in_GA |
3/27/2010 7:58:28 PM
just add 1 day ago to the end of the function ...
|
Underworlds 30 posts msg #90476 - Ignore Underworlds |
3/27/2010 8:00:44 PM
four - Thanx for the effort, but I don't see how your solution shifts the range back by one day.
While I was waiting for help, I think I figured out a more direct solution to the problem by simply reversing the averaging process.
|
Underworlds 30 posts msg #90489 - Ignore Underworlds |
3/28/2010 1:57:26 AM
Thanx for all the help, guys. I am new to StockFetcher, and at candlesticks in general. To help familiarize myself with the different types of candlesticks, I have been writing code to help me select candlesticks based on their relative sizes with the preceding candlesticks in the charts.
I know that this may seem very elementary to many of the older members of this site, but it has already taught me a lot more about charts than I knew before I started.
The only candlestick code that I have left to write is for the High Wave. Once that bit of code is complete, I plan on expanding on my candlestick code to identify the various patterns.
I know... many of the patterns are already built into StockFetcher. Still, its a learning experience.
|