StockFetcher Forums · Filter Exchange · Help with filter<< >>Post Follow-up
ron22
255 posts
msg #154693
Ignore ron22
11/20/2020 11:29:59 AM

[apply to symlist(gush,)

set{E3, ema(8) - ma(10)}
set{LongpositionKISS, count(E3 > 0,1)}
set{ShortpositionKISS, count(E3 < 0,1)}
set{SL, 2 day slope of ema(8)}
set {LongSlopeEMA8, count(SL > 0.7,1) }
set {ShortSlopeEMA8, count(SL < 0.7,1) }
draw LongSlopeEMA8 on plot
draw ShortSlopeEMA8 on plot
add column seperator
add column LongSlopeEMA8 {BuySlopeEMA8}
add column ShortSlopeEMA8 {SellSlopeEMA8}
draw LongpositionKISS on plot
draw ShortpositionKISS on plot

add column separator
add column E3 {Delta}
add column separator
add column LongpositionKISS {Buy}
add column separator
add column ShortpositionKISS {Sell}
add column separator
add column atr(21) {Atr}
add column separator
add column average day range (21){ADR%}
add column separator

draw ema(8)
draw ma(10)

SORT COLUMN 9 deSCENDING
chart-time is 60 day

set{SLb, 2 day slope of ma(10)}
set {LongSlopema10, count(SLb > 0.4,1) }
set {ShortSlopema10, count(SLb < 0.4,1) }
draw LongSlopema10 on plot
draw ShortSlopema10 on plot
add column seperator
add column LongSlopema10 {BuySlopema10}
add column ShortSlopema10 {SellSlopema10} ]
----------------------------------------------------------------------------
I used davesaint86 code for part of this filter. Above filter works correctly except for counting longslopeema8,shortslopeema8, as well as longslopema10 and shortslopema10. It incorrectly counts "longslopeema8" from 8/2/20 to 10/2/20 when the 2 day slope of gush was clearly in a down slope condition. It incorrectly counts "shortslopema10 from 11/9/20 to 11/20/20 when gush was in an up slope trend. The buyslopeema8 and sellslopeema8 columns as well as buy & sell ma10 columns seem to be working properly.
I would greatly appreciate it if someone could fix the code so that the slope counting features work properly. Thank you. Ron

Cheese
1,374 posts
msg #154694
Ignore Cheese
modified
11/20/2020 11:50:52 AM

Ron,

There's nothing wrong with dave's filter.

When you said "2-day slope is down", it means you want 2-day slope below ZERO
and "2-day slope is up" means 2-day slope above ZERO

dave counts use a threshold of 0.7 for ema(8)
and a threshold of 0.4 for ma(10)

Here is a filter with your counts and dave's counts

Fetcher[

apply to symlist(gush)
chart-time 6 months

set{E3, ema(8) - ma(10)}
set{LongpositionKISS, count(E3 > 0,1)}
set{ShortpositionKISS, count(E3 < 0,1)}

/* ************************************************************** dave counts 2-day slope of ema(8) */

set{SL, 2 day slope of ema(8)}
set {LongSlopeEMA8, count(SL > 0.7,1) }
set {ShortSlopeEMA8, count(SL < 0.7,1) }
draw LongSlopeEMA8
draw ShortSlopeEMA8 on plot LongSlopeEMA8
add column seperator
add column LongSlopeEMA8 {BuySlopeEMA8}
add column ShortSlopeEMA8 {SellSlopeEMA8}



/* ************************************************************** RON counts 2-day slope of ema(8) */

set{RON8, 2 day slope of ema(8)}
set {LongSlopeRON8, count(RON8 > 0 ,1) }
set {ShortSlopeRON8, count(RON8 < 0 ,1) }
draw LongSlopeRON8
draw ShortSlopeRON8 on plot LongSlopeRON8
add column seperator
add column LongSlopeRON8 {BuySlopeRON8}
add column ShortSlopeRON8 {SellSlopeRON8}



draw LongpositionKISS on plot
draw ShortpositionKISS on plot

add column separator
add column E3 {Delta}
add column separator
add column LongpositionKISS {Buy}
add column separator
add column ShortpositionKISS {Sell}
add column separator
add column atr(21) {Atr}
add column separator
add column average day range (21){ADR%}
add column separator

draw ema(8)
draw ma(10)

SORT COLUMN 9 deSCENDING
chart-time is 90 day

/* ************************************************************** dave counts 2-day slope of ma(10) */

set{SLb, 2 day slope of ma(10)}
set {LongSlopema10, count(SLb > 0.4,1) }
set {ShortSlopema10, count(SLb < 0.4,1) }
draw LongSlopema10
draw ShortSlopema10 on plot LongSlopema10
add column seperator
add column LongSlopema10 {BuySlopema10}
add column ShortSlopema10 {SellSlopema10}



/* ************************************************************** RON counts 2-day slope of ma(10) */

set{RON10, 2 day slope of ma(10)}
set {LongSlopeRON10, count(RON10 > 0,1) }
set {ShortSlopeRON10, count(RON10 < 0,1) }
draw LongSlopeRON10
draw ShortSlopeRON10 on plot LongSlopeRON10
add column seperator
add column LongSlopeRON10 {BuySlopeRON10}
add column ShortSlopeRON10 {SellSlopeRON10}

]






