NT7 to NT8, code change help. - NinjaTrader Programming | futures io social trading
futures io futures trading


NT7 to NT8, code change help.
Started: by kidvic Views / Replies:227 / 5
Last Reply: 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

Reply
 
Thread Tools Search this Thread
 

NT7 to NT8, code change help.

  #1 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received

NT7 to NT8, code change help.

I have an NT7 indicator that uses a for loop to set Values.

this is the code for NT7.

double PriceVal = 0;
for (int i = (ATbar - ITbar) - 1; i >= 0; i--)
{
PriceVal += Storage[i];
Values[0].Set(i, PriceVal);
}

I have tried
Values[0][0] = (i, PriceVal);
but all I get is a syntax error.

Again, thanks in advance!

Reply With Quote
 
  #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.

 
  #3 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 601 received


As you've noted there is no Set in NT8, the overload your NT7 code was using is following:
 
Code
DataSeries.Set(int barsAgo, double value)
in your new code you probably want this:
 
Code
Values[0][i] = PriceVal;

Reply With Quote
 
  #4 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


gregid View Post
As you've noted there is no Set in NT8, the overload your NT7 code was using is following:
 
Code
DataSeries.Set(int barsAgo, double value)
in your new code you probably want this:
 
Code
Values[0][i] = PriceVal;

Thank you for this!
Works great!

Reply With Quote
 
  #5 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received

futures io on Facebook

gregid View Post
As you've noted there is no Set in NT8, the overload your NT7 code was using is following:
 
Code
DataSeries.Set(int barsAgo, double value)
in your new code you probably want this:
 
Code
Values[0][i] = PriceVal;

Maybe I should do a new post, but would

DoubleSeries.Set(PriceVal);
be the same as
DoubleSeries[0] = PriceVal; // ?

Reply With Quote
 
  #6 (permalink)
Elite Member
Wrocław, Poland
 
Futures Experience: Intermediate
Platform: NinjaTrader, Racket
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 651 since Aug 2009
Thanks: 321 given, 601 received

Yes

Sent using the futures.io mobile app

Reply With Quote
The following user says Thank You to gregid for this post:

Reply



futures io > > > > > NT7 to NT8, code change help.

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Market Analysis w/Dave Forss @ IQFeed

Apr 25
 

Introducing iSystems with Stage 5 Trading

Apr 27

*NEW* FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May

Prototyping Python Strategies (part 2) w/Ran Aroussi

Elite only

Ask Me Anything w/Raymond Deux @ NinjaTrader

May 3

An Afternoon with FIO member Softsoap

Elite only
 

Machine Learning & Data Mining Bias w/Kris Longmore @ Robot Wealth

Elite only

Brannigan Barrett (TBA)

Elite only

FIO member Gomi (TBA)

Elite only

FuturesTrader71 (TBA)

Elite only

EasyLanguage Programming w/Chris @ ABC Trading Group

Elite only

Portfolio Diversification w/Brendon Delate

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Programmer NT7 or NT8 scalpingticks NinjaTrader Programming 7 November 9th, 2016 04:55 PM
C# programing vs. NT7(NT8) harcesis NinjaTrader Programming 5 October 6th, 2016 07:01 AM
Need NT7 Indicator Converted for use with NT8 tradertom2012 Hire a Consultant or Programmer 0 July 28th, 2016 03:41 AM
NT7, NT8- Get Feed of Price Change to Method/Event & Confirm Order ieitani NinjaTrader Programming 8 July 9th, 2016 05:10 AM
NT8 vs NT7 UniRenko Problem? Segwin The Elite Circle 11 June 23rd, 2016 12:20 PM


All times are GMT -4. The time now is 10:30 AM.

no new posts
Page generated 2017-04-25 in 0.09 seconds with 19 queries on phoenix via your IP 54.167.215.35