Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Detrend Oscillator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Detrend Oscillator

    Does Ninjatrader offer a Detrend Oscillator? The formula is:

    Detrend Oscillator = Close(today) minus simple period moving average

    #2
    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
    BertrandNinjaTrader Customer Service

    Comment


      #3
      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 Files

      Comment


        #4
        Thanks for creating and posting this, good job!
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Elliot Wave, thanks for the help on this one. I'll try it out.

          Comment


            #6
            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 .

            Comment


              #7
              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.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                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 .

                Comment


                  #9
                  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

                  Comment


                    #10
                    Detrend for Ninjatrader 7

                    Do you have an updated Detrend Oscillator for Ninjatrader 7? Thanks in advance!

                    Comment


                      #11
                      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
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Works fine for me 2.

                        Comment


                          #13
                          Thanks so much!! It works for me very well.

                          Comment


                            #14
                            How do I use the Detrend Oscillator (BTW...thanks!) inside a strategy? How do I "call" it?

                            Thanks.

                            Comment


                              #15
                              Hello TexFly,

                              Thank you for your post.

                              If I wanted to add the indicator the chart the strategy is applied to I would use the following:
                              Code:
                                      protected override void Initialize()
                                      {
                                         	Add(DetrendOscillator(VC.NinjaScript.Utility.MovingAverageType.SMA, 14));
                              Let's say I want to check if the current close is greater than the DetrendOscialltor I would use the following:
                              Code:
                              			if(DetrendOscillator(VC.NinjaScript.Utility.MovingAverageType.SMA, 14)[0] < Close[0])
                              			{
                              				//Do something
                              			}
                              Here I selected the SMA but you can select any of the MAs supported in the DetrendOscillator.

                              Please let me know if I may be of further assistance.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by kempotrader, Today, 08:56 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post kempotrader  
                              Started by kempotrader, Today, 08:54 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post kempotrader  
                              Started by mmenigma, Today, 08:54 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post mmenigma  
                              Started by halgo_boulder, Today, 08:44 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post halgo_boulder  
                              Started by drewski1980, Today, 08:24 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post drewski1980  
                              Working...
                              X