StockFetcher Forums · General Discussion · Applying a filter to one stock for lookback purpose<< 1 2 >>Post Follow-up
sevenacorns
6 posts
msg #101660
Ignore sevenacorns
7/15/2011 1:12:32 PM

I'm wondering if there is a way to run a filter a particular stock to see when it has triggered in the past, rather than running the filter for just a particular date (today or in the past)?
Thanks for any help on this.
Isaac

four
5,087 posts
msg #101661
Ignore four
modified
7/15/2011 1:39:19 PM

Information:

line 1 : Apple (aapl)
line 2 : LOGIC is X = 1 when rsi(2) < 30 and X = 0 when rsi(2) > 30
NOTE: The 1 in the filter is the number of days to check for the LOGIC. The COUNT checks each day as an individual event. A 1 or 0 is assigned.
line 3 : Draw x
line 4 : Draw line at rsi(2) = 30 for additional visual

See filter below:

Fetcher[
symlist(aapl)
set{x, count(rsi(2) < 30,1)}
draw x
draw rsi(2) line at 30
]





sevenacorns
6 posts
msg #101662
Ignore sevenacorns
7/15/2011 4:19:08 PM

Thanks for your input, but unless I just don't understand, this isn't what I was looking for.

What I'm interested in seeing is one of my filters run on just one stock, say AAPL, to see when the filter would have been triggered for this stock over the past year.

Thank you.

duke56468
683 posts
msg #101663
Ignore duke56468
7/15/2011 4:47:17 PM

Can you give the filter you are talking about. May not be that complicated to figure out if we know the filter.

sevenacorns
6 posts
msg #101665
Ignore sevenacorns
7/15/2011 6:36:13 PM

Sure-
the filter has some general rules like market cap and price, and

And CCI(90) is greater than 50
And MACD Histogram (8/21,7) is greater than 0.0
Slow stochastic(33,5) %D crossed above 50 in the last 1 day
and price is more than 0.7% greater than close 1 day ago

Thanks, Isaac

Kevin_in_GA
4,599 posts
msg #101667
Ignore Kevin_in_GA
7/15/2011 7:19:26 PM

And CCI(90) is greater than 50
And MACD Histogram (8/21,7) is greater than 0.0
Slow stochastic(33,5) %D crossed above 50 in the last 1 day
and price is more than 0.7% greater than close 1 day ago


Fetcher[

set{condition1, count(CCI(90) above 50, 1)}
set{condition2, count(MACD Histogram (8,21,7) above 0,1)}
set{condition3, count(Slow stochastic(33,5) %D crossed above 50 in the last 1 day, 1)}
set{condition4, count(price is more than 0.7% greater than close 1 day ago,1)}

set{var1, condition1 * condition2}
set{var2, var1 * condition3}
set{trigger, var2* condition4}

trigger above 0.5

draw trigger
]



look for whenever the trigger graph line shows a spike - that tells you when historically it occurred.



duke56468
683 posts
msg #101668
Ignore duke56468
7/15/2011 9:57:59 PM

Thanks Kevin........ I couldn't get that far, but I think he wants to apply it to a symlist and have it tell him how many times it occurred for that stock in the last (x) period. I'm not sure SF can do that.

Kevin_in_GA
4,599 posts
msg #101671
Ignore Kevin_in_GA
7/16/2011 7:39:50 AM

Well, you could just replace the line "trigger above 0.5" with "watchlist(XYZ)" or "symlist(AAPL)", then look at the charts.

Beyond that I don't think SF code can do much more.

sevenacorns
6 posts
msg #101673
Ignore sevenacorns
7/16/2011 11:17:14 AM

Thank you very much Kevin for the solution provided- this does what I was looking for, which basically is a visual way to analyze how a filter performs by looking at the trigger points on a stocks chart, rather than utilizing the backtests (which I find difficult considering all the variables).

Much appreciated.
Isaac in Seattle

sevenacorns
6 posts
msg #101674
Ignore sevenacorns
7/16/2011 11:46:23 AM

Kevin-
How do I write the code for this trigger lookback for the following line-

[and CCI(77) has increased more than 15 in past 2 days]

Thank you for your time.
Isaac

StockFetcher Forums · General Discussion · Applying a filter to one stock for lookback purpose<< 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.