Cheese
1,374 posts
msg #154695
Ignore Cheese
modified
11/20/2020 12:02:13 PM

I don't know why the chart for GUSH may not show very well some of the time
Here is a chart for MRNA

Trade well.
Best

Fetcher[


apply to symlist(MRNA)
chart-time 6 months

set{E3, ema(8) - ma(10)}
set{LongpositionKISS, count(E3 > 0,1)}
set{ShortpositionKISS, count(E3 < 0,1)}

/* ************************************************************** dave counts 2-day slope of ema(8) */

set{SL, 2 day slope of ema(8)}
set {LongSlopeEMA8, count(SL > 0.7,1) }
set {ShortSlopeEMA8, count(SL < 0.7,1) }
draw LongSlopeEMA8
draw ShortSlopeEMA8 on plot LongSlopeEMA8
add column seperator
add column LongSlopeEMA8 {BuySlopeEMA8}
add column ShortSlopeEMA8 {SellSlopeEMA8}



/* ************************************************************** RON counts 2-day slope of ema(8) */

set{RON8, 2 day slope of ema(8)}
set {LongSlopeRON8, count(RON8 > 0 ,1) }
set {ShortSlopeRON8, count(RON8 < 0 ,1) }
draw LongSlopeRON8
draw ShortSlopeRON8 on plot LongSlopeRON8
add column seperator
add column LongSlopeRON8 {BuySlopeRON8}
add column ShortSlopeRON8 {SellSlopeRON8}



draw LongpositionKISS on plot
draw ShortpositionKISS on plot

add column separator
add column E3 {Delta}
add column separator
add column LongpositionKISS {Buy}
add column separator
add column ShortpositionKISS {Sell}
add column separator
add column atr(21) {Atr}
add column separator
add column average day range (21){ADR%}
add column separator

draw ema(8)
draw ma(10)

SORT COLUMN 9 deSCENDING
chart-time is 90 day

/* ************************************************************** dave counts 2-day slope of ma(10) */

set{SLb, 2 day slope of ma(10)}
set {LongSlopema10, count(SLb > 0.4,1) }
set {ShortSlopema10, count(SLb < 0.4,1) }
draw LongSlopema10
draw ShortSlopema10 on plot LongSlopema10
add column seperator
add column LongSlopema10 {BuySlopema10}
add column ShortSlopema10 {SellSlopema10}



/* ************************************************************** RON counts 2-day slope of ma(10) */

set{RON10, 2 day slope of ma(10)}
set {LongSlopeRON10, count(RON10 > 0,1) }
set {ShortSlopeRON10, count(RON10 < 0,1) }
draw LongSlopeRON10
draw ShortSlopeRON10 on plot LongSlopeRON10
add column seperator
add column LongSlopeRON10 {BuySlopeRON10}
add column ShortSlopeRON10 {SellSlopeRON10}

]



nibor100
1,010 posts
msg #154699
Ignore nibor100
11/20/2020 1:33:37 PM

I suspect that SF data vendor has some anomalous historical data that is affecting the charts in some weird fashion as there was a large reverse stock split for Gush in Mar 2020 and the data starts getting strange around Mar 20th for Gush. If you add column for the variable slb and also draw slb you'll notice the column values starts diverging from the slb drawn values after mar 20th.

That's my guess...
Ed S.

Cheese
1,374 posts
msg #154701
Ignore Cheese
11/20/2020 2:21:24 PM

Thank you, Ed.

Cheese
1,374 posts
msg #154705
Ignore Cheese
11/20/2020 3:57:55 PM

Ron,
Do you have the link to dave's filter above?
I could not find it in sF.
Thanks.

ron22
255 posts
msg #154711
Ignore ron22
11/20/2020 10:56:00 PM

Cheese, Thank you for your work on the filter and for your input. I was a little confused . Things are much clearer now.

Sorry, I do not have the link to Dave's filter. I only had the longpositionkiss part of the code written down and I did a poor job of trying to remember the slope part. Thanks a lot for your help.

ron22
255 posts
msg #154712
Ignore ron22
11/20/2020 10:58:35 PM

Ed, You are probably right about the Gush stock split affecting SF's historical data. Thank you.

StockFetcher Forums · Filter Exchange · Help with 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.