HPotter

DiNapoli Detrended Oscillator Strategy

DiNapoli Detrended Oscillator Strategy
Remove from Favorite Scripts Add to Favorite Scripts
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 02/04/2015
// DiNapoli Detrended Oscillator Strategy
////////////////////////////////////////////////////////////
study(title="DiNapoli Detrended Oscillator Strategy")
Length = input(14, minval=1)
Trigger = input(0)
hline(Trigger, color=gray, linestyle=line)
xSMA = sma(close, Length)
nRes = close - xSMA
pos =	iff(nRes > Trigger, 1,
	    iff(nRes <= Trigger, -1, nz(pos[1], 0))) 
plot(nRes, color=blue, title="DiNapoli")
barcolor(pos == -1 ? red: pos == 1 ? green : blue )
jackvmk
2 years ago
welcome back!
Reply
HPotter PRO jackvmk
2 years ago
Thank you )
+1 Reply
jackvmk HPotter
2 years ago
your welcome )
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
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 Billing Sign Out