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,044 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.
|
Mactheriverrat 3,157 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,044 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!
|