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

Indicator delta

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

    Indicator delta

    Can you please tell me how to create an indicator that represents the difference (delta) between 2 different indicator bar values, for example the delta of the open of one indicator length and the close of another indicator length? Although I've never used it, can this be done in the indicator wizard? Thank you.

    #2
    Hello Wi!son,

    We have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.

    A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm

    I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

    We also have some Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
    Click here to see our NinjaScript Reference Samples
    Click here to see our NinjaScript Tips

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there.

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      OK, from the example of an SMA of Volume, can I assume that I can use any another indicator I have listed and it's parameters (exactly as shown in the parameters section of the indicator)? Do I have to declare these parameters and indicator name in the variables section?

      Comment


        #4
        Hello Wi!s0n,

        I believe you are referring to calling an indicator inside another indicator. If you want to get the value of that Indicator you do not have to add it inside the variables section. For example:

        Code:
        if ( SMA(14) > SMA(28) )
           // Do something
        JCNinjaTrader Customer Service

        Comment


          #5
          This might get painful, but here goes. How do I make an SMA into an oscillator? I have taken my indicator "delta" as follows, "delta = 100 * (smaClose - smaOpen / smaClose + smaOpen)". Is this correct as when I refresh, there is no change?

          Comment


            #6
            Hello Wi!s0n,

            Are refreshing by right clicking inside the chart and selecting "Reload NinjaScript"?

            Also make sure you compile your code before you "Reload" so the changes will take effect.

            Happy to be of further assistance.
            JCNinjaTrader Customer Service

            Comment


              #7
              yes, I have compiled and refreshed. Can you reply to my question about my formula and about making the sma into an oscillator?

              Comment


                #8
                Hello Wi!s0n,

                How you calculate your indicator is entirely up to the programmer, but with that said I do not see any issue with the formula. For you current formula you may do something like:

                Code:
                delta = 100 * ( (Sma(Close, 14)[0] - SMA(Open, 14)[0] ) / (Sma(Open, 28)[0] - SMA(Close, 28)[0] ) );
                JCNinjaTrader Customer Service

                Comment


                  #9
                  Thanks JC, that's enough to get me going.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bortz, 11-06-2023, 08:04 AM
                  47 responses
                  1,604 views
                  0 likes
                  Last Post aligator  
                  Started by jaybedreamin, Today, 05:56 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  13 views
                  0 likes
                  Last Post Javierw.ok  
                  Working...
                  X