NT7 max look back - futures io
futures io



NT7 max look back


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one AkLio with 2 posts (0 thanks)
    2. looks_two Big Mike with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Fat Tails with 1 posts (1 thanks)
    1. trending_up 3,504 views
    2. thumb_up 1 thanks given
    3. group 0 followers
    1. forum 4 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

NT7 max look back

(login for full post details)
  #1 (permalink)
 AkLio 
Canada
 
Experience: Intermediate
Platform: ninja 7
Broker: IB
Trading: 6E ES
 
AkLio's Avatar
 
Posts: 38 since Jun 2009
Thanks: 28 given, 67 received

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

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
TradingView help in improving Anchored Vwap
Platforms and Indicators
For the experts of Metastock
Platforms and Indicators
Is there inherently more opportunity in smaller markets?
Traders Hideout
Eurex Denali vs dxFeed
Sierra Chart
Experience with AGN (Introducing Broker)
Brokers
 
 
(login for full post details)
  #3 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
 
Big Mike's Avatar
 
Posts: 50,129 since Jun 2009
Thanks: 32,601 given, 98,784 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

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #4 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 received

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:
 
(login for full post details)
  #5 (permalink)
 AkLio 
Canada
 
Experience: Intermediate
Platform: ninja 7
Broker: IB
Trading: 6E ES
 
AkLio's Avatar
 
Posts: 38 since Jun 2009
Thanks: 28 given, 67 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);

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > NT7 max look back


Last Updated on April 25, 2010


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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