StockFetcher Forums · General Discussion · TTM Count<< >>Post Follow-up
207 posts
msg #155632
Ignore dashover
2/8/2021 12:07:37 PM

Could someone create a sortable column to count how many days the Bollinger bands have been "inside"
the Keltners...



1,082 posts
msg #155635
Ignore Cheese
2/8/2021 1:00:55 PM


Something to get you started until better coding comes along
I have a basic sub, so this is about as far as I could go

xarlor 6/8/2020 10:03:10 PM

market is not OTCBB

close is > 1
AVERAGE VOLUME(30) < 1000000


draw momo

draw Bollinger Band(20,2)
draw Keltner Band(20,2)

set{sqz1,count(momo > .01,1)}
set{sqz2,count(momo < 0,1)}
set{sqz3,count(Upper Bollinger Band(20,2) < Upper Keltner Band(20,2),1)}
set{sqz4,count(Lower Bollinger Band(20,2) > Lower Keltner Band(20,2),1)}
set{sqz5,sqz3 * sqz4}
set{sqz6,sqz1 + sqz2}
set{TTM_Squeeze,sqz5 * sqz6}

draw TTM_Squeeze

I added this

set{TTM_howmany_past5days,count( TTM_Squeeze > 0,5)}
add column TTM_howmany_past5days

sort column 5 descending


1,079 posts
msg #155644
Ignore graftonian
2/8/2021 6:41:09 PM

set{daysback, days(Upper Bollinger Band(20,2) < Upper Keltner Band(10,1.0), 21)}
add column daysback
draw Upper Bollinger Band(20,2) draw Upper Keltner Band(10,1.0)

and the same for lower band, pick the MIN() and viola'

StockFetcher Forums · General Discussion · TTM Count<< >>Post Follow-up

*** Disclaimer *** 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. does not recommend particular securities., 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 2018 - 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.