StockFetcher Forums · General Discussion · Rate of Change (ROC) challenge<< 1 2 >>Post Follow-up
glgene
523 posts
msg #36762
Ignore glgene
7/6/2005 10:19:13 PM

To: TheRumpledOne

If anybody can figure this out, it's you. Here is what I'm seeking.
I need a filter than can do the following:

Add the % ROC(5) to % ROC(15) and % ROC(15) on today for a 3-part total
and show stocks whose 3-part sum crosses from below to above 4% (buy)
and, conversely, show stocks whose 3-part sum crosses from above to below 4% (sell)

The result is a Triple Momentum level and, supposedly, has done well over the years. It's author is Gerald Appel, founder of the MACD signal.

I would like to "draw" the ROC(5), ROC(15) and ROC(25) percentages and the summation of these totals, along with "add column" of the same fields.

Remember, the ROC numbers added need to be percentages (not $).

I've seen your many, many wonderful posts, TheRumpledOne.
Can you help here? I would SERIOUSLY appreciate it. Thank you.

GL Gene


glgene
523 posts
msg #36763
Ignore glgene
7/6/2005 10:32:41 PM

Oops. I meant ROC(5), ROC(15) and ROC(25) summation.

GL Gene


TheRumpledOne
6,358 posts
msg #36765
Ignore TheRumpledOne
7/6/2005 11:31:42 PM

Very interesting...

Fetcher[
/* triple roc crossing above +4 */
set{a1,roc(5) + roc(15)}
set{xROC,a1 + roc(25)}

roc(5) 1 day ago below 4
roc(15) 1 day ago below 4
roc(25) 1 day ago below 4

xROC crosses above 4

add column roc(5)
add column roc(15)
add column roc(25)
add column xROC

draw roc(5)
draw roc(15)
draw roc(25)
draw xROC

]




Fetcher[
/* triple roc crossing below -4 */
set{a1,roc(5) + roc(15)}
set{xROC,a1 + roc(25)}

roc(5) 1 day ago above 4
roc(15) 1 day ago above 4
roc(25) 1 day ago above 4

xROC crosses below -4

add column roc(5)
add column roc(15)
add column roc(25)
add column xROC

draw roc(5)
draw roc(15)
draw roc(25)
draw xROC

]




One thing you have to make sure of that ALL 3 ROCs were below/above 4% because negative numbers offset positive numbers when you add!

I think this is close to what you want. To my knowledge, ROC is never in dollars.

But I did the next 2 versions to fix the smoothed roc "problem":

Fetcher[
/* triple roc crossing above +4 */
set{a1,roc(5, 1) + roc(15, 1)}
set{xROC,a1 + roc(25, 1)}

roc(5, 1) 1 day ago below 4
roc(15, 1) 1 day ago below 4
roc(25, 1) 1 day ago below 4

xROC crosses above 4

add column roc(5, 1)
add column roc(15, 1)
add column roc(25, 1)
add column xROC

draw roc(5, 1)
draw roc(15, 1)
draw roc(25, 1)
draw xROC

]




Fetcher[
/* triple roc crossing below -4 */
set{a1,roc(5, 1) + roc(15, 1)}
set{xROC,a1 + roc(25, 1)}

roc(5, 1) 1 day ago above 4
roc(15, 1) 1 day ago above 4
roc(25, 1) 1 day ago above 4

xROC crosses below -4

add column roc(5, 1)
add column roc(15, 1)
add column roc(25, 1)
add column xROC

draw roc(5, 1)
draw roc(15, 1)
draw roc(25, 1)
draw xROC

]



Hey SF, it looks like ROC and Smoothed ROC are the same.. what gives??

MAY ALL YOUR FILLS BE COMPLETE.





glgene
523 posts
msg #36768
Ignore glgene
7/7/2005 5:17:01 AM

To: TheRumpledOne

You said that it's important that all 3 percentages be positive (for a buy), but that's not true according to Appel. It's strictly the summation of all 3 numbers. Thus, a negative ROC(5) would drive down the summation when the longer term ROCs are positive. That's the point. Combine all 3 ROCs (negatives and positives) for a "net" number. A smoothed final number. Do you need to change your scripting to take that into effect?

According to Appel, this approach (using the NASDAQ Composite) outperformed buy-and-hold in 20 of the 32 years between 1970 and 2004 -- while only being "long" 45.9% of the time. How's that for risk management?!

