StockFetcher Forums · Filter Exchange · RSI 2 Bounce Filter<< 1 2 3 >>Post Follow-up
bert123
53 posts
msg #160071
Ignore bert123
2/4/2023 9:58:21 PM

Hi Ed S.,
Thanks for sticking with this project. To answer your question, I'll explain my process utilizing the previous filter that has the MA(5) in it.

I run the filter for the current day by adding the line rsi(2) crossed below 10 in last one day.
I know it's controversial, but I buy the stock on the close on the first day it crosses below 10.
I am not waiting for the stock to show green or anything like that. I am taking the risk that it will continue lower in the following days. I am betting on a bounce to get above MA(5) and then I am exiting the trade on that day. I use a discretionary, mental Stop Loss to exit the trade if it doesn't work out and I use a hard catastrophic stop loss of ATR(14) X 3 just in case. I only take 1 position at a time so I don't risk having multiple positions exposed in case of a sudden market crash. I trade one at a time until it ends and then take a new trade.

I first run the filter about 1/2 hour before the close and look at the qualifiers. Currently I am sorting by
number of times rsi(2) crossed below 10 in ascending order. I then manually scan the linear table and look for stocks like ACLX that have a high percentage of profitability. I am looking only at NASDAQ stocks and I am entering a Buy Market-On-Close order by 15 minutes before the close. I almost always get the actual closing price. I then hold until the stock is going to close above MA(5) and sell on that day right before or at the close.
It doesn't matter to me how many days it takes to cross above MA(5) or how many days RSI(2) stays below 10, or 30, etc.. For my purposes a profitable trade is defined as a higher close on the day of the MA(5) cross than the entry day of RSI(2) cross. A losing trade is defined as the price being lower on the day of the MA(5) cross than the entry day of the RSI(2) cross. This could take several days.

