What's wrong with my SUM logic? - NinjaTrader Programming | futures.io
futures.io futures trading

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

What's wrong with my SUM logic?
Started:July 18th, 2010 (08:04 PM) by gordo Views / Replies:1,009 / 1
Last Reply:July 18th, 2010 (08:04 PM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

What's wrong with my SUM logic?

Old July 18th, 2010, 08:04 PM   #1 (permalink)
Elite Member
Tonganoxie, Kansas
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: CL,6E
gordo's Avatar
Posts: 160 since Nov 2009
Thanks: 129 given, 398 received

What's wrong with my SUM logic?

I am trying desperately to replace the SUM call in my program but don't get the right answer. Any ideas?

Logic that works:
noise = SUM(diffSeries, Period)[0];

Logic that does not work:
noise = diffSeries[0] + noise - diffSeries[Period];

The program has an if statement ahead of the 'noise' statement that ensures CurrentBar is greater than Period. That's not the issue. I just get a different (larger) value for noise with my logic without using the SUM routine.

Thanks for the help!

Reply With Quote

Old July 18th, 2010, 08:04 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > What's wrong with my SUM logic?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two indexes total sum. yunakhan1 NinjaTrader Programming 2 June 14th, 2011 06:42 PM
Order logic for Gain mainstream Currency Futures 0 December 21st, 2010 04:08 PM
is Forex a zero sum game ? momop540 Traders Hideout 16 July 15th, 2010 09:27 PM
Organize logic flow terry NinjaTrader Programming 1 July 12th, 2009 12:16 PM

All times are GMT -4. The time now is 04:59 PM.

Copyright © 2016 by futures.io. All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-27 in 0.07 seconds with 19 queries on phoenix via your IP