StockFetcher Forums · General Discussion · A very unexpected use of Donchian Center & Lower Bands<< 1 2 >>Post Follow-up
styliten
278 posts
msg #154350
Ignore styliten
modified
10/17/2020 3:36:32 AM

See for yourself.

Fetcher[dow 30

chart-time is 40 days

/* LRI(5) moving price band in red */

and draw Center Standard Error Band(5, 0.40)
and draw Center Standard Error Band(5, 0.35)
and draw Center Standard Error Band(5, 0.30)
and draw Center Standard Error Band(5, 0.25)
and draw Center Standard Error Band(5, 0.20)
and draw Center Standard Error Band(5, 0.15)


/* Moving Resistance Band in Green*/

and draw clri(Donchian Center Band(8, 0), 25) on plot price
and draw clri(Donchian Center Band(9, 0), 25) on plot price
and draw clri(Donchian Center Band(10, 0), 25) on plot price
and draw clri(Donchian Center Band(11, 0), 25) on plot price
and draw clri(Donchian Center Band(12, 0), 25) on plot price
and draw clri(Donchian Center Band(13, 0), 25) on plot price


/* Moving Bottom Band in Purple*/

and draw clri(Donchian Lower Band(3, 0), 18) on plot price
and draw clri(Donchian Lower Band(4, 0), 18) on plot price
and draw clri(Donchian Lower Band(5, 0), 18) on plot price
and draw clri(Donchian Lower Band(6, 0), 18) on plot price
]



The above pretty much has all the information one needs to make educated guesses in real time!

