StockFetcher Forums · Filter Exchange · Script to Filter<< >>Post Follow-up
dalwihm
1 posts
msg #151872
Ignore dalwihm
4/19/2020 9:24:51 PM

Hi all,

So I found this script online and thought of converting it to a filter here but couldn't.

length = input(10, minval=1, title="BB Periods")
dev = input(1, minval=0.0001, title="Deviations")

//MACD
fastLength = input(12, minval=1)
slowLength=input(26,minval=1)
signalLength=input(9,minval=1)
fastMA = ema (close, fastLength)
slowMA = ema (close, slowLength)
macd = fastMA - slowMA

//BollingerBands

Std = stdev( macd , length)
Upper = (Std * dev + ( sma ( macd , length)))
Lower = (( sma ( macd , length)) - (Std * dev))


Band1 = plot(Upper, color=gray, style=line, linewidth=2,title="Upper Band")
Band2 = plot(Lower, color=gray, style=line, linewidth=2,title="lower Band")
fill(Band1, Band2, color=blue, transp=75,title="Fill")

mc = macd >= Upper ? lime:red

// Indicator

plot( macd , color=mc, style =circles,linewidth = 3)
zeroline = 0
plot(zeroline,color= orange,linewidth= 2,title="Zeroline")



The filter should work when the plot crosses above Band2. Any suggestion/help?

StockFetcher Forums · Filter Exchange · Script to 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.