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
|
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
|
nibor100 1,043 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.
|