NT7 - Chart Indicators loading randomly - NinjaTrader Programming | futures io social day trading
futures io futures trading


NT7 - Chart Indicators loading randomly
Updated: Views / Replies:777 / 14
Created: by vantojo 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 - Chart Indicators loading randomly

  #1 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

NT7 - Chart Indicators loading randomly

for NT7:

I have several chart indicators that add buttons and other controls to the chart ToolStrip.

The problem is that sometimes Ninja loads the indicators in an order that is different than the Indicator list where I attach the indicators to the chart.

This causes a problem because then my toolstrip controls are in a different order than I expect, which is a distraction.

If I reload the indicators (F5) the toolstrip controls are usually placed in the correct order.

Any ideas on how to fix this? I asked NinjaTrader forum some time ago and they didn't have an answer....just " that is the way it works"....no control over the order a chart loads the indicators.

Any ideas guys?

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)
Market Wizard
Germany
 
Futures Experience: Intermediate
Platform: Other
Favorite Futures: ES, YM, 6E
 
Posts: 2,642 since Feb 2013
Thanks: 4,900 given, 6,435 received
Forum Reputation: Legendary


The phenomenon that you describe regularly results from
a) missing or
b) logically incorrect
z-orders of drawing objects.

Even more than proprietary order handling, z-order certainly is for advanced programers. Most beginners
are not aware of the underlying DrawObjects collection at all or don't understand the .NET concept and
therefore quickly lose track of their drawing objects. (See e.g. the level of confusion about this topic in NT
development forum discussions.)

Besides, it is a relative concept, not an absolute one. Relative means that an object's z-order is relative
to all other objects and data series of the collection. Objects from a NinjaScript indicator or strategy
will generally share the same z-order as the script. Changes to that order must be done programmatically.

A classical rookie mistake (if you didn't lock your DrawObjects collection for new entries) is e.g. adding a new
object (at worst by hand during the runtime of the script) without programmatically checking - and readjusting if
necessary - the z-order of all your other objects.

If you really want to do the gruntwork and sort this out for your case, I'd recommend to start with the .NET
documentation on z-order.

Reply With Quote
 
  #4 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

z-order

Ok, I can research that...

Does z-order work only within an indicator, or can you set it globally across several indicators?

There are 3-4 indicators that create objects on a given toolbar.

Reply With Quote
 
  #5 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

samples?

" A classical rookie mistake (if you didn't lock your DrawObjects collection for new entries) is e.g. adding a new
object (at worst by hand during the runtime of the script) without programmatically checking - and readjusting if
necessary - the z-order of all your other objects."


The toolstrip controls are created during OnStartup.

The only objects created by hand are Ninja drawobjects.

Do you know of any code samples (in Futures IO) that show how to check and readjust the z-order of all other objects, as you mention?

Thanks

Reply With Quote
 
  #6 (permalink)
Market Wizard
Germany
 
Futures Experience: Intermediate
Platform: Other
Favorite Futures: ES, YM, 6E
 
Posts: 2,642 since Feb 2013
Thanks: 4,900 given, 6,435 received
Forum Reputation: Legendary


vantojo View Post
Ok, I can research that...

Does z-order work only within an indicator, or can you set it globally across several indicators?

There are 3-4 indicators that create objects on a given toolbar.

The z-order is FOR the indicator. This can cause additional problems if an indicator produces several
objects for the collection. If you want to be absolutely sure about the z-order for any of these outputs,
you will need to decompose the indicator into single output objects.

Reply With Quote
 
  #7 (permalink)
Market Wizard
Germany
 
Futures Experience: Intermediate
Platform: Other
Favorite Futures: ES, YM, 6E
 
Posts: 2,642 since Feb 2013
Thanks: 4,900 given, 6,435 received
Forum Reputation: Legendary


vantojo View Post
" A classical rookie mistake (if you didn't lock your DrawObjects collection for new entries) is e.g. adding a new
object (at worst by hand during the runtime of the script) without programmatically checking - and readjusting if
necessary - the z-order of all your other objects."


The toolstrip controls are created during OnStartup.

The only objects created by hand are Ninja drawobjects.

Do you know of any code samples (in Futures IO) that show how to check and readjust the z-order of all other objects, as you mention?

Thanks

The problem with the support of this feature for NT is that the order in which objects of your DrawObjects collection
are invoked are completely irrelevant for "the rest of the world". So NT only implements the method (publicly since
about 2009, I think - because they also need it for constructing the charts), but to the best of my knowledge, NT
neither documents this method nor gives significant examples.

Thus you will presumably find the best examples in the .NET documentation.

Reply With Quote
 
  #8 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

OK


choke35 View Post
The problem with the support of this feature for NT is that the order in which objects of your DrawObjects collection
are invoked are completely irrelevant for "the rest of the world". So NT only implements the method (publicly since
about 2009, I think - because they also need it for constructing the charts), but to the best of my knowledge, NT
neither documents this method nor gives significant examples.

Thus you will presumably find the best examples in the .NET documentation.

Ok, at the moment this is over my head. I'll live with it until I can do more research.

Thank you.

Reply With Quote
 
  #9 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

list order is changing

I just remembered, and verified this.....the above discussion might be so....but in the indicator list for the chart, the ORDER of the indicators is changing from what I entered.

And, then the toolbar matches the new order the next time the chart is loaded....so, while z-order may be important, I don't think it is causing this problem.

Something in Ninja is changing the order of the indicators in the list (Control I), perhaps when I shut Ninja down and it saves the Workspace (?), and then when the chart loads again, the order the indicators are loaded match the NEW list, which is not what I entered.

Any ideas?

When I asked Ninja before I didn't get any solution. Just "that is the way it works".

(this is NT7)

Reply With Quote
 
  #10 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

reload template


Then, if I reload the Chart Template, the list is correct, and the controls load the way I expect.

Reply With Quote

Reply



futures io > > > > > NT7 - Chart Indicators loading randomly

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
Converting C# Ninjatrader 7 Indicators to C++ Sierra Chart Indicators ? sandptrader Platforms and Indicators 6 November 10th, 2015 03:44 PM
NT7 asks if I want to replace indicators marketvoyager NinjaTrader Programming 3 November 7th, 2015 10:14 AM
Market Analyzer Indicators to Summarize Chart Indicators nirajkrishna The Elite Circle 5 March 18th, 2011 08:13 PM
Imcompatable indicators NT7.04 jsengxx NinjaTrader Programming 14 March 18th, 2011 02:51 PM
NT crashes "Error on loading chart" john924 NinjaTrader 7 September 7th, 2010 01:49 AM


All times are GMT -4. The time now is 04:24 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-13 in 0.13 seconds with 19 queries on phoenix via your IP 54.90.92.204