Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Dot color problem

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

    #16
    ok, thought of one last question, sorry :-), how would I set this indicator to show a max 100 and min 0 just like RSI?

    Thanks again for the help, the last code you sent is what made the engine click

    Bert

    Comment


      #17
      Changing the scale is unfortunately not supported with NinjaTrader 6.5 - in NinjaTrader 7 you'll get access to more options in this regard - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

      For now you could use a range bound indicator like the RSI on your custom MACD or work with this posted addon script - http://www.ninjatrader-support2.com/...27&postcount=1
      BertrandNinjaTrader Customer Service

      Comment


        #18
        help again please

        Originally posted by NinjaTrader_Bertrand View Post
        bert1, you can delete Plot1 and Plot2 and just try this as a start in the OnBarUpdate() -

        Code:
         
        Plot0.Set(MACD(RSI(Close, 10, 1), 10, 20, 5)[0]);
        An EMA of this would look like this -

        Code:
        Plot0.Set(EMA(MACD(RSI(Close, 10, 1), 10, 20, 5), 10)[0]);
        This worked but I need to displace one of the lines, when I add
        Displacement = 3; it displaces all 3 lines...How do I displace just one of my lines?

        Comment


          #19
          please help again, thanks

          Originally posted by NinjaTrader_Bertrand View Post
          Changing the scale is unfortunately not supported with NinjaTrader 6.5 - in NinjaTrader 7 you'll get access to more options in this regard - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

          For now you could use a range bound indicator like the RSI on your custom MACD or work with this posted addon script - http://www.ninjatrader-support2.com/...27&postcount=1
          This worked but I need to displace one of the lines, when I add
          Displacement = 3; it displaces all 3 lines...How do I displace just one of my lines?

          Comment


            #20
            You can of course also manually displace a plot, for example a displacement of 1 bar -

            Code:
             
            Plot0.Set(MACD(RSI(Close, 10, 1), 10, 20, 5)[[SIZE=3][COLOR=red]1[/COLOR][/SIZE]]);
            BertrandNinjaTrader Customer Service

            Comment


              #21
              Originally posted by NinjaTrader_Bertrand View Post
              You can of course also manually displace a plot, for example a displacement of 1 bar -

              Code:
               
              Plot0.Set(MACD(RSI(Close, 10, 1), 10, 20, 5)[[SIZE=3][COLOR=red]1[/COLOR][/SIZE]]);
              I wanted to displace 3 bars to right, so I did this;
              Plot1.Set(EMA(EMA(Plot0, 3),3)[0]);
              Plot2.Set(SMA(EMA(EMA(EMA(Plot1,
              3),3),3),5)[3]); But then indicator doesnt show up??? And I loose the RSI scale
              Thanks

              Comment


                #22
                For a displacement of 3 bars you would need to add this check to the start of your OnBarUpdate() then -

                Code:
                 
                if (CurrentBar < 3) return;


                http://www.ninjatrader-support2.com/...ead.php?t=3170
                BertrandNinjaTrader Customer Service

                Comment


                  #23
                  Originally posted by NinjaTrader_Bertrand View Post
                  For a displacement of 3 bars you would need to add this check to the start of your OnBarUpdate() then -

                  Code:
                   
                  if (CurrentBar < 3) return;
                  http://www.ninjatrader-support2.com/...ead.php?t=3170
                  like this?
                  Plot1.Set(EMA(EMA(Plot0, 3),3)[0]);
                  if (CurrentBar < 3) return;
                  Plot2.Set(SMA(EMA(EMA(EMA(Plot1,
                  3),3),3),5)[0]);

                  Comment


                    #24
                    Originally posted by bert1 View Post
                    like this?
                    Plot1.Set(EMA(EMA(Plot0, 3),3)[0]);
                    if (CurrentBar < 3) return;
                    Plot2.Set(SMA(EMA(EMA(EMA(Plot1,
                    3),3),3),5)[0]);
                    got it , it worked thanks! was missing the [3]

                    Comment


                      #25
                      Great you got it working.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #26
                        Originally posted by NinjaTrader_Bertrand View Post
                        Great you got it working.

                        YES! MUCH THANKS!

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by cre8able, 02-11-2023, 05:43 PM
                        3 responses
                        231 views
                        0 likes
                        Last Post rhubear
                        by rhubear
                         
                        Started by frslvr, 04-11-2024, 07:26 AM
                        8 responses
                        111 views
                        1 like
                        Last Post NinjaTrader_BrandonH  
                        Started by stafe, 04-15-2024, 08:34 PM
                        10 responses
                        44 views
                        0 likes
                        Last Post stafe
                        by stafe
                         
                        Started by rocketman7, Today, 09:41 AM
                        3 responses
                        8 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by traderqz, Today, 09:44 AM
                        2 responses
                        5 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Working...
                        X