HPotter

DiNapoli Detrended Oscillator

DiNapoli Detrended Oscillator
Remove from Favorite Scripts Add to Favorite Scripts
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 02/04/2015
// DiNapoli Detrended Oscillator
////////////////////////////////////////////////////////////
study(title="DiNapoli Detrended Oscillator")
Length = input(14, minval=1)
hline(0, color=gray, linestyle=line)
xSMA = sma(close, Length)
nRes = close - xSMA
plot(nRes, color=blue, title="DiNapoli")
elp
2 years ago
You're back! If possible, could you please code an indicator that would show the % difference between price and a moving average?
Reply
HPotter PRO elp
2 years ago
Just range between last and MA in the %?
+1 Reply
elp HPotter
2 years ago
Yes, on the close of the candle of the time period one is looking at.
Reply
elp HPotter
2 years ago
Would use it to help identify extemed moves when price is trading away for a mva at extremes in %.
Reply
HPotter PRO elp
2 years ago
I tried make it
Percent difference between price and MA
+1 Reply
elp HPotter
2 years ago
Looks great! I use the 20 period MA,, when price is tradind away from it at an extreme, look for a pullback or a rally. If the % is small, I am looking for a volatile move away from it. Currently the % is tight, and would expect a volatile move away from te 20 ma. TY HPotter!
snapshot
Reply
Dare2 PRO
2 years ago
Looks good HP. Thank you very much, I appreciate you and your help. When you said you've made the first version, does than imply there will be a second?
+1 Reply
HPotter PRO Dare2
2 years ago
You are welcome.
+1 Reply
HPotter PRO Dare2
2 years ago
May be I will make Preferred Stochastic and etc.
+2 Reply
Dare2 PRO HPotter
2 years ago
That would be very helpful. Also I have been trying as best as I can to code a MACD (or DEMA as DiNapoli calls it) but have been unsuccessful in using the decimal (float) values that he uses.
+1 Reply
HPotter PRO Dare2
2 years ago
In the parameter? Try set it as constants in the code. Just use number.
+1 Reply
Dare2 PRO HPotter
2 years ago
Yes in the parameters. I will give your suggestion a try.
+1 Reply
HPotter PRO Dare2
2 years ago
In the parameter I also get a problem (((
+1 Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out