• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 tonynt, Today, 11:21 AM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by kabott, Today, 10:47 AM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by bc24fl, Today, 10:00 AM
                  3 responses
                  10 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by TonyParisi, Today, 07:38 AM
                  2 responses
                  13 views
                  0 likes
                  Last Post TonyParisi  
                  Started by fx.practic, Today, 10:03 AM
                  2 responses
                  9 views
                  0 likes
                  Last Post fx.practic  
                  Working...
                  X