Round-trip trades came in at 8.9 per year during the 32-year period. That may seem like a lot, but it's still less than once per month.

All this info is written in Appel's latest book, "Technical Analysis, Power Tools for Active Investors."

One question: I know that the NASDAQ composite symbol in Yahoo is ^IXIC. What is it in StockFetcher? Can you modify the filter to include that SF symbol?

I really appreciate your prompt answer to my initial question. As I've asked before, tell me the source of your Smart Pills.

GL Gene


glgene
523 posts
msg #36769
Ignore glgene
7/7/2005 5:27:33 AM

To: TheRumpledOne

Thought of another question. The "add column" components to your scripting shows, for example, ROC(5,13) instead of just ROC(5). What's with the 13? What does that mean? Is that a true ROC(5) or is it smoothed by some type of StockFetcher 13-day default smoothing? If that's the case, I'm afraid that would distort Appel's formula. ??????

GL Gene


TheRumpledOne
6,358 posts
msg #36770
Ignore TheRumpledOne
7/7/2005 9:28:04 AM

Hey Gene... post your questions to everyone, not just me.. there are others who are willing to help... don't limit yourself.

Fetcher[
/* triple roc crossing above +4 */
set{a1,roc(5, 1) + roc(15, 1)}
set{xROC,a1 + roc(25, 1)}

xROC crosses above 4

add column roc(5, 1)
add column roc(15, 1)
add column roc(25, 1)
add column xROC

draw roc(5, 1)
draw roc(15, 1)
draw roc(25, 1)
draw xROC

]




Fetcher[
/* triple roc crossing below -4 */
set{a1,roc(5, 1) + roc(15, 1)}
set{xROC,a1 + roc(25, 1)}

xROC crosses below -4

add column roc(5, 1)
add column roc(15, 1)
add column roc(25, 1)
add column xROC

draw roc(5, 1)
draw roc(15, 1)
draw roc(25, 1)
draw xROC

]



I took out the criteria so now positives and negatives get mixed in.

To me, it makes more sense if all 3 are coming from one extreme or the other (ORIGINAL VERSION), but that's just me.

As far as the ema goes, that's why I have the ,1 so the ema is only over 1 period, i.e. cancelled out.


MAY ALL YOUR FILLS BE COMPLETE.



glgene
523 posts
msg #36771
Ignore glgene
7/7/2005 9:55:51 AM

How would I run the filter against the NASDAQ composite (^IXIC)? That's Appel's base application.

GL Gene


TheRumpledOne
6,358 posts
msg #36773
Ignore TheRumpledOne
7/7/2005 1:21:08 PM

You could use the QQQQ for NASDAQ.

See if that works for you.


glgene
523 posts
msg #36775
Ignore glgene
7/7/2005 2:17:58 PM

TheRumpledOne,

I think (just think) your 1 line of code is incorrect:

You say, xROC crosses below -4
I don't think it should be -4. Just 4.

Here is what Appel's book says: "There is only one buy rule and one sell rule. You buy when the Triple Momentum Level, the sum of the 5-, 15-, and 25-day rates of change, cross from below to above 4%. You sell when the Triple Momentum Level, the sum of the 5-, 15-, and 25-day rates of change, cross from above to below 4%. [It doesn't say below -4%]. If you agree with me, can you adjust that part of your script? Thanks.

GL Gene


TheRumpledOne
6,358 posts
msg #36782
Ignore TheRumpledOne
7/7/2005 9:45:39 PM


I think (just think) your 1 line of code is incorrect:

Why didn't you post this in the first place??

Next time, post all the info you have.

You can change one line of code without my help, can't you?

Just, copy/paste and then change the line and post it here.

"You say, xROC crosses below -4
I don't think it should be -4. Just 4.

Here is what Appel's book says: "There is only one buy rule and one sell rule. You buy when the Triple Momentum Level, the sum of the 5-, 15-, and 25-day rates of change, cross from below to above 4%. You sell when the Triple Momentum Level, the sum of the 5-, 15-, and 25-day rates of change, cross from above to below 4%. [It doesn't say below -4%]. If you agree with me, can you adjust that part of your script? Thanks."



StockFetcher Forums · General Discussion · Rate of Change (ROC) challenge<< 1 2 >>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 2016 - 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