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 KennyK, 05-29-2017, 02:02 AM
          2 responses
          1,278 views
          0 likes
          Last Post marcus2300  
          Started by fernandobr, Today, 09:11 AM
          0 responses
          0 views
          0 likes
          Last Post fernandobr  
          Started by itrader46, Today, 09:04 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by timmbbo, Today, 08:59 AM
          0 responses
          2 views
          0 likes
          Last Post timmbbo
          by timmbbo
           
          Started by bmartz, 03-12-2024, 06:12 AM
          5 responses
          33 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Working...
          X