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

Help writing acceleration indicator

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

    Help writing acceleration indicator

    Hi!

    I was wondering if someone could help me write an acceleration indicator. It would basically measure the slope of the slope of the graph and plot it as an oscillator.

    This is how far i am
    Code:
    protected override void OnBarUpdate()
            {
                accel = ((Typical[0] - Typical[5]) / 5) - (Typical[5] - Typical[9]) / 5) / 5;
                Value.Set(accel);
            }
    This isn't giving me any errors when I compile, but nothing is showing up on the graph.
    Thanks in advance!
    Last edited by markp77; 11-02-2008, 05:22 AM.

    #2
    Always check the Control Center log tab for any errors that can help provide an idea as to what may be wrong. Your problem is described in the following tip.

    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks a ton, that fixed it!

      Comment


        #4
        Originally posted by NinjaTrader_Ray View Post
        Your problem is described in the following tip.
        http://www.ninjatrader-support.com/v...ead.php?t=3170
        This indicator coding error seems to come up fairly regularly here. Maybe it would be helpful to notify the user of this problem in a more obvious way, such as a message directly on the bottom of the chart, when this exception happens. Clicking the message could link to the help with some related hints/examples.

        Comment


          #5
          Hello Anagoge,

          I will forward your suggestion to our development team and ask them if they can add this to the list of future considerations for the software.

          Thank you for your feedback.
          JasonNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by lightsun47, Today, 03:51 PM
          0 responses
          2 views
          0 likes
          Last Post lightsun47  
          Started by 00nevest, Today, 02:27 PM
          1 response
          8 views
          0 likes
          Last Post 00nevest  
          Started by futtrader, 04-21-2024, 01:50 AM
          4 responses
          41 views
          0 likes
          Last Post futtrader  
          Started by Option Whisperer, Today, 09:55 AM
          1 response
          13 views
          0 likes
          Last Post bltdavid  
          Started by port119, Today, 02:43 PM
          0 responses
          8 views
          0 likes
          Last Post port119
          by port119
           
          Working...
          X