StockFetcher Forums · Filter Exchange · How to find an average size for candle bodies<< >>Post Follow-up
ImperialWhazoo
26 posts
msg #33560
Ignore ImperialWhazoo
10/12/2004 7:35:10 PM

I have a need I can't figure out.
I want to test the average size of the candle bodies only over the duration of a move. Suppose I am looking at UCAD from Oct 1 to Oct 11. I'd like to be abel to sum up the total candle body sizes and average them by however many days there are and put a custom column on my results pages. And, I want to ignore the direction of the candle. I'n just looking to measure the amplitude of the bodies during an uptick event over the time frame of that upthrust event.

Any ideas on how to construct this given the 10 variable limitation of the "Set" command?


cegis
235 posts
msg #33566
Ignore cegis
10/14/2004 8:03:05 AM

ImperialWhazoo,

First, there is NOT a 10 veriable limit to the set{} command. I have several filters that use upwards of 20 set{}s.

I'm no candlestick guru, so if I get a bit of that technical stuff wrong, please ignore it. The technique will still work after you substitute the correct calculations. Try something like this:

set{body,close - open}
set{sign,count(body > 0,1) - count(body < 0,1)}
set{avgbody,CMA(body * sign,10)

This will average the absolute value of the body (i.e., all values positive, even for a red body) over a 10 day period.

Note that "sign" will be 1 if the body is positive, and -1 if it's negative. Then, by multiplying sign by body, you will always end up with a positive value as a result. (If body is zero, so will sign be zero, which is OK 'cause 0 * 0 = 0.)

If you only want to look at green candles, just remove the second count() in the set{} for sign...

HTH,

C


cegis
235 posts
msg #33567
Ignore cegis
10/14/2004 9:15:42 AM

Or, simply do:

set{myavg,CMA(abs(close - open),10)}

(D'oh!!)

HTH,

C


ImperialWhazoo
26 posts
msg #33570
Ignore ImperialWhazoo
10/14/2004 6:59:49 PM

Thanks cegis

I must complain I'm lost as regards the 10 variable max. I use the web stockfetcher so matbe there is some other version out there. So, I'm absolutely telling you that every time I construct a series of

set{v1,...}
through
set{v11,...}

where there are more than 10 variables (v1 through v11 in this case), and I check the syntax of the statement, I get an error message telling me of a 10 variable limit.

In my perusing of the archives of prior forum questions I have often observed complex and lengthy stockfetcher sentances and I admit it puzzles me to read these long sentances that obviously involve more than 10 varibles, and then to get my repeated error messages when the sentances I constructed contained more than 10 variables.

So, I would be helped if this mystery were resolved.

It isn't that I doubt you... I absolutely believe you. I only want to know what is percolating here so I can go to whatever site you are using and then I can begin to construct sentances with the kind of complexity I need.



cegis
235 posts
msg #33576
Ignore cegis
10/15/2004 11:05:11 AM

ImperialWhazoo,

It slipped my mind, but the SYNTAX CHECKER *DOES* have a 10 set{} limit. The filter execution program *DOES NOT*. Ignore the syntax checker's error message in this case.

Sorry if I confused you.

HTH,

C


StockFetcher Forums · Filter Exchange · How to find an average size for candle bodies<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.