StockFetcher Forums · Filter Exchange · Touching Resistance<< 1 2 >>Post Follow-up
kasheehan
8 posts
msg #48087
Ignore kasheehan
11/20/2006 9:44:52 PM

Can anyone tell me the proper code to search for stocks that have touched resistance at least 3 times within the past 30 days?

TIA


kasheehan
8 posts
msg #48152
Ignore kasheehan
11/25/2006 11:45:44 AM

Thanks for the filter, TRO!

I apologize for not being more clear. I meant to say I was looking for the number of times horizontal resistance was touched.


TheRumpledOne
6,411 posts
msg #48153
Ignore TheRumpledOne
11/25/2006 12:00:10 PM

You have to DEFINE horizontal resistance.

I wasn't sure what you wanted so I included 3 different "resistances" in the above filter.




TheRumpledOne
6,411 posts
msg #48104
Ignore TheRumpledOne
modified
11/25/2006 12:00:39 PM

You could use COUNT.

Example:

Fetcher[
set{rhits, count( high equal high 30 day high , 30 ) }
set{r1hits, count( high > r1 , 30 ) }
set{r2hits, count( high > r2 , 30 ) }
rhits > 2

add column rhits
add column high 30 day high
add column separator

add column r1hits
add column r1
add column separator

add column r2hits
add column r2
add column separator

draw r1
draw r2
draw high 30 day high


close > 1
volume > 1000000

sort column 5 descending
]



HTH.










kasheehan
8 posts
msg #48156
Ignore kasheehan
11/25/2006 4:54:20 PM

Sorry, TRO. By resistance, I meant StockFetcher's indicator term for resistance (i.e., "close is below resistance(45,15,2)")

I am able to run a filter that shows all stocks within 2% of resistance (again using SF's "resistance" indicator, but I didn't have any luck incorporating "touched" in the same filter with the SF "resistance" indicator.

Thanks for your patience.


TheRumpledOne
6,411 posts
msg #48164
Ignore TheRumpledOne
modified
11/26/2006 4:03:51 PM

Fetcher[

set{rhits, count( high above resistance(45,15,2) , 30 ) }
set{r1hits, count( high > r1 , 30 ) }
set{r2hits, count( high > r2 , 30 ) }
rhits > 2

add column rhits
add column resistance(45,15,2)
add column separator

add column r1hits
add column r1
add column separator

add column r2hits
add column r2
add column separator

draw r1
draw r2
draw resistance(45,15,2)


close > 1
volume > 1000000

sort column 5 descending
]



Looks like something went haywire with the resistance value!?!??!?!








kasheehan
8 posts
msg #48281
Ignore kasheehan
12/1/2006 9:57:21 AM

Well, thanks for trying, TRO. I appreciate your efforts on this. It looks like the "Resistance" indicator developed by SF needs some work. I prefer to use horizontal resistance, which is what the Resistance indicator attempts to do, as opposed to pivot point resistance levels.



traderblues
195 posts
msg #48283
Ignore traderblues
12/1/2006 11:31:48 AM

I think I have something:

Fetcher[count(close reached a new 100 day high,59) is below 1
and set{old100high,close 100 day high}
and count(high is above old100high,59) is above 2
and count(high is above old100high,10) is above 0
]




TheRumpledOne
6,411 posts
msg #48295
Ignore TheRumpledOne
12/1/2006 7:33:57 PM

How do you define HORIZONTAL RESISTANCE?


TheRumpledOne
6,411 posts
msg #48296
Ignore TheRumpledOne
modified
12/1/2006 7:50:51 PM

Did you see this filter I wrote a long time ago?

Fetcher[
/* Dynamic Support/Resistance with TRADE PLANNER DISPLAY */

/* PRICE POSITION PERCENT DISPLAY */

/* enter your Upper Limit criteria */
set{UpperLim, High 5 Day High}

/* enter your Lower Limit criteria */
set{LowerLim, Low 5 Day Low}

set{LimDiff, UpperLim minus LowerLim}
set{PPDiff, CLOSE minus LowerLim}
set{PPDiv, PPDiff / LimDiff}
set{BallOn, PPDiv * 100}

set{PCT, LimDiff / LowerLim}

set{HiOp,high - open}
set{OpLo, open - low}



set{HHb,days(High is above High 1 day ago,100)}
set{HHa,days(High is below High 1 day ago,100)}
set{HixHi, HHa - HHb}

set{LLb,days(Low is above Low 1 day ago,100)}
set{LLa,days(Low is below Low 1 day ago,100)}
set{LoxLo, LLa - LLb}

/* column display */

add column HiOp
add column OpLo

add column BallOn
add column PCT

add column HixHi
add column LoxLo


/* PLOTS */

draw UpperLim on plot price
draw LowerLim on plot price

/* Trade Planner Filter Display - Simple */


set{ iAccountSize , 25000 }
set{ iPercentRisk, .02}
set{ iMarginMult , 1}
set{ iMaxDrawDownPct, .05}
set{ iEntryPrice , close}

set{ iShares, 0 }
set{ iProtectiveStop , 0}

set{ iTargetPrice , 0}
set{ iRewardRatio , 2}

set{ xMaxDollars, iAccountSize * iMarginMult }


set{ xTradeRisk, xMaxDollars * iPercentRisk }

set{ xShares , xTradeRisk / iEntryPrice }

set{ xShareRisk , xTradeRisk / xShares }


set{ xStop , iEntryPrice - xShareRisk }

set{ xtp, xShareRisk * iRewardRatio }
set{ xTarget , xtp + iEntryPrice }


add column xShares
add column xStop
add column xTarget
add column xTradeRisk

/* Selection Criteria */

set{BallLow, count( BallOn < 2 , 1 ) }
set{BallHigh, count( BallOn > 98 , 1 ) }
set{PlayBall, BallLow + BallHigh }

PlayBall > 0

Close above 1

avg vol(5) above 1000000
avg vol(30) above 1000000

add column industry

Sort column 7 ascending

/* DRAW LINES */

draw upperlim on plot price
draw lowerlim on plot price
draw xStop 1 day ago on plot price
draw xTarget 1 day ago on plot price

]



You can get more stocks by adjust the PLAYBALL parameters. As is, the price has to be in the upper 2% or lower 2% of the range.

Look at what happened after NTRI put in a new low 3 days ago.

HTH.





StockFetcher Forums · Filter Exchange · Touching Resistance<< 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.