StockFetcher Forums · Filter Exchange · Pretty simple and straight forward Long Term Filter.<< >>Post Follow-up
SAFeTRADE
644 posts
msg #161297
Ignore SAFeTRADE
8/11/2024 10:31:56 AM

Pretty simple and straight forward Long Term Filter.
Comments welcome

Fetcher[
set{perfA,close / close 13 weeks ago}
SET{PERF,PERFA - 1}

/* enter your Lower Limit criteria */
set{upperLim, high 52 week high}
set{LowerLim, Low 52 week Low}
set{abvma20,count(close above ma(20),1)}

set{LimDiff, UpperLim minus LowerLim}
set{PPDiff, CLOSE minus LowerLim}
set{PPDiv, PPDiff / LimDiff}
set{BallOn, PPDiv * 100}




SET{SELLLRI20,COUNT(CLOSE CROSSED BELOW LRI(20),1) * COUNT(CLOSE BELOW LRI(150),1)}
SET{SELLLRI120,COUNT(CLOSE BELOW LRI(20),1) * COUNT(CLOSE BELOW LRI(150),1)}
SET{BUYLRI20,COUNT(CLOSE CROSSED ABOVE LRI(20),1)}
SET{BUYLRI120,COUNT(CLOSE CROSSED ABOVE LRI(120),1)}
SET{PSAR,Parabolic SAR(0.02,0.2)}
SET{CLS,CLOSE}
SET{BUYPSAR,CLOSE CROSSED ABOVE Parabolic SAR(0.02,0.2),1)}
SET{SELLPSAR,CLOSE CROSSED BELOW Parabolic SAR(0.02,0.2),1)}/*SLOW TO SIGNAL SELL*/
SYMLIST(SPY,NVDA,MSFT,CMG,META,AAPL)
DRAW BUYLRI20
DRAW BUYLRI120
DRAW SELLLRI20
DRAW SELLLRI120
DRAW LRI(20)
DRAW LRI(150)
DRAW PSAR ON PLOT CLS
DRAW BUYPSAR
DRAW SELLPSAR
ADD COLUMN SEPARATOR
ADD COLUMN BUYLRI20
ADD COLUMN BUYLRI120
ADD COLUMN SELLLRI20
ADD COLUMN SELLLRI120
ADD COLUMN SEPARATOR
ADD COLUMN BUYPSAR
ADD COLUMN SELLPSAR
ADD COLUMN SEPARATOR
ADD COLUMN BALLON{52WK-RS}
ADD COLUMN PERF{13WK-PERF}
CHART-LENGTH 1 YEAR
]



lorypanna
19 posts
msg #161390
Ignore lorypanna
10/6/2024 11:07:42 AM

Very interesting, thanks for sharing SAFeTRADE.

I added for my testing the LRI(120) to the chart and MYLRIBUY indicator (close above all LRIs and all LRIs rising) + MYLRISELL indicator (close below all LRIs and all LRIs declining).

A question: why you use both the LRI(120) and LRI(150) in the filter but only show the LRI(150) on the chart?

Thanks. Have a nice day. Cheers from Italy. LP

Fetcher[
set{perfA,close / close 13 weeks ago}
SET{PERF,PERFA - 1}

/* enter your Lower Limit criteria */
set{upperLim, high 52 week high}
set{LowerLim, Low 52 week Low}
set{abvma20,count(close above ma(20),1)}

set{LimDiff, UpperLim minus LowerLim}
set{PPDiff, CLOSE minus LowerLim}
set{PPDiv, PPDiff / LimDiff}
set{BallOn, PPDiv * 100}

SET{SELLLRI20,COUNT(CLOSE CROSSED BELOW LRI(20),1) * COUNT(CLOSE BELOW LRI(150),1)}
SET{SELLLRI120,COUNT(CLOSE BELOW LRI(20),1) * COUNT(CLOSE BELOW LRI(150),1)}
SET{BUYLRI20,COUNT(CLOSE CROSSED ABOVE LRI(20),1)}
SET{BUYLRI120,COUNT(CLOSE CROSSED ABOVE LRI(120),1)}
SET{PSAR,Parabolic SAR(0.02,0.2)}
SET{CLS,CLOSE}
SET{BUYPSAR,CLOSE CROSSED ABOVE Parabolic SAR(0.02,0.2),1)}
SET{SELLPSAR,CLOSE CROSSED BELOW Parabolic SAR(0.02,0.2),1)} /*SLOW TO SIGNAL SELL*/