(PS, SF's chart legend stopped working on this one when Donchian Band is embedded within CLRI.)

Feedback is welcome, as always.

snappyfrog
653 posts
msg #154353
Ignore snappyfrog
10/17/2020 8:42:41 AM

Interesting

Cheese
1,374 posts
msg #154386
Ignore Cheese
modified
10/20/2020 12:00:17 PM

@styliten @snappyfrog @xarlor

Thanks for sharing and coding.

There seems to be some synergy after I appended your filters shown below.
One seems to complement the other quite well.
For example, around the last week of July 2020, prices together with
sty's ribbons and snappy's MACD sent out a louder message
that the bull case has weakened.

This is how I might use your filters:

UPTREND when
prices are above both of sty's ribbons
AND
snappy's Weekly_and_Daily_MACD above Weekly_MACD

DOWNTREND when
prices are below EITHER of sty's ribbons
OR
snappy's Weekly_and_Daily_MACD below Weekly_MACD

anything else means UNCLEAR, so I would WAIT FOR clearer market directions.

Thanks again.

Fetcher[
/*
https://www.stockfetcher.com/forums/General-Discussion/A-very-unexpected-use-of-Donchian-Center-Lower-Bands/154350
styliten modified 10/17/2020 3:36:32 AM
*/


SYMLIST(SPY)

/* LRI(5) moving price band in red */

and draw Center Standard Error Band(5, 0.40)
and draw Center Standard Error Band(5, 0.35)
and draw Center Standard Error Band(5, 0.30)
and draw Center Standard Error Band(5, 0.25)
and draw Center Standard Error Band(5, 0.20)
and draw Center Standard Error Band(5, 0.15)


/* Moving Resistance Band in Green*/

and draw clri(Donchian Center Band(8, 0), 25) on plot price
and draw clri(Donchian Center Band(9, 0), 25) on plot price
and draw clri(Donchian Center Band(10, 0), 25) on plot price
and draw clri(Donchian Center Band(11, 0), 25) on plot price
and draw clri(Donchian Center Band(12, 0), 25) on plot price
and draw clri(Donchian Center Band(13, 0), 25) on plot price


/* Moving Bottom Band in Purple*/

and draw clri(Donchian Lower Band(3, 0), 18) on plot price
and draw clri(Donchian Lower Band(4, 0), 18) on plot price
and draw clri(Donchian Lower Band(5, 0), 18) on plot price
and draw clri(Donchian Lower Band(6, 0), 18) on plot price


/* ********************************************************************************************** */
/* ********************************************************************************************** */

/* https://www.stockfetcher.com/forums/Filter-Exchange/Weekly-and-Daily-MACD-on-Same-Graph/154365 */
/* snappyfrog 10/19/2020 8:29:31 AM */
/*Written by Xarlor after my request for something that matched WeeklyandDailyMACD from ToS*/

symlist(spy)
set{wk1,cema(close,15)}
set{wk2,cema(close,50)}
set{Weekly_MACD,wk1 - wk2}

set{dy1,cema(close,3)}
set{dy2,cema(close,10)}
set{Daily_MACD,dy1 - dy2}

set{Weekly_and_Daily_MACD,Weekly_MACD + Daily_MACD}

draw Weekly_and_Daily_MACD
draw Weekly_MACD on plot Weekly_and_Daily_MACD
draw Weekly_and_Daily_MACD line at 0

chart-time 4 months
]



styliten
278 posts
msg #154393
Ignore styliten
modified
10/20/2020 3:59:08 PM

@ Cheese,

Here is another twist. It seems that day position indicator, when used strategically, can be that perfect intermediary/go between of a shorter and a longer linear regression intercepts.

For example:

Fetcher[dow 30

chart-time is 30 days

/* set up Day Position(0.5, 8) -- the inner core is DP(0.5, 8), in RED */

/* Plz note, when trending one way or another, these outer layers of CEMAS are PARALLEL to the red line */
/*when trend reverses/shifts, the outer layers crisscross each other, creating a more messy picture that can take some time to get used to. */

/* The outermost layer appears somewhat thicker and heavier than the ones in between, which is a very nice visual aid to have. */

set{dp81, day position(0.4920, 8)}
set{dp82, day position(0.4940, 8)}
set{dp83, day position(0.4960, 8)}
set{dp84, day position(0.4980, 8)}
set{dp85, day position(0.5000, 8)}
set{dp86, day position(0.5020, 8)}
set{dp87, day position(0.5040, 8)}
set{dp88, day position(0.5060, 8)}
set{dp89, day position(0.5080, 8)}

and draw cema(cema(cema(cema(clri(dp81, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp82, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp83, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp84, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp85, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp86, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp87, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp88, 8), 6), 6), 6), 6) on plot price
and draw cema(cema(cema(cema(clri(dp89, 8), 6), 6), 6), 6) on plot price

/* shows up on chart as green band */

and draw Center Standard Error Band(6,0.20)
and draw Center Standard Error Band(6,0.18)
and draw Center Standard Error Band(6,0.16)
and draw Center Standard Error Band(6,0.14)
and draw Center Standard Error Band(6,0.12)
and draw Center Standard Error Band(6,0.10)
and draw Center Standard Error Band(6,0.08)
and draw Center Standard Error Band(6,0.06)
and draw Center Standard Error Band(6,0.04)

/* shows up on chart as purple band */

and draw Center Standard Error Band(50,0.04)
and draw Center Standard Error Band(50,0.03)
and draw Center Standard Error Band(50,0.02)
and draw Center Standard Error Band(50,0.015)
and draw Center Standard Error Band(50,0.01)
]



The 2 Linear Regression bands are placed at the very end only because they then would not appear in the legend area, thus maximizing viewable chart area. If you bothered to rearrange and put them at the very top/beginning of the code, the viewable chart area shrinks due to legend taking up way too much space. Together, the various levels of cemas of Day Position(0.5, 8) serve as support/resistance line groups and this is highly useful when LRI(6) is far away from LRI(50) so that the white space in between are 'mapped' out with meaningful support/resistance lines in between.

Also, unlike MA(20), MA(50) or MA(200), the embedded cemas of Day Position(0.5, 8) never really diverge that much from the underlaying price. So its primary purpose is to show better or even exact timing of potential trade while it may or may not compete successfully with longer term MAs to show bigger trend.

snappyfrog
653 posts
msg #154394
Ignore snappyfrog
10/20/2020 4:05:55 PM

Wow, cheese, nice combination with the filter from styliten!

I looked at stocks over $5 with volume of 500k.

Time after time, these where sure winners. Brilliant!

xarlor
562 posts
msg #154396
Ignore xarlor
modified
10/20/2020 5:54:49 PM

Here is a visual of Cheese's observations. Definitely going to need advanced sub for this one.

Fetcher[
/*
https://www.stockfetcher.com/forums/General-Discussion/A-very-unexpected-use-of-Donchian-Center-Lower-Bands/154350
styliten modified 10/17/2020 3:36:32 AM
*/


SYMLIST(SPY)

/* LRI(5) moving price band in red */

and draw Center Standard Error Band(5, 0.40)
and draw Center Standard Error Band(5, 0.35)
and draw Center Standard Error Band(5, 0.30)
and draw Center Standard Error Band(5, 0.25)
and draw Center Standard Error Band(5, 0.20)
and draw Center Standard Error Band(5, 0.15)


/* Moving Resistance Band in Green*/

and draw clri(Donchian Center Band(8, 0), 25) on plot price
and draw clri(Donchian Center Band(9, 0), 25) on plot price
and draw clri(Donchian Center Band(10, 0), 25) on plot price
and draw clri(Donchian Center Band(11, 0), 25) on plot price
and draw clri(Donchian Center Band(12, 0), 25) on plot price
and draw clri(Donchian Center Band(13, 0), 25) on plot price


/* Moving Bottom Band in Purple*/

and draw clri(Donchian Lower Band(3, 0), 18) on plot price
and draw clri(Donchian Lower Band(4, 0), 18) on plot price
and draw clri(Donchian Lower Band(5, 0), 18) on plot price
and draw clri(Donchian Lower Band(6, 0), 18) on plot price


/* ********************************************************************************************** */
/* ********************************************************************************************** */

/* https://www.stockfetcher.com/forums/Filter-Exchange/Weekly-and-Daily-MACD-on-Same-Graph/154365 */
/* snappyfrog 10/19/2020 8:29:31 AM */
/*Written by Xarlor after my request for something that matched WeeklyandDailyMACD from ToS*/

symlist(spy)
set{wk1,cema(close,15)}
set{wk2,cema(close,50)}
set{Weekly_MACD,wk1 - wk2}

set{dy1,cema(close,3)}
set{dy2,cema(close,10)}
set{Daily_MACD,dy1 - dy2}

set{Weekly_and_Daily_MACD,Weekly_MACD + Daily_MACD}

draw Weekly_and_Daily_MACD
draw Weekly_MACD on plot Weekly_and_Daily_MACD
draw Weekly_and_Daily_MACD line at 0

chart-time 4 months


/* Cheese's Uptrend
prices are above both of sty's ribbons
AND
snappy's Weekly_and_Daily_MACD above Weekly_MACD */

set{x1,count(close > clri(Donchian Center Band(8,0),25),1)}
set{x2,count(close > clri(Donchian Center Band(9,0),25),1)}
set{x3,count(close > clri(Donchian Center Band(10,0),25),1)}
set{x4,count(close > clri(Donchian Center Band(11,0),25),1)}
set{x5,count(close > clri(Donchian Center Band(12,0),25),1)}
set{x6,count(close > clri(Donchian Center Band(13,0),25),1)}
set{x7,x1 * x2}
set{x8,x7 * x3}
set{x9,x8 * x4}
set{x10,x9 * x5}
set{x11,x10 * x6}

set{y1,count(close > clri(Donchian Lower Band(3,0),18),1)}
set{y2,count(close > clri(Donchian Lower Band(4,0),18),1)}
set{y3,count(close > clri(Donchian Lower Band(5,0),18),1)}
set{y4,count(close > clri(Donchian Lower Band(6,0),18),1)}
set{y5,y1 * y2}
set{y6,y5 * y3}
set{y7,y6 * y4}

set{z1,count(Weekly_and_Daily_MACD > Weekly_MACD,1)}

set{uptrend1,x11 * y7}
set{uptrend,uptrend1 * z1}
uptrend > -1

/* Cheese's Downtrend
prices are below EITHER of sty's ribbons
OR
snappy's Weekly_and_Daily_MACD below Weekly_MACD */

set{j1,count(close < clri(Donchian Center Band(8,0),25),1)}
set{j2,count(close < clri(Donchian Center Band(9,0),25),1)}
set{j3,count(close < clri(Donchian Center Band(10,0),25),1)}
set{j4,count(close < clri(Donchian Center Band(11,0),25),1)}
set{j5,count(close < clri(Donchian Center Band(12,0),25),1)}
set{j6,count(close < clri(Donchian Center Band(13,0),25),1)}
set{j7,j1 * j2}
set{j8,j7 * j3}
set{j9,j8 * j4}
set{j10,j9 * j5}
set{j11,j10 * j6}

set{k1,count(close < clri(Donchian Lower Band(3,0),18),1)}
set{k2,count(close < clri(Donchian Lower Band(4,0),18),1)}
set{k3,count(close < clri(Donchian Lower Band(5,0),18),1)}
set{k4,count(close < clri(Donchian Lower Band(6,0),18),1)}
set{k5,k1 * k2}
set{k6,k5 * k3}
set{k7,k6 * k4}

set{l1,count(Weekly_and_Daily_MACD < Weekly_MACD,1)}

set{downtrend1,j11 + k7}
set{downtrend,downtrend1 + l1}
downtrend > -1
]



Cheese
1,374 posts
msg #154397
Ignore Cheese
10/20/2020 7:24:17 PM

@styliten @snappyfrog @xarlor

Very kind of you. Thank you so much.

I can't help but think of a few people in the past who used the insights here for their own businesses.

The three of you should really think about getting together, or maybe even team up with some other
smart and good people like davesaint86, graftonian, and Ed S nibor100, etc and brainstom your
own startup or paid subs service.

snappyfrog
653 posts
msg #154398
Ignore snappyfrog
10/21/2020 10:48:52 AM

Awesome xarlor. I was working on this last night!

VirginTrader
73 posts
msg #154402
Ignore VirginTrader
10/21/2020 10:43:15 PM

Here's my take...

Fetcher[
sp500
set{x1, count(clri(Donchian Center Band(13,0),3) < clri(Donchian Center Band(3,0),3),1)}
set{x2, count(clri(Donchian Center Band(3,0),3) crossed above clri(Donchian Center Band(30,0),3),1)}
set{x3, x1 * x2}
x3 > 0
]



visually, looks like a good script for a quickie 5% pop...still need to figure out how to whittle it down

thanks guys!

snappyfrog
653 posts
msg #155117
Ignore snappyfrog
modified
12/27/2020 8:20:43 AM

Here is my simplified version. I took out many of the lines on the chart to make it easier to see.

Now if we can come up with a way to look at the possible angle or max separation between these two lines I think we would have a clear winner. I have posted two chart examples below to show the difference in how the slope of the lines look vs what the price did after the scan picked these.





Fetcher[
/*
https://www.stockfetcher.com/forums/General-Discussion/A-very-unexpected-use-of-Donchian-Center-Lower-Bands/154350
styliten modified 10/17/2020 3:36:32 AM
*/

/* LRI(5) moving price band in red */

/*and draw Center Standard Error Band(5, 0.40)
and draw Center Standard Error Band(5, 0.35)
and draw Center Standard Error Band(5, 0.30)
and draw Center Standard Error Band(5, 0.25)
and draw Center Standard Error Band(5, 0.20)
and draw Center Standard Error Band(5, 0.15)*/


/* Moving Resistance Band in Green*/

/*and draw clri(Donchian Center Band(8, 0), 25) on plot price
and draw clri(Donchian Center Band(9, 0), 25) on plot price
and draw clri(Donchian Center Band(10, 0), 25) on plot price*/
and draw clri(Donchian Center Band(11, 0), 25) on plot price
/*and draw clri(Donchian Center Band(12, 0), 25) on plot price
and draw clri(Donchian Center Band(13, 0), 25) on plot price*/


/* Moving Bottom Band in Purple*/

/*and draw clri(Donchian Lower Band(3, 0), 18) on plot price
and draw clri(Donchian Lower Band(4, 0), 18) on plot price*/
and draw clri(Donchian Lower Band(5, 0), 18) on plot price
/*and draw clri(Donchian Lower Band(6, 0), 18) on plot price*/


/* ********************************************************************************************** */
/* ********************************************************************************************** */

/* https://www.stockfetcher.com/forums/Filter-Exchange/Weekly-and-Daily-MACD-on-Same-Graph/154365 */
/* snappyfrog 10/19/2020 8:29:31 AM */
/*Written by Xarlor after my request for something that matched WeeklyandDailyMACD from ToS*/

set{wk1,cema(close,15)}
set{wk2,cema(close,50)}
set{Weekly_MACD,wk1 - wk2}

set{dy1,cema(close,3)}
set{dy2,cema(close,10)}
set{Daily_MACD,dy1 - dy2}

set{Weekly_and_Daily_MACD,Weekly_MACD + Daily_MACD}

draw Weekly_and_Daily_MACD
draw Weekly_MACD on plot Weekly_and_Daily_MACD
draw Weekly_and_Daily_MACD line at 0


/* Cheese's Uptrend
prices are above both of sty's ribbons
AND
snappy's Weekly_and_Daily_MACD above Weekly_MACD */

set{x11,count(close > clri(Donchian Center Band(11,0),25),1)}

set{y7,count(close > clri(Donchian Lower Band(5,0),18),1)}

set{z1,count(Weekly_and_Daily_MACD > Weekly_MACD,1)}

set{uptrend1,x11 * y7}
set{uptrend,uptrend1 * z1}
/* My test */
uptrend1 > .99
z1 > .99
and z1 1 day ago < .99

/*uptrend > .99
uptrend 1 day ago < .99*/


/* Cheese's Downtrend
prices are below EITHER of sty's ribbons
OR
snappy's Weekly_and_Daily_MACD below Weekly_MACD */

set{j11,count(close < clri(Donchian Center Band(11,0),25),1)}

set{k7,count(close < clri(Donchian Lower Band(5,0),18),1)}

set{l1,count(Weekly_and_Daily_MACD < Weekly_MACD,1)}

set{downtrend1,j11 + k7}
set{downtrend,downtrend1 + l1}
downtrend > -1

market is not otcbb
market is not etf
price > 1
optionable
average volume(30) > 10000000
]



StockFetcher Forums · General Discussion · A very unexpected use of Donchian Center & Lower Bands<< 1 2 >>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.