Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
60 Instrument Test Update
Collapse
X
-
What I was expecting is that a "Set" indicator values call (for a newly closed bar) within a strategy would result in an "OnBarUpdate" call within the indicator for the same bar, wherein I could do some custom drawing. But instead (if in real time) the OnBarUpdate refers to the next bar, which does not yet have any set values.Originally posted by NinjaTrader_Josh View PostBars are not synced with each other. Whenever data comes in it will get a call for that bar series.
I guess the most general solution, when doing custom drawing in an indicator's OnBarUpdate, is to find the most recent bar with values set, and draw that bar (also making sure that it has a bar-specific label so that you don't create multiple drawings if OnBarUpdate is called more than once for the same bar). That approach should work for any instrument, in both real time and with historical data. Will try that tomorrow.
Comment
-
performance issue
Here's a performance issue I ran into when drawing lots of custom price bars via DrawLine:
Reloading my multi-instrument strategy takes an extra 30 to 60 seconds in the presence of such custom bars. However, if I first remove the bars using "Remove Drawing Objects" (which takes very little time to do), then this eliminates the extra 30 to 60 seconds to reload the script.
So, when reloading scripts, the NT code appears to be doing something very inefficient (time-consuming) when handling the removal of DrawLine objects, but this should be easy to fix in next version since doing a "Remove Drawing Objects" first eliminated the problem.
Comment
-
Great! The good news is that I don't see a performance hit in simply having a lot of DrawLine lines (fake price bars) in a chart, but only when they get cleaned up as part of a script reload.Originally posted by NinjaTrader_Dierk View PostThanks for your suggestion. We'll add it to the list of future considerations.
The 2 reasons I have for using such bars are:
- To force display of price bars to the top of the chart, above all other drawing (an issue others have also noted).
- To display price bars in indicator panels.
Perhaps a future version of NT can address these issues in a more efficient manner. With respect to custom price bars, I can use the "tick" style for the tick (close) of the bar, but there appears to be no way to have 2 values formatted to appear as the high and low of a price bar without drawing the bar myself. (This issue came up in an earlier discussion in which I described how TradeStation supports such a feature, allowing one to create custom price bars by assigning indicator values to styles corresponding to open, high, low, and/or close.)
Anyway, am making progress, and there's almost always a way to do what I need to do using NT.
Comment
-
panels as 2nd class citizens
Am continuing to make progress with the use of indicator panels to create secondary price plots in multi-instrument windows. A few limitations I've run into:
- panels don't respect the "AutoScale" flag, meaning that I have to add extra code to ensure that plotting is not done too far from the price plot; it would be helpful if AutoScale = false was respected within panels
- chart properties are not panel-specific (such as the option to plot horizontal price lines); it would be helpful if chart properties could be set on a panel by panel basis
- program-drawn objects are user-editable; it would be helpful if there was a flag to turn off such editing for program-drawn objects
A few other things about charts/windows that bug me:
- Why doesn't pressing the Close box present an alert asking if you really intend to close that window? Having the window disappear after accidentally pressing the Close box is a really, really, really bad thing!
- In Market Analysis windows there should be a way to manually reorder the list without having to delete and re-insert instruments. All of my MA lists have a preferred order, and the built-in re-ordering supported by pressing titles is useless to me.
- The y-axis of charts (price markers and horz. lines) is not always fully plotted if the plot contains lots of other indicator lines, some of which cause the price plot to not reach the top or bottom of the main panel. I've attached an image showing this. It's a fairly common bug - I see it at least once per day (i.e., some combination of plotting gets NT confused about plotting its y-axis markers).
Sorry if I've missed something with respect to the above points, but thought I should go ahead and report these few remaining issues.Last edited by greentrader; 09-14-2008, 07:45 AM.
Comment
-
1. Thank you for bringing this to our attention.
2. You could try plotting the lines manually from your indicators.
3. Thank you for the suggestion.
4. Thank you for your thoughts on this.
5. Thank you for the suggestion.
6. Looks like something to do with your AutoScale settings from the screenshot alone. Please check them. If you have a consistently reproducible scenario we can take a closer look.Josh P.NinjaTrader Customer Service
Comment
-
In some cases (as shown) half the markers are missing, and in other cases all of the markers are missing. The plot shown consists of several different indicators, some with AutoScale set true and others false. Not sure how one could mistakenly set an AutoScale option - either the indicator is meant to affect the plot scaling or not. Also, scrolling the plot to a different time will bring the price markers back, so this makes me think there is a bug in your price horz. marker/line plotting routine.Originally posted by NinjaTrader_Josh View Post6. Looks like something to do with your AutoScale settings from the screenshot alone. Please check them. If you have a consistently reproducible scenario we can take a closer look.
Hopefully I can come up with a simpler example (whenever the bug happens it's entirely "reproducible", but the examples I have are probably too complex to do you much good).
Thanks for the responses.
--------------
I've attached another example of the bug. This is really simple, with all the indicators shown, and all set to AutoScale = true. The window should be showing horz. markers/lines, and scrolling/dragging it back to an earlier time brings back the missing markers/lines.Last edited by greentrader; 09-15-2008, 11:31 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
601 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment