Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Converting ThinkScript "Sum" to NinjaScript C#

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

    Converting ThinkScript "Sum" to NinjaScript C#

    Hello everyone! As the title says, I'm trying to find the equivalent of the ThinkScript "Sum" for NinjaScript. ThinkorSwim defines "Sum" as "returns the sum of values for the specified number of bars", so saying "Sum(Close, 20)" means the sum of the last 20 close values. I don't think I would be required to do "Close[20]+Close[19]+Close[18] etc", but I cannot seem to find any such equivalent method in the NinjaScript Language References. Thanks greatly for any help!

    #2
    Hello Tamza,

    Thanks for your post.

    Sum in Ninjatrader would be SUM(): https://ninjatrader.com/support/help...mation_sum.htm

    Perhaps this will help to find what you need in Ninjascript: https://ninjatrader.com/support/help..._reference.htm

    Comment


      #3
      NinjaTrader_PaulH,

      Thank you! Especially for the alphabetical link, that will make my searches so much easier. You've made my day!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      331 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      549 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X