NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript File Sharing > NinjaScript File Sharing Discussion

NinjaScript File Sharing Discussion Discussion for shared NinjaScript files.

Reply
 
Thread Tools Display Modes
Old 12-17-2008, 08:01 PM   #1
boseman
Junior Member
 
Join Date: Dec 2008
Posts: 11
Thanks: 0
Thanked 0 times in 0 posts
Default Detrend Oscillator

Does Ninjatrader offer a Detrend Oscillator? The formula is:

Detrend Oscillator = Close(today) minus simple period moving average
boseman is offline  
Reply With Quote
Old 12-18-2008, 06:10 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Hi boseman,
Have you tried using the PriceOscillator with the settings 1, Close, 10, 1? This uses an EMA to detrend then ... Please see also this link here - http://www.ninjatrader-support.com/H...scillator.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 12-18-2008, 06:26 AM   #3
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by boseman View Post
Does Ninjatrader offer a Detrend Oscillator? The formula is:

Detrend Oscillator = Close(today) minus simple period moving average
I'm not sure so I made one.

Instead of just SMA, you can choose from 11 different moving average types.
Attached Images
File Type: jpg detrend.jpg (59.0 KB, 473 views)
Attached Files
File Type: zip DetrendOscillator.zip (24.1 KB, 296 views)
Elliott Wave is offline  
Reply With Quote
Old 12-18-2008, 06:33 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Thanks for creating and posting this, good job!
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 12-18-2008, 07:06 AM   #5
boseman
Junior Member
 
Join Date: Dec 2008
Posts: 11
Thanks: 0
Thanked 0 times in 0 posts
Default

Elliot Wave, thanks for the help on this one. I'll try it out.
boseman is offline  
Reply With Quote
Old 12-18-2008, 07:17 AM   #6
T2020
Senior Member
 
Join Date: Jun 2008
Posts: 644
Thanks: 0
Thanked 0 times in 0 posts
Default

Dido , very nice . On a different software I created a 4 plot moving average
indicator . Each individual MA could be set to a different type and period and
once setup the way you like could be set to default to that each time you added it to a chart . I miss it . It makes a certain bit of sense to include more
than 1 option in a indicator as I think it would save on cpu usage .
T2020 is offline  
Reply With Quote
Old 12-18-2008, 07:27 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Hi T2020, you do this in NinjaTrader by setting it up and using a chart template then...less work to set it up then on your next chart.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 12-18-2008, 08:24 AM   #8
T2020
Senior Member
 
Join Date: Jun 2008
Posts: 644
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
Hi T2020, you do this in NinjaTrader by setting it up and using a chart template then...less work to set it up then on your next chart.
Yes , actually one of the very 1st things I learned initially in demoing NT . Still
I think it would save cpu and easier to change an existing MA from 1 type to
another . Who knows maybe V 7 will hold some surprises in this regard .
T2020 is offline  
Reply With Quote
Old 05-14-2009, 09:41 PM   #9
Ricardo Salas
Junior Member
 
Join Date: Feb 2008
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Elliott Wave for this Indicator which is nice to see the divergence between Prices and SMA (or whatever MA you chose).

However in order to see better theses divergences and to see better the spikes of the Prices, it would be nice if you could implement this option:

when Price> SMA (or whatever you chose)
Detrend Oscillator = High(0) minus simple period moving average

and when Price< SMA
Detrend Oscillator = Low(0) minus simple period moving average.

Addtionally, for those who use SMA envelopes or EMA envelopes, besides de "0" line in the oscillator that you have implemented, please consider to add:

Parallel lines to the "0" line above and below according to a "displace1" , "displace2", etc variables chosen by the user (the same that one normally uses for the Envelopes) according to the formula:

upper line+1 above "0" : SMA*( +Displace1/100)
lower line-1 below "0" : SMA*( -Displace1/100)

upper line+2 above "0" : SMA*( +Displace2/100)
lower line-2 below "0" : SMA*( -Displace2/100)

at least 3 lines above and 3 lines below "0".

Thanks in advance

Ricardo
Ricardo Salas is offline  
Reply With Quote
Old 03-16-2012, 08:59 AM   #10
MotownCat
Junior Member
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Detrend for Ninjatrader 7

Do you have an updated Detrend Oscillator for Ninjatrader 7? Thanks in advance!
MotownCat is offline  
Reply With Quote
Old 03-16-2012, 09:59 AM   #11
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Quote:
Originally Posted by MotownCat View Post
Do you have an updated Detrend Oscillator for Ninjatrader 7? Thanks in advance!
Welcome to our forums - the attached works well for me on latest NT7R9.
Attached Files
File Type: zip DetrendOscNT7.zip (25.6 KB, 102 views)
NinjaTrader_Bertrand is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Bertrand for this post:
Old 03-16-2012, 07:43 PM   #12
MAGICK
Junior Member
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default

Works fine for me 2.
MAGICK is offline  
Reply With Quote
Old 03-18-2012, 02:27 PM   #13
MotownCat
Junior Member
 
Join Date: Mar 2012
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks so much!! It works for me very well.
MotownCat is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tom's Oscillator T9999 Indicator Development 3 10-02-2012 01:59 PM
Elliptic Oscillator. Drakmyre Indicator Development 12 01-06-2009 10:21 AM
Request: Bill Williams Awesome Oscillator & Accelerator Oscillator jeremymgp Indicator Development 26 11-04-2008 08:41 PM
Value chart / Dinapoli Detrend ... T2020 Suggestions And Feedback 1 10-23-2008 10:50 AM
Elliott Oscillator PrTester NinjaScript File Sharing Discussion 2 09-18-2007 05:25 AM


All times are GMT -6. The time now is 03:21 AM.