StockFetcher Forums · Filter Exchange · FILTER BASED ON MOVING AVERAGES OF PIVOTS<< 1 2 >>Post Follow-up
Kevin_in_GA
4,599 posts
msg #84053
Ignore Kevin_in_GA
12/8/2009 4:18:10 PM

Here's a new filter that I am in the process of refining. The basic principle is to look at moving averages of the pivot points (PP, R1, and S1). My simple starting point was to take the 10 day moving average of each of these values, offset them by 1 day so that I would be using yesterday's closing values for each morning's open, and then plot them on price.

If the price closes above the 10 day MA of the PP, a BUY signal is triggered. That BUY signal stays in effect until the price again closes below the 10 day MA of R1. At that point, a SELL siGNal is triggered.

NOTE: If the price lies between the R1 and PP moving averages, BOTH SIGNALS ARE GENERATED. I view this situation as a signal for caution. Either you can see this as a BUY signal on the start of an up move, or a pause after a price rise before either dropping or continuing higher - if you have made good coin by this time, you might want to scale out of the trade.

Fetcher[

set{pp_10, CMA(pp,10) 1 day ago}
set{r_10, CMA(r1,10) 1 day ago}
set{s_10, CMA(s1,10) 1 day ago}

set{BUY, count(close closes above pp_10,1)}
set{SELL, count(close closes below r_10,1)}
set{WAIT, BUY * SELL}


draw WAIT
draw SELL on plot WAIT
draw BUY on plot WAIT

draw pp_10 on plot price
draw r_10 on plot price
draw s_10 on plot price

symlist(spy,qqqq,dia,gld,iwm,slv)

add column BUY
add column SELL
add column pp_10
add column r_10
add column s_10
]



I am using this to look at the Index surrogates and precious metals. However, it can be applied to any stock or ETF.

If you want to look at longer timeframes, add weekly in front of each variable, like so:

Fetcher[

set{weeklypp_10, CMA(weekly pp,10) 1 week ago}
set{weeklyr_10, CMA(weekly r1,10) 1 week ago}
set{weeklys_10, CMA(weekly s1,10) 1 week ago}

set{BUY, count(close closes above weeklypp_10,1)}
set{SELL, count(close closes below weeklyr_10,1)}
chart-display is weekly
chart-time is 1 year

draw BUY
draw SELL on plot BUY

draw weeklypp_10 on plot price
draw weeklyr_10 on plot price
draw weeklys_10 on plot price

symlist(spy,qqqq,dia,gld,iwm,slv)

add column BUY
add column SELL
add column weeklypp_10
add column weeklyr_10
add column weeklys_10
]



Any feedback is appreciated.


trendscanner
265 posts
msg #84098
Ignore trendscanner
12/9/2009 4:27:34 PM

Kevin, this is a great filter. One thing I noticed by inspection of the charts it produces is that for many rallies, waiting until price closes above the 10 day MA of the PP means missing a significant portion of the initial upmove. Did you evaluate the effect of different MA periods and select the 10 day for any particular reason?

I played with the filter a bit, looking at different MA periods. Reducing the MAs to a 3 day period as shown below produces something that might allow for quicker entry and exits that are reasonably safe. For example, if you use close above S3 as a buy signal and close below R3 as a sell signal, you get in earlier and out quicker without too many whipsaws.

This filter would be good to use in conjunction with some of the Conner rsi based filters for confirmation of entry and exit points. They probably wouldn't always exactly agree on entry and exit times, but when they do, they might produce pretty good signals.

thanks for posting it


Fetcher[
set{pp_3, CMA(pp,3) 1 day ago}
set{r_3, CMA(r1,3) 1 day ago}
set{s_3, CMA(s1,3) 1 day ago}

set{BUY, count(close closes above pp_3,1)}
set{SELL, count(close closes below r_3,1)}
set{WAIT, BUY * SELL}


draw WAIT
draw SELL on plot WAIT
draw BUY on plot WAIT

draw pp_3 on plot price
draw r_3 on plot price
draw s_3 on plot price

symlist(spy,qqqq,dia,gld,iwm,slv)

add column BUY
add column SELL
add column pp_3
add column r_3
add column s_3
]



