StockFetcher Forums · View by Author: (1,374 messages)  [ Display By: Date / Subject ]<< 1 ... 3 4 5 6 7 ... 138 >> 
General Discussion · Normalized MACD
msg #158685
2/26/2022 5:29:11 PM


Please note that the above picture may expire in 30 days.


Below is the best pine script for Normalized Smoothed MACD that I could find.
It was written by Dreadblitz

Unfortunately, I don't know enough about pine script to convert to sF.
Perhaps, someone experienced in pine script coding might want to give it a try.


// © Dreadblitz
study(title="Normalized smoothed MACD", shorttitle = "NSM", overlay=false)
inpFastPeriod = input(defval=12, title="MACD fast period", minval=1, type=input.integer)
inpSlowPeriod = input(defval=26, title="MACD slow period", minval=1, type=input.integer)
inpMacdSignal = input(defval=9, title="Signal period", minval=1, type=input.integer)
inpSmoothPeriod = input(defval=5, title="Smoothing period", minval=1, type=input.integer)
inpNormPeriod = input(defval=20, title="Normalization period", minval=1, type=input.integer)
price = input(close, title="Price Source",type=input.source)
emaf = 0.0
emas = 0.0
val = 0.0
nval = 0.0
sig = 0.0
red, 0), 0), 0)

if bar_index > inpSlowPeriod
alphaf = 2.0/(1.0+max(inpFastPeriod,1))
alphas = 2.0/(1.0+max(inpSlowPeriod,1))
alphasig = 2.0/(1.0+max(inpMacdSignal,1))
alphasm = 2.0/(1.0+max(inpSmoothPeriod,1))

emaf := emaf[1]+alphaf*(price-emaf[1])
emas := emas[1]+alphas*(price-emas[1])
imacd = emaf-emas

mmax = highest(imacd,inpNormPeriod)
mmin = lowest(imacd,inpNormPeriod)
if mmin != mmax
nval := 2.0*(imacd-mmin)/(mmax-mmin)-1.0
nval := 0

val := val[1] + alphasm*(nval-val[1])
sig := sig[1] + alphasig*(val-sig[1])

plot(val, color=val>val[1]?green:red, style=plot.style_line, linewidth=2, title="Reg smooth MACD")
plot(sig, color=black, style=plot.style_cross, linewidth=1, title="Signal line")
hline(0, title='0', color=color.gray, linestyle=hline.style_dotted, linewidth=1)
alertcondition(crossunder(val,sig) or crossover(val,sig) ,title="Sell/Buy",message="Sell/Buy")

General Discussion · Cheese, where are you?
msg #158683
2/26/2022 10:27:39 AM

Thanks, snappy. I was kidding, too.
The more I learn, the more ignorant I feel.
There are so many good ideas here, and in other websites.

Filter Exchange · Correction/Bear market
msg #158678
2/25/2022 4:19:37 PM

might be very early double bottom forming for IWM ?

General Discussion · Cheese, where are you?
msg #158677
2/25/2022 4:12:56 PM

very funny, snappy

General Discussion · Cheese, where are you?
msg #158672
2/25/2022 1:23:41 PM

Thank you, dave.

General Discussion · Cheese, where are you?
msg #158670
2/25/2022 11:43:44 AM

I am honored. Thank you, Xarlor.
Taking a break from posting and just reading the forum posts is actually good for me.

Filter Exchange · TRO'S CROCK POT 2.0
msg #158398
1/14/2022 8:59:46 PM
redversa721 1/14/2022 8:07:38 PM

Thanks, redversa721

It looks like you are both lucky and smart.
Best wishes with developing your bot.

Filter Exchange · TRO'S CROCK POT 2.0
msg #158370
1/7/2022 11:23:38 PM
redversa721 1/7/2022 11:00:28 PM

Thank you, redversa721. It seems like you did well by locking up your gains.

Filter Exchange · All Purpose Global Filter - Stocks, Bonds, ETFs, Crypto
msg #158358
1/7/2022 12:10:21 AM


$VXV is the Volatility Index - CBOE 3-Month.

At the time of writing, it is still used in other platforms or forums, often in tandem with $VIX.
$VIX, $VXV and other volatility symbols seem to be useful by some market watchers
and chart authors.

In the past, ^VXV was available at Stockfetcher and used by some well known members
in many filters over the years.

It's really too bad that Stockfetcher no longer sees the value of ^VIX and ^VXV
when there are good filters already written.

Not only for the ^VXV filter above, but some ^VIX filters in sF are also crippled by the lack of ^VIX.

As a workaround for my own use, I substitute ^VIX and ^VXV with other volatility symbols
that are still available, e,g, UVXY, VIXM, VIXY, VXZ, (and VXX already used in filter above)
to get the ideas. I then go to other platforms or forums and look for similar ideas or ratios.

Bill Luby explained the importance of ^VIX and ^VXV this way:

Yes, it is time for me to trumpet the importance of VXV once again. For those who may have forgotten, VXV’s formal name is the CBOE S&P 500 3-Month Volatility Index.
The key takeaway is that VXV is essentially a 93-day version of the 30-day VIX. In other words, whereas VIX looks out at just one month of potential volatility and disruptions to the financial markets, VXV has a time horizon of one quarter. This means, among other things, that while both capture the essence of the Q1 earnings reporting season, VXV includes three FOMC meetings and three nonfarm payroll reports, among other things.

If I use dave's filter above AS IS, then my interpretation is that the filter signals essentially only use VXX,
and the short-term view for SPY may be down.

If I substitute VIXM for VXV (now non-existent in sF), then my interpretation is that the mid-term view
for SPY may not be down just yet.

But that's just my interpretation. I have no expertise in volatility instruments or anything else for that
matter :^)


Filter Exchange · All Purpose Global Filter - Stocks, Bonds, ETFs, Crypto
msg #158354
1/6/2022 4:26:00 PM
All Purpose Global Filter - Stocks, Bonds, ETFs, Crypto

davesaint86 1/6/2022 2:25:27 PM

Finally got around to cleaning up the risk-on/off piece of the code. Not perfect. There is an indicator in TradingView called the Vix Indicator, which is similar.


This is really good especially now that sF no longer has ^VIX
Your new signals for equities are also more timely than some of your already excellent past creations.

StockFetcher Forums ·  · << 1 ... 3 4 5 6 7 ... 138 >>

*** 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 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.