NT7 max look back - NinjaTrader Programming | futures io social day trading
futures io futures trading


NT7 max look back
Updated: Views / Replies:2,343 / 4
Created: by AkLio Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

NT7 max look back

  #1 (permalink)
Elite Member
Canada
 
Futures Experience: Intermediate
Platform: ninja 7
Broker/Data: IB
Favorite Futures: 6E ES
 
AkLio's Avatar
 
Posts: 38 since Jun 2009
Thanks: 28 given, 65 received

NT7 max look back

Hi

NT7 have this new option: Maximun Bars Look Back
The default value is set by NT to 256

I have found that many of my indicators will work only if I set the value to infinite.

Did you had any trouble with this and do you have a way of changing this to "inifinite" in the indi code ???

Help much appreciated

Lio

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)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,355 given, 83,237 received



AkLio View Post
Hi

NT7 have this new option: Maximun Bars Look Back
The default value is set by NT to 256

I have found that many of my indicators will work only if I set the value to infinite.

Did you had any trouble with this and do you have a way of changing this to "inifinite" in the indi code ???

Help much appreciated

Lio

You can explicitly define the lookback period when you initialize your DataSeries values in #init:

 
Code
                            
// infinite

new DataSeries(thisMaximumBarsLookBack.Infinite);

// 256
new DataSeries(thisMaximumBarsLookBack.TwoHundredFiftySix); 
Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #4 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary

Different Behavior NT 6.5. / NT 7.0

NT 6.5. is a memory hog, so NT developpers looked for ways to make NT 7 leaner. One way was to reduce the memory required to store data series.

Let us assume you define a new DataSeries with the name Dirty via private DataSeries Dirty. Within the code of your indicator, you only set a value from time to time, say for a zigzag you only set a value when a new high or low is made. Then you try to access the DataSeries also for those values that have not been set correctly.

In this case:

NT 6.5. has written a default value to all fields of the DataSeries, so if you have not set a value, it returns the default value.
NT 7.0 (TwoHundredFiftySix) does not write any default values, but reserves the storage space required for 256 fields. If you access any fields that you have not set, NT7 returns random values from those stored in the array containing the 256 values.
NT 7.0 (Infinite) will only reserve storage space, if values are actually set, so if you do not set the values properly and try to access them, it may return you an out-of-range exception.


Many indicators do not need to access more than 256 fields. However, there is a major problem with this. If you scroll back your chart horizontally more than 256 bars or if you access any bars prior to the last 256 bars, you may get false values returned.

Example: FibCluster Indicator V1.3

This indicator uses 192 DataSeries and 40 DateTimeSeries. Now if you put this on a 1 min chart with a lookback period of 100 days, you will have about 70 days of data with 1425 bars each. The RAM required to store the full DataSeries and DateTimeSeries would be 70 x 1425 x 232 x 8 Bytes = 185 MBytes. With the default setting TwoHundredFiftySix the RAM needed will be reduced to less than half a Mbyte....

But if you want to scroll back a bit, or if you need to access any values that are back more than 256 bars, then you should set the DataSeries to MaximumBarsLookBack.Infinite. You can either change the global setting for the indicator via the indicator menu (affects all DataSeries used by the indicator), or you can do this selectively through the indicator code, as suggested by Mike in his post above.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #5 (permalink)
Elite Member
Canada
 
Futures Experience: Intermediate
Platform: ninja 7
Broker/Data: IB
Favorite Futures: 6E ES
 
AkLio's Avatar
 
Posts: 38 since Jun 2009
Thanks: 28 given, 65 received

Much thanks to you Big Mike and Fat Tails

My indi redraw candles from A to Z and the 257th candle comes very fast when you scroll back a tick chart ...... Looking good now...

///</summary>
protectedoverridevoid Initialize()
{
open =
new DataSeries(this,MaximumBarsLookBack.Infinite);
high =
new DataSeries(this,MaximumBarsLookBack.Infinite);
low =
new DataSeries(this,MaximumBarsLookBack.Infinite);
close =
new DataSeries(this,MaximumBarsLookBack.Infinite);
zeLine =
new DataSeries(this,MaximumBarsLookBack.Infinite);


Last edited by AkLio; April 25th, 2010 at 08:35 PM.
Reply With Quote

Reply



futures io > > > > > NT7 max look back

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Back to the Future! Back testing multi time frame strategy trades occuring in future mrticks The Elite Circle 10 April 2nd, 2011 10:54 AM
cutting back websouth Off-Topic 2 February 15th, 2010 01:23 PM
1/2 way back Xzap Traders Hideout 2 August 10th, 2009 09:08 AM


All times are GMT -4. The time now is 11:13 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@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 2017-12-17 in 0.11 seconds with 19 queries on phoenix via your IP 54.221.73.186