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

Go Back   futures.io

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


NT7 to NT8, code change help.
Started:November 5th, 2016 (01:18 PM) by kidvic Views / Replies:139 / 5
Last Reply:November 5th, 2016 (05:42 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
     

Reply
 
Thread Tools Search this Thread

NT7 to NT8, code change help.

Old November 5th, 2016, 01:18 PM   #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
     

Old November 5th, 2016, 01:18 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.

     

Old November 5th, 2016, 02:45 PM   #3 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: NinjaTrader, Julia
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 644 since Aug 2009
Thanks: 314 given, 593 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
     

Old November 5th, 2016, 03:50 PM   #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
     

Old November 5th, 2016, 04:01 PM   #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

Are you a NinjaTrader user?

 

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
     

Old November 5th, 2016, 05:42 PM   #6 (permalink)
Elite Member
London, UK
 
Futures Experience: Intermediate
Platform: NinjaTrader, Julia
Favorite Futures: Ockham's razor
 
gregid's Avatar
 
Posts: 644 since Aug 2009
Thanks: 314 given, 593 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 > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > 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)
 

Al Brooks: Stop Losing when a Good Trade goes Bad, Correcting Mistakes

Elite only
 

Trading Technologies: Algo Design Lab hands-on

Dec 13

Normal webinar schedule resumes after the holidays

January
     

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 06:01 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-12-08 in 0.09 seconds with 19 queries on phoenix via your IP 54.159.129.152