StockFetcher Forums · General Discussion · Need help Coding this ..<< >>Post Follow-up
dashover
221 posts
msg #159523
Ignore dashover
8/31/2022 6:30:26 PM

Greater than last month's high in the last 7 days and currently at or below the midpoint of last month's range...

Much Apprec.


styliten
228 posts
msg #159524
Ignore styliten
8/31/2022 9:19:10 PM

@ dashover

See an example using Dow 30:

Fetcher[
dow 30

set{pmHigh, DATE(MONTHEND, high 1 month high)}
set{pmLow, DATE(MONTHEND, low 1 month low)}
set{pmRng, DATE(MONTHEND, high 1 month high) + DATE(MONTHSTART, low 1 month low)}
set{pmMid, pmRng / 2 }

draw price line at pmHigh
draw price line at pmLow
draw price line at pmMid
]



xarlor
499 posts
msg #159527
Ignore xarlor
9/1/2022 9:06:19 AM

Adding the other piece of the puzzle to styliten's elegant filter, here is the final result applied to the S&P 500:

Fetcher[
sp500
set{pmHigh, DATE(MONTHEND, high 1 month high)}
set{pmLow, DATE(MONTHEND, low 1 month low)}
set{pmRng, DATE(MONTHEND, high 1 month high) + DATE(MONTHSTART, low 1 month low)}
set{pmMid, pmRng / 2 }

set{trigger1,count(close > pmhigh,7)}
set{trigger2,count(close <= pmmid,1)}
set{trigger,trigger1 * trigger2}
trigger > 0

draw price line at pmHigh
draw price line at pmLow
draw price line at pmMid
]



dashover
221 posts
msg #159537
Ignore dashover
modified
9/1/2022 2:21:24 PM

.

StockFetcher Forums · General Discussion · Need help Coding this ..<< >>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.