For the filter to fit my usage I only need the linear display showing the RSI(2) qualifying days and
the MA(5) days. Then, I only need the columnar display to show the following:
- RSI(2) Under 10 in last 120 days (not counting today)
- % Profitable ( based on entering on first day of RSI(2)<10 and exiting at close on day of MA(5) cross.
- Total Profit
- Average Profit
It looks like all of the above has been figured out by you and the other contributors but includes more data and has more restrictions than I need. The 4 columns I listed above plus the 2 lines in the linear display
would be all I need. Again, it looks to me like you've got it figured out but it just needs some modifications.
Thanks again for sticking with this!

nibor100
1,031 posts
msg #160072
Ignore nibor100
2/5/2023 1:45:04 PM

@bert123,

The filter below adds some stuff from your last post and takes out a lot of the stuff you don't want.

I left it with just 1 day, and 2 day, and 3 day trade duration calculations, it should be easy enough for you to add additional filter lines to cover 4 day trades and greater if you desire to, though at some point the duration of a longer trade will overlap the possible beginning of a new trade and might require extreme modifications to the filter. If you know what your personal longer duration trades have been and how rare or frequent that will help you decide what lines to add.

Let me know if you have questions,
Ed S.

Fetcher[
market is NASDAQ /*apply to symlist(aclx,si,siegy,aclly)*/
chart-time is 120 days

set{var1, roc(1)}
set{var2, roc(2)}
set{var3, roc(3)}

set{below10,count(RSI(2) crossed below 10,1)}
set{100under10,count(RSI(2) crossed below 10,100)}
add column 100under10 {Times RSI(2) under 10 in last 100 days}
add column count(RSI(2) crossed below 10,120) {Times RSI(2) under 10 in last 120 days}
set{var10,days(below10 equals 1,100)}
set{abov5,count(close > ma(5) ,1)} draw below10 Legend{below10,RSI(2) < 10}
draw ma(5)
set{Tru2, days( abov5 < 1 ,5) }

/*3 sections below calculate 3 day trades P&L, 2day trades P&L, & 1 day trade P&L*/
set{Tru1, count( abov5 > 0 ,1)*count( var10 equals 3, 1) } draw tru1 Legend{tru1,Close > MA(5)} draw abov5
set{comba,count(tru2 equals 1,1)*tru1} draw comba
set{combb,comba*var3} draw combb

set{Tru3, count( abov5 > 0 ,1)*count( var10 equals 2, 1) }
set{comba1,count(tru2 equals 1,1)*tru3} draw comba1
set{combb1,comba1*var2} draw combb1

set{Tru4, count( abov5 > 0 ,1)*count( var10 equals 1, 1) }
set{comba2,count(tru2 equals 1,1)*tru4} draw comba2
set{combb2,comba2*var1} draw combb2

/*section for various column calculations*/
set{bbb,count(combb > 0 ,120)}
set{bb,count(combb < 0 ,120)}
set{bbb1,count(combb1 > 0 ,120)}
set{bb1,count(combb1 < 0 ,120)}
set{bbb2,count(combb2 > 0 ,120)}
set{bb2,count(combb2 < 0 ,120)}
set{tot, sum(combb,120) + sum(combb1,120)}
set{totalprofit, tot + sum(combb2,120)} add column totalprofit

set{tot1, bbb + bb }
set{tot2, bbb1 + bb1 }
set{tot3, bbb2 + bb2 }
set{total1, tot1 + tot2 }
set{totaltrades, total1 + tot3 } add column totaltrades

set{avgprft, totalprofit/totaltrades } add column avgprft

set{winners1, bbb1 + bbb }
set{winners2, winners1 + bbb2 }

set{Prctprofitable, winners2/totaltrades } add column Prctprofitable
]



Mactheriverrat
3,153 posts
msg #160073
Ignore Mactheriverrat
2/5/2023 4:15:30 PM

@Ed
Very interesting code!!!!

bert123
53 posts
msg #160074
Ignore bert123
2/5/2023 11:33:03 PM

Hi Ed and thank you for continuing to work on this. I do have some questions regarding the calculations that might be best expressed by providing an example from the filter.

One of the stocks produced by the filter is META which by its recent performance would not be a candidate for me yet it has a 100% profitability rating in the recent filter.

8/19 buy 167.96. 8/25 sell 168.78 - Win
9/14 buy 151.47. 9/28 141.26 - Loss *
10/7 buy 133.45. 10/17 134.04 - Win *
10/27 buy 97.94. 11/7 96.72 - Loss
* I only enter a trade on the first day of the rsi(2) cross below 10. I am not considering multiple occurrences of rsi(2) after the day of entry. For my purposes of historical analysis, I am considering the sell day as the day MA(5) is crossed. The visual layout really helps with that and I was hoping I could get to the candidates quicker by scanning the columns of the filter.

By my analysis META was only 50% profitable, showed a loss and would not be considered.

To answer your question of how long a trade is held, it is normally only a few days but can stretch
to 6 or more days if the price is only modestly fluctuating. It is open-ended.

In historical analysis, I consider a 100% profitability candidate where the close on the day of the MA(5)
cross is higher than the day of the entry which is the first day of the rsi(2) cross below. ACLX fit that bill.

I hope this helps and please let me know if you have any questions - thanks again.

nibor100
1,031 posts
msg #160075
Ignore nibor100
2/6/2023 12:49:17 PM

@bert123,

The short answer is that my filter is currently not looking for any trades longer than 3 days in duration from the first crossover below 10 of RSI(2). A longer explanation follows:

In your META example the 8/19 trade ends on the 4th day after RSI(2) crosses below 10 which is the first day the close is above the MA(5).
the 9/14 trade ends on the 10th day after RSI(2) crosses below 10 which is the first day the close is above the MA(5). (because you would have been in that trade so long you would not have taken the only trade my filter found:
which was from 9/26 to 9/28 as shown in the combb1 area on the chart display, which is the 2 day trades section

Your 10/7 and 10/27 trades are also much longer than the 3 day limit my filter currently has.

As I previously stated you can add sections to screen for longer duration trades to the filter, but I suspect anything longer than 5 days is going to create some confusion with the data interpretations.

Ed S.







bert123
53 posts
msg #160076
Ignore bert123
2/6/2023 3:08:23 PM

Thanks Ed. I appreciate your follow-up and input!

StockFetcher Forums · Filter Exchange · RSI 2 Bounce Filter<< 1 2 3 >>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.