Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"negatively displaced moving average"

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

    "negatively displaced moving average"

    How can I create a "negatively" displaced moving average? Each time I attempt to, the value setting goes automatically to "1". I want to create a negative moving average, like -14, -49, -89, etc. Thank you, David

    #2
    Have a look in the ichimoku indicator.... the chikou is negatively displaced

    Comment


      #3
      I do not find a ichimoku indicator. Is this an add-on indicator available somewhere for Ninja Charts?

      Comment


        #4
        Hello,

        Take a look at the file sharing section of this forum. It is probably there.
        DenNinjaTrader Customer Service

        Comment


          #5
          I am attaching the code for the ichimoku indicator as a text file and you will see how the programmer detrended the chikou
          Attached Files

          Comment


            #6
            Originally posted by mrmagoo View Post
            How can I create a "negatively" displaced moving average? Each time I attempt to, the value setting goes automatically to "1". I want to create a negative moving average, like -14, -49, -89, etc. Thank you, David

            David,

            If your just want to change the output, Times minus one works.


            if (BidChange[0] <= BidChange[1])

            {
            VolumeDown.Set(totalaskvol * (-1) );
            }

            if (BidChange[0] > BidChange[1])

            {
            VolumeUp.Set(totalbidvol); // Green
            }


            If its the variable, Set min value to less than lowest minus value when first creating the indicator or in the properties section later.

            Simply put a minus in front of the integer

            ex. -16

            Easy

            RJay
            RJay
            NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

            Comment


              #7
              RJay,

              When I right click on my chart, click on indicators, select an SMA, type in
              -16 for the period value under Parameters, and click on apply, the SMA automatically displays 1 for the value...I can't make it go to a "negative" value.

              What do you think that I am doing wrong.

              Thanks, David

              Comment


                #8
                You cannot use negative values for SMA's. It doesn't make sense to try to draw an SMA with points in the future because they don't exist yet.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Josh,

                  There are trading methods and strategies that actually use this "negative" displaced moving average setting for trading setups. Some other charting platforms have the ability to use such a "negative" displaced moving average, but I wanted to be able to utilize it in Ninja. Apparently the Ichimoku indicator offers this feature, which is available in ninjatrader file sharing. My only problem there is that I can't download the Ichimoku file share indicator because every time I attempt to, I get an error message stating that "you have custom Ninjascript files on your PC that have programming errors". So, I am also trying to resolve those programming errors so that I can download the Ichimoku file share.

                  Thanks anyway, David

                  Comment


                    #10
                    Displacement is not the same as pulling a negative period. If you want to displace an indicator, when you add the indicator to the chart there is a displacement parameter you can use to move it to the right.

                    You will need to open up your NinjaScript Editor and press F5 to compile. Then you will need to fix any errors that show up there before you will be able to import.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      RJay,

                      I ended up getting what I wanted by right clicking on my chart, clicking on indicators, clicking on SMA, and then clicking on Displacement under General and simply typing in -5, -10, etc. and getting my desired "negative" displacement value for my moving average.

                      David

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by gravdigaz6, Yesterday, 11:40 PM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by MarianApalaghiei, Yesterday, 10:49 PM
                      3 responses
                      10 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by XXtrader, Yesterday, 11:30 PM
                      0 responses
                      4 views
                      0 likes
                      Last Post XXtrader  
                      Started by love2code2trade, 04-17-2024, 01:45 PM
                      4 responses
                      28 views
                      0 likes
                      Last Post love2code2trade  
                      Started by funk10101, Yesterday, 09:43 PM
                      0 responses
                      9 views
                      0 likes
                      Last Post funk10101  
                      Working...
                      X