dleather25 39 posts msg #159574 - Ignore dleather25 |
9/8/2022 10:27:51 PM
can anyone tell me why my filter keeps showing me -1 when I am trying to find when close reached a new 3 month high.
|
dleather25 39 posts msg #159575 - Ignore dleather25 |
9/8/2022 10:29:43 PM
It keeps saying -1, but if the chart time is 3 months then unless the close price does nothing but knife all the way down then it would have to have a new 3 month high.
|
xarlor 587 posts msg #159576 - Ignore xarlor |
9/9/2022 7:41:05 AM
To visualize what dleather25 is saying, notice the CMA you created is -1 for those that are not reaching a new 3-month high (line steadily goes down or stays the same).
|
dleather25 39 posts msg #159578 - Ignore dleather25 |
9/9/2022 1:34:27 PM
How do I code it where it tells me the 3 month high or 3 month low for that given chart ( 3 months) I would think since the chart-time is 3 months the line would come down to where the 3 month high is on the chart. Hopefully that makes sense. I'm trying to create a solid Rounded Top filter.
|
styliten 303 posts msg #159579 - Ignore styliten modified |
9/9/2022 3:42:56 PM
@ xarlor
Thanks for the clarification.
A dsh = -1 seems to suggest that the max value of H2 within the last 63 trading days (with today as day ?0/1) is set by a value OUTSIDE this date range.
so take KO as an example:
The April 25 peak value became max H2 and lasted all the way through August 3; the new max H2 within the last 63 days is from August 18, and it will become the max H2 all the way thru November (unless between now and November a newer max H2 comes up).
So adding "dsh > 0" seems the easiest fix :
On the other hand, adding "dsh < 0" would pick up only those stocks that had been down for quite some time. So they might be good candidates for a quick rebound in the near future (in theory at least).
|
xarlor 587 posts msg #159580 - Ignore xarlor |
9/9/2022 6:10:28 PM
How do I code it where it tells me the 3 month high or 3 month low for that given chart ( 3 months) I would think since the chart-time is 3 months the line would come down to where the 3 month high is on the chart.
I think you're confusing the PRICE 3 month high vs your CMA 3 month high. Two completely different things. The line is your CMA 3 month high, not the price. If you want to know the price 3 month high, add another line:
|
dleather25 39 posts msg #159581 - Ignore dleather25 |
9/10/2022 1:49:59 AM
first question.. Has anyone attempted to make a Rounded Top filter before? According to Bulkowski it is one of the highest return on both bull markets and bear markets.
Another question how do I post a picture in the message? That might help me explain better because sometimes I have a hard time expressing what's in my head.
I appreciate and admire everyone here's ability to code, I took python twice and failed near the end of the class, I am decent at coding but everyone else here is head and shoulders above me. I love stockfecther wish the person who owns it would try and keep improving it.
I think I have made myself more confused, here is my logic. if default settings are 3 months on the chart-time then close, price, low, high 3 month [insert one of those 4 here] would have to be somewhere in the chart that is in front of me, yet somehow the line can be above the 3 month high, or have a line that goes up etc.
What I am trying to do is use 3 months as my start and have the price/close whichever reach a high some where between 20-40 days (there are 63 days in 3 months of trading) so sometime during the middle of this 63 days it reached a high... You could adapt this logic to any time frame but right now trying to just crack the code of a rounded top.
have the close/price < 5 percent above the low of that 3 month period.
a couple other things trying to create a value say 5 percent above the 3 month low and the low between 20 and 40 days ago did not cross below that line.
set{3ml, price 3 month low * 1.05}
low < 3ml between 20 and 40 days ago
if anyone else has any ideas on how to carve out the middle then let me know. I mean I guess you could do it with the coding below.
also trying to create a custom day count to use as the day the 3 month chart's high, using that number you can create a range, dsh can be used for both. so say the high of that 3 month chart was reached 30 days ago then you could use close dsh1 days ago < 5 percent below close dsh days ago and then another one for the day after etc. /
example: ( I think there was a way to do a variable offset, it seems to be slipping my mind as it's almost 1 o clock)
set{dsh, days(price reached a price 3 month high, 63)}
set{dsh1, dsh - 1}
set{dsh2, dsh + 1}
price dsh1 days ago is less than 5 percent below dsh
price dsh2 days ago is less than 5 percent below dsh2
(you could do 5 days of this and increase the percentage difference in order to create a "rounded top" at the top)
This is somewhat what I have now
I'll try and do a better post soon, I even know this isn't the best at explaining but hoping this can spark something. Thanks again and Roll Tide!
|
xarlor 587 posts msg #159582 - Ignore xarlor |
9/10/2022 9:24:21 AM
Oh you wanted a 3-month Rounded Top filter?
*furious keyboard typing*
|
dleather25 39 posts msg #159583 - Ignore dleather25 |
9/10/2022 11:53:57 AM
That is beautiful. I added in there williams % r 2 is below -75 to find a near bottom. Rounded tops and double bottoms are the two that I am most high on. Never traded options before but if they are similar to how stocks trade then should be awesome gains
|