SET{CLSABVTMP1,COUNT(CLOSE IS ABOVE LRI(20),1) + COUNT(CLOSE IS ABOVE LRI(120),1)}
SET{CLSABVTMP2,CLSABVTMP1 + COUNT(CLOSE IS ABOVE LRI(150),1)}
SET{CLSABVALL,COUNT(CLSABVTMP2 IS EQUAL 3,1)}

SET{RSNGLRITMP1,COUNT(LRI(20) IS ABOVE LRI(20) 1 DAY AGO,1) + COUNT(LRI(120) IS ABOVE LRI(120) 1 DAY AGO,1)}
SET{RSNGLRITMP2,RSNGLRITMP1 + COUNT(LRI(150) IS ABOVE LRI(150) 1 DAY AGO,1)}
SET{RSNGLRIALL,COUNT(RSNGLRITMP2 IS EQUAL 3,1)}

SET{MYLRIBUYTMP,CLSABVALL + RSNGLRIALL}
/* MYLRIBUY = All LRIs rising and CLOSE above all LRIs */
SET{MYLRIBUY,COUNT(MYLRIBUYTMP IS EQUAL 2,1)}

SET{CLSBLWTMP1,COUNT(CLOSE IS BELOW LRI(20),1) + COUNT(CLOSE IS BELOW LRI(120),1)}
SET{CLSBLWTMP2,CLSBLWTMP1 + COUNT(CLOSE IS BELOW LRI(150),1)}
SET{CLSBLWALL,COUNT(CLSBLWTMP2 IS EQUAL 3,1)}

SET{FLLNGLRITMP1,COUNT(LRI(20) IS BELOW LRI(20) 1 DAY AGO,1) + COUNT(LRI(120) IS BELOW LRI(120) 1 DAY AGO,1)}
SET{FLLNGLRITMP2,FLLNGLRITMP1 + COUNT(LRI(150) IS BELOW LRI(150) 1 DAY AGO,1)}
SET{FLLNGLRIALL,COUNT(FLLNGLRITMP2 IS EQUAL 3,1)}

SET{MYLRISELLTMP,CLSBLWALL + FLLNGLRIALL}
/* MYLRISELL = All LRIs declining and CLOSE below all LRIs */
SET{MYLRISELL,COUNT(MYLRISELLTMP IS EQUAL 2,1)}

SYMLIST(SPY,NVDA,MSFT,CMG,META,AAPL)

DRAW BUYLRI20
DRAW BUYLRI120
DRAW SELLLRI20
DRAW SELLLRI120
DRAW LRI(20)
DRAW LRI(120)
DRAW LRI(150)
DRAW PSAR ON PLOT CLS
DRAW BUYPSAR
DRAW SELLPSAR

DRAW MYLRIBUY
DRAW MYLRISELL

ADD COLUMN SEPARATOR
ADD COLUMN BUYLRI20
ADD COLUMN BUYLRI120
ADD COLUMN SELLLRI20
ADD COLUMN SELLLRI120
ADD COLUMN SEPARATOR
ADD COLUMN BUYPSAR
ADD COLUMN SELLPSAR
ADD COLUMN SEPARATOR
ADD COLUMN BALLON{52WK-RS}
ADD COLUMN PERF{13WK-PERF}
CHART-LENGTH 1 YEAR
]



SAFeTRADE
644 posts
msg #161391
Ignore SAFeTRADE
10/7/2024 9:36:29 AM

probably an oversight on my part is my best guess.

StockFetcher Forums · Filter Exchange · Pretty simple and straight forward Long Term Filter.<< >>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.