Here is the code using RDN and 10% gain/loss as an example:
symlist (rdn)
set {gain_threshold, 0.10} /* 20% gain */
set {drop_threshold, 0.10} /* 20% drop */
set {ClOp , close - open}
set {ClOpPct , ClOp / open}
set {OpCl , open - close}
set {OpClPct , OpCl / close}
set {met_threshold_Yesterday , count(ClOpPct 1 day ago >= gain_threshold,1)}
set {met_down_threshold_Yesterday , count(OpClPct 1 day ago >= drop_threshold,1)}
set {gapped_up_today , count(open > close 1 day ago,1)}
set {gapped_down_today , count(open is below close 1 day ago,1)}
set {met_threshold_then_gapped_up_today , met_threshold_yesterday * gapped_up_today}
set {met_threshold_then_gapped_down_today , met_threshold_yesterday * gapped_down_today}
set {met_down_threshold_then_gapped_up_today , met_down_threshold_yesterday * gapped_up_today}
set {met_down_threshold_then_gapped_down_today , met_down_threshold_yesterday * gapped_down_today}
set {met_threshold ,count(met_threshold_yesterday >= 1,100)}
set {then_gapped_up , count(met_threshold_then_gapped_up_today >= 1,100)}
set {then_gapped_down , count(met_threshold_then_gapped_down_today >= 1,100)}
add column met_threshold
add column then_gapped_up
add column then_gapped_down
set {met_down_threshold , count(met_down_threshold_yesterday >= 1,100)}
set {down_then_gapped_up , count(met_down_threshold_then_gapped_up_today >= 1,100)}
set {down_then_gapped_down , count(met_down_threshold_then_gapped_down_today >= 1,100)}
add column met_down_threshold
add column down_then_gapped_up
add column down_then_gapped_down
chart-time 105 day
draw met_threshold_yesterday
draw met_down_threshold_yesterday
11 comments:
Johnny V thank you so much for your dedication, hard work and blog page. You took the time e-mailing me and explaing things I didnt understand. You guided me from filters to chart help books to shorting or going long. Without you, I would be lost. You put me on tract, and will be looking forward to all your furture blogs and input when your around!
Thanks a million
Raymond B aka AntonellaB
thanks raymond,
I hope you caught ABK and RDN in the afternoon. They were boring in the morning but they picked up! Heard the chat was going nuts on RDN
typos, Grrrr... explaining*, track*,
Johnny,
I tried this filter in Stockfetcher but I didn't get any numbers or results or anything. When I ran debug, it said Unable to process due to set{} errors for the 1st line of code.
this filter is brilliant! thank you johnnyvento.
cheers,
dilimanrepublic
jv, even though I wrote this filter, the original idea for this type of filter was by The Rumpled One -- Avery Horton. The fact that I had studied so much of TRO's work is why I was able to whip this out in <= 2 minutes. I hope it's still making $s for you!
-Chip
Johnny-
Like Yngvai, I couldn't get this to work either. Does it still work for you? Any idea why it's returning that set{} error? Thanks!
I don't know why it's not working for you guys. I provided the update to attempt to solve this situation because I thought the problem resided with not copying all of the text properly. However if this does not solve the situation please email me at johnnyvento@gmail.com and I will send you the text copied straight from my email or from Stockfetcher. I would like to solve this problem because I am getting hits from all over on this and would like it to be working!
JV sent me the Stockfetcher code by e-mail and it worked. I can see that some code was left out of the above post. I see that the blog allows HTML tags such as a less than sign followed by a b followed by a greater than signs to make bold text. I think that it is interpreting some of the Stockfetcher code as HTML tags and going off in the weeds and losing the code. One could make a version of the code that does not have any less than or greater than signs, but it is probably easier to pass the code via e-mail.
DaveH or JV-
Would one of you mind emailing the code over to me?
What a nice piece of scripting. To help others download without the html problems, just copy the text and take it to a html stripper, I used http://www.zubrag.com/tools/html-tags-stripper.php and then take that text for stockfetcher filter. Thanks for the post.
Post a Comment