NexusFi: Find Your Edge


Home Menu

 





The Truth: NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 120 posts (165 thanks)
    2. looks_two Big Mike with 54 posts (93 thanks)
    3. looks_3 MetalTrade with 43 posts (10 thanks)
    4. looks_4 ZTR with 41 posts (25 thanks)
      Best Posters
    1. looks_one AynRandFan with 34 thanks per post
    2. looks_two Big Mike with 1.7 thanks per post
    3. looks_3 Fat Tails with 1.4 thanks per post
    4. looks_4 NinjaTrader with 0.9 thanks per post
    1. trending_up 362,651 views
    2. thumb_up 802 thanks given
    3. group 145 followers
    1. forum 1,059 posts
    2. attach_file 65 attachments




 
Search this Thread

The Truth: NinjaTrader

  #721 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,714 since May 2010
Thanks Given: 203
Thanks Received: 2,686


kashter View Post
I posted a thread on NT forums about issues causing rectangle objects to draw inconsistently across charts. The main issue is that if I manually draw a rectangle on 30min chart, and try to change the setting to have the End Time into the future, it throws an error. Yet if I draw the same rectangle on 405 min chart, it draws as expected, even if I extend the End Time into tomorrow's session. In both charts I use the "Use instrument settings". Quite annoying.

Unfortunately, NT's response was less than expected. They claim you cannot draw into the future using the "Use instrument settings" session template. Yet this is what I do all the time! Just place a horizontal line on a chart and see where it ends!

I see quite a few issues, and I wish NT gets a better grasp of the drawn objects. Hope the next iteration of NT7 does a better job.

K

From what I can tell, you and my support rep might not be on the same page. I have asked them to reach out to you privately so they can remote into your PC to ensure we understand your issue and that it is properly answered.

Follow me on Twitter Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
About a successful futures trader who didnt know anythin …
Psychology and Money Management
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #722 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

Does anybody have an idea, why all indicators do not plot for the first 20 bars?

Attached Thumbnails
Click image for larger version

Name:	Indicator Plot.jpg
Views:	147
Size:	85.1 KB
ID:	38366  
Reply With Quote
  #723 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274



Fat Tails View Post
Does anybody have an idea, why all indicators do not plot for the first 20 bars?

No idea, I just tried it and it happens for me too. The data box shows values for the days not plotted too.

To be honest, I'm used to Ninja's calculations/indicators starting at random times for charts and backtesting, and I sort of live with it. I shouldn't have to though.

(I actually calculate daily indicators seperately direct from the feed and keep them in files which my strategy loads. I just don't really trust Ninja to have all the right data, to know whether it's going to load new data, to pause my strat while it calculates historical, to get the right start date etc etc)

Reply With Quote
  #724 (permalink)
 baruchs 
Israel
 
Experience: Intermediate
Platform: NinjaTrader
Broker: pfg
Trading: eminis
Posts: 323 since Jun 2009

Default min bars required =20

Reply With Quote
  #725 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,714 since May 2010
Thanks Given: 203
Thanks Received: 2,686


Fat Tails View Post
Does anybody have an idea, why all indicators do not plot for the first 20 bars?


Fat Tails,

Indicators have a property known as BarsRequired. The default value of this is 20 bars. What this does is that it prevents the plotting (not calculation) of the indicator until the BarsRequired criteria is met. If you wish for the indicator to plot earlier you could add this line into the Initialize() method of the indicator:

BarsRequired = 0;

Please note that usually plotting an indicator early with 0 bars required will show an “unstable” period when the indicator values are not properly calculating yet with enough data points. For example, on the EMA of period 5, the first 5 bars would be irrelevant EMA values since they aren’t really EMAs of period 5 yet since there aren’t 5 data points available. You could also try something like the line below to avoid plotting the “unstable” period, but begin plotting earlier than 20.

BarsRequired = Period;