Kevin_in_GA
4,599 posts
msg #84135
Ignore Kevin_in_GA
modified
12/10/2009 9:25:29 AM

trendscanner:

I chose 10 day MAs as a starting point - no optimization done yet. They seemed to provide fairly smooth trigger signals that gave good a entry/exit.

I originally used a close above the pp becasue then you had both the pp and s1 lines as support to prevent a quick retracement. I recognized that you were in later on a move up, but thought that it would prevent some losing trades and basically be a wash.

I'll run some stats on pp versus s1 entries on the six etfs listed over the last 6 months to see if it makes a difference or not.

Both setups have you exit at the r1 line so that is not changed.

Kevin

srinisu
22 posts
msg #97611
Ignore srinisu
modified
11/24/2010 11:46:56 PM

Hi Kevin:

What tool do you use to run your stats?

Regards

SS

ricks_stocks
35 posts
msg #97674
Ignore ricks_stocks
11/29/2010 7:58:40 PM

Wow Kevin, nice filter.
Very clean and straight forward.
Any reason you did not pursue it further?

Rick


Kevin_in_GA
4,599 posts
msg #97675
Ignore Kevin_in_GA
11/29/2010 8:35:36 PM

Not really. I was looking at a series of moving averages, etc as possible guides for buy and sell.

There are a number of possible ways to optimize this further - MA period, using PP or combinations of R1/R2 and S1/S2, etc.

I have been using a very different set of filters lately that trade much more consistently than what I have been able to do with SF language, so I had put some of these aside and not gotten back to finishing them.

duke56468
683 posts
msg #97680
Ignore duke56468
11/30/2010 9:21:34 AM

Kevin.....Can you tell us what program you have found that is more robust than SF? Thanks

mslattery@dc.rr.com
91 posts
msg #97983
Ignore mslattery@dc.rr.com
modified
12/12/2010 9:30:21 PM

Hi Keven:

Very interesting filter. Has it been back tested and can you share the results?

I am very frustrated with the results that fall way outside of defined paramaters.

What other options are out there besides SF?

Thanks, Michael

bkhurana43
103 posts
msg #98117
Ignore bkhurana43
12/19/2010 5:42:44 PM

trendscanner:
Could you please include the logic in a way that it displays "0" values under BUY and SELL columns when the condition for WAIT is true (meaning a display of value 1 under WAIT column). Thanks

Bob

bkhurana43
103 posts
msg #98197
Ignore bkhurana43
modified
12/25/2010 9:45:39 AM

Hi Keven,
I made some changes to your posted filter in order to get WAIT column printed (making it distinct from BUY and SELL columns), but some how results are not very satisfactory. I get a message "Your StockFetcher filter exceeds filter performance restrictions" . Is there any round about method that you can suggest?

Fetcher[set{pp_3, CMA(pp,3) 1 day ago}
set{r_3, CMA(r1,3) 1 day ago}
set{s_3, CMA(s1,3) 1 day ago}

set{VAR1, count(close closes above pp_3,1)}
set{VAR2, count(close closes below r_3,1)}
set{WAIT, VAR1 * VAR2}
set{BUY, ABS(WAIT- VAR1)}
set{SELL, ABS(WAIT- VAR2)}


draw WAIT
draw SELL on plot WAIT
draw BUY on plot WAIT

draw pp_3 on plot price
draw r_3 on plot price
draw s_3 on plot price


add column BUY
add column SELL
add column WAIT
add column pp_3
add column r_3
add column s_3
]






StockFetcher Forums · Filter Exchange · FILTER BASED ON MOVING AVERAGES OF PIVOTS<< 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 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.