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


NT7 to NT8, code change help.
Started: by kidvic Views / Replies:187 / 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, 599 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 Edge on FIO

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, 599 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)
 

NinjaTrader 8: Tips and Tricks (part 2)

Mar 2
 

An Afternoon With FIO member @michaelleemoore

Elite only
 

Jigsaw Trading: Keys to successfully trading the open

Mar 9

Macro view: Trump Market Risk w/Piers Curran @ Amplify Trading

Elite only

Reading the Psychology of the Market w/Brett Steenbarger & Trading Technologies

Elite only

Hybrid Machine Learning (R and TradeStation) w/Murray Ruggiero

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only
     

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


All times are GMT -4. The time now is 03:47 PM.

no new posts
Page generated 2017-02-24 in 0.09 seconds with 19 queries on phoenix via your IP 54.146.184.210