[FONT=Calibri][SIZE=3][COLOR=#0000ff]http://www.[AUTOLINK]ninjatrader[/AUTOLINK].com/support/helpGuides/nt7/barsrequired.htmFor more information on this property, please see here: [/SIZE][/FONT][/COLOR]

Follow me on Twitter Reply With Quote
Thanked by:
  #726 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274

BarsRequired does spring to mind, but it's not settable anywhere that I see in the dialog boxes.

Surely you're not saying you have to create your own indicator to see the perfectly valid EMA(5) on on the tenth bar?

Where on earth did the arbitrary 20 come from?

Reply With Quote
  #727 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,355


ThatManFromTexas View Post
I tried that... made no difference.




It appears I "fixed" it. But I still don't know what caused it.


That was pre-mature. Had the same problems this morning.

NT support gave me the standard;

1. We've never seen that...

2. You are the ONLY one out of 10,000 customers that have reported this ...

3. What are you doing wrong you aren't confessing...

4. Dump every thing and start over with a clean install....


Update:

They just replied that they consider the indicators I wrote in NT as "Third Party Programs" so they can't help me. Even though they are just compiled Ninja Scripts and have no DLL's.

Sheeesssh .....

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
  #728 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


NinjaTrader View Post
Fat Tails,

Indicators have a property known as BarsRequired. The default value of this is 20 bars. What this does is that it prevents the plotting (not calculation) of the indicator until the BarsRequired criteria is met. If you wish for the indicator to plot earlier you could add this line into the Initialize() method of the indicator:

BarsRequired = 0;

Please note that usually plotting an indicator early with 0 bars required will show an “unstable” period when the indicator values are not properly calculating yet with enough data points. For example, on the EMA of period 5, the first 5 bars would be irrelevant EMA values since they aren’t really EMAs of period 5 yet since there aren’t 5 data points available. You could also try something like the line below to avoid plotting the “unstable” period, but begin plotting earlier than 20.

BarsRequired = Period;

[FONT=Calibri][SIZE=3][COLOR=#0000ff]http://www.[AUTOLINK]ninjatrader[/AUTOLINK].com/support/helpGuides/nt7/barsrequired.htmFor more information on this property, please see here: [/SIZE][/FONT][/COLOR]

Thanks for making this clear. I had indeed used BarsRequired for some of my MTF indicators and they do not show this behaviour.

In this case this is simply a bug of the system indicators. If you display an EMA(55) it will include 35 bars of the unstable period. If you display an EMA(5) it will cut off 15 bars of the stable period.

So, why not add this line

BarsRequired = Period;

or similar (if applicable) to all system indicators?

Reply With Quote
  #729 (permalink)
 baruchs 
Israel
 
Experience: Intermediate
Platform: NinjaTrader
Broker: pfg
Trading: eminis
Posts: 323 since Jun 2009


Quoting 
So, why not add this line

BarsRequired = Period;

or similar (if applicable) to all system indicators?

No no this is no good.
If you use indicators with several lengths? Should it start from the biggest?
If you have a multi timeframe strategy (5min & 1 day) and you use an indicator only for 5 min time series.
The "BarsRequired" is applied to all bar series, so if automatically it will be equal to the longest indicator (lets say you use SMA(200)) then it wont plot for 200 days!
Its more complicated then appears from the first look.

Reply With Quote
  #730 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



baruchs View Post
No no this is no good.
If you use indicators with several lengths? Should it start from the biggest?
If you have a multi timeframe strategy (5min & 1 day) and you use an indicator only for 5 min time series.
The "BarsRequired" is applied to all bar series, so if automatically it will be equal to the longest indicator (lets say you use SMA(200)) then it wont plot for 200 days!
Its more complicated then appears from the first look.

The code is part of the indicator and has no impact on other indicators. It is not applied to a bar series. The "BarsRequired" will not be equal to the indicator with the longest period, as the value of "BarsRequired" is different for each indicator. I am just talking of how to code an indicator correctly.

If you have a multi-timeframe indicator, BarsRequired must be set within that indicator, otherwise it will not work correctly. The question I asked does not relate to new indicators, as you can code them in the way you like.

SMA(200): The question is, if you want to plot false values for the SMA(200), because every value plotted earlier than for CurrentBar = 200 has nothing to do with a SMA(200). The data is not available on the chart.

So you prefer false data to no data? I prefer no data to false data!

Reply With Quote




Last Updated on April 22, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts