NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 01-12-2007, 03:40 AM   #1
MrBaffalo
Senior Member
 
Join Date: Nov 2006
Location: Ferrara, , Italy
Posts: 138
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Hi all,

nt6 does provide something like "expert commentary" of ts?

Thanks

M
MrBaffalo is offline  
Reply With Quote
Old 01-12-2007, 04:17 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

What's that,I am not familiar with this feature.


Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 01-15-2007, 07:45 AM   #3
tquinn
Senior Member
 
Join Date: Jan 2005
Location: , ,
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Ray,
I believe this is the Tool used by "Experts" to add their commentary to an indicator or strategy, to explain why it does things. Concieved as a trading learning tool I believe.

From TS help,
[line]
About the Analysis Commentary Window

The Analysis Commentary window is a pop-up window that can be used by an analysis technique or strategy to display text, numeric, and true-false values for a selected bar on a chart. When an analysis technique or strategy containing an EasyLanguage Commentary statement is applied to a chart, the Analysis Commentary icon becomes active on the toolbar. Once active, you click on any bar to display the Analysis Commentary pop-up window.
[line]

tquinn is offline  
Reply With Quote
Old 01-15-2007, 09:04 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

Thanksfor the clarification Tom -

NT6 does not support this although one could subsitute straight text on the chart. Will add to our list of features for futureconsideration.

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 01-15-2007, 10:11 PM   #5
MrBaffalo
Senior Member
 
Join Date: Nov 2006
Location: Ferrara, , Italy
Posts: 138
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I'm back today...sorry for my delay.

Expert is just similar to an output window in which you can have all values of variable writte to text and numbers. I find it very very useful debugging indicators and systems.

Thanks

Marce
MrBaffalo is offline  
Reply With Quote
Old 11-15-2009, 01:09 PM   #6
tickling
Member
 
Join Date: Oct 2009
Posts: 64
Thanks: 9
Thanked 5 times in 4 posts
Thumbs down

NT staff:

Is such a feature or similar in NT7 by any chance ? Alternatively, is it somehow possible to add some free text to the data box that would change bar by bar ? Thanks
tickling is offline  
Reply With Quote
Old 11-16-2009, 07:33 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

tickling, welcome to our forums! While there's no build in expert commentary feature, you could for exmple work with the DrawText / DrawTextFixed methods from your indicator or strategy for this to be shown on the charts.

http://www.ninjatrader-support.com/H.../DrawText.html

http://www.ninjatrader-support.com/H...TextFixed.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 11-18-2009, 04:51 AM   #8
tickling
Member
 
Join Date: Oct 2009
Posts: 64
Thanks: 9
Thanked 5 times in 4 posts
Default

Thanks.

Unfortunately this would only display text output for the last calculated bar.

Bar by bar user defined text commentary as in Tradestation is actually a very useful feature for debugging and researching complex indicators and you may want to consider it. Probably not a lot of hassle to implement.

In the mean time , is it possible to show a user defined text in the databox per bar ? I constructed such a function and it resulted in the string "dummy" printed in the data box. Can this be accessed ?

Is it possible to change a Plot name each bar ? I thought of having a dummy plot that shows on the data box and then change its name in the bar update event handler. Is that possible ?

Regards
tickling is offline  
Reply With Quote
Old 11-18-2009, 07:02 AM   #9
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

tickling, unfortunately this is not supported - only Plots and their values would be shown in the databox - to debug we normally advise using Print() statements and then reviewing the info in the output window.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 11-18-2009, 11:43 PM   #10
David Lean
Senior Member
 
Join Date: Oct 2009
Location: Australia
Posts: 108
Thanks: 2
Thanked 14 times in 7 posts
Red face Draw Text could work, but Alerts are closer.

Quote:
Originally Posted by tickling View Post
Thanks.
Unfortunately this would only display text output for the last calculated bar.
This statement is not true.
1. It is possible to put as much text as you want all over the chart (&/or in a different panel) As each has a different tag you could leave or remove them as you desire.

That said I've very familiar with both TS Experts & those found in Metastock (which are even better). Clearly putting text on the screen sucks by comparision as you lack the screen real-estate for any meaningful insight.

At may be possible to put a button in a chart, which when you click opens a form which you post your Analysis into. But you'd want to be quite proficient at .NET as there are no methods to assist you & that really unsupported.

Using the Output window is also lame. It is OK for debugging but you lack control; you can't delete anything, you can't link to the context of the bar the user is looking at, it is just a chronoligical list of Print statements.

Using the Alerts feature, may be the closest option you have. On the appropriate bar, you raise an Alert with a message. It can make a sound & your text can tell the trader what to do. I'm not sure what the char limit is on the text is, but you only get 1 line.

Perhaps something for Ninja 7.5
David Lean is offline  
Reply With Quote
Old 11-19-2009, 04:13 AM   #11
tickling
Member
 
Join Date: Oct 2009
Posts: 64
Thanks: 9
Thanked 5 times in 4 posts
Default

Thanks David. I think the alerts is probably the closest I can get as it gives access to bar information.

I have seen a thread here that demonstrates a custom mouse button event handler. Using that to print in the output window could have done a part of the trick but I could not find an easy way to know which bar was clicked and to access previous bars. And of course this does not solve the real estate problem

I am very new to Ninja and so far I like it a lot. I am not sure how things work around here, but I am positive that anyone who developed code for Tradestation and used this feature - for development, for debug or for production finished stuff - just cant live without it. Maybe others can voice their views here.
tickling is offline  
Reply With Quote
Old 11-19-2009, 05:43 AM   #12
David Lean
Senior Member
 
Join Date: Oct 2009
Location: Australia
Posts: 108
Thanks: 2
Thanked 14 times in 7 posts
Default

I've used & programmed indicators for Metastock, OmniTrader, NinjaTrader, TradeStation, Hot Trader & quite a few more. Each has capabilities that I wish were in the others.

Some, like Metastock & TradeStation are rich with end user features, have their own proprietary language (EasyLanguage & MSL) & dev environment. They are great as long as you only want to do what they let you do. Beyond that you are dealing with legacy languages & interfaces like C++ & COM. You are still constrained by the API's they offer & the nightmare of debugging COM reference issues.
OmniTrader Professional is much easier to create black box systems, is extremely advanced, with sophisticated AI, Data Mining & advanced visualisations. It is brilliant at scanning the whole market, less great at developing an indicator for trading 1 market. And its Real-Time experience falls short, stopping at 1 min bars. Its programming experience is good & very modern. You can extend it via a subset of .NET.
Ninja's strength is in real time. It is not as full featured as its competitors that have been around for 15 years. But that is also its strength. Minimal legacy baggage. Extremely fast & able to do anything in .NET.

TO answer your "what bar was clicked" comment. It is pretty easy to use .NET to do Hit-Testing. You could write an extension to track MouseMove events, map them to the X values of a bar & know what bar was clicked. If you are keen you could also do hit testing on the lines of every indicator & do something funky with that. These hit-test algorithms are common-place & can be found on the Microsoft MSDN site.

But given that v7.0 is just around the corner I'd wait. I'm pleased that it is possible to program these types of extensions into Ninja. It gives us the option to completely solve our problems if Ninja were slack. But, they seem to be quite responsive. My first approach would be to request Ninja to extend UI to provide Alerts. As they design the spec for v7.5 maybe they will consider it.

In short: You get used to it, even though Tradestation debug environment is richer. Tradestation is really poor compared to Visual Studio 2008. That is what I miss. Everything is relative. And most things improve if you give them the right feedback.
Good luck
David Lean is offline  
Reply With Quote
Old 01-14-2010, 02:04 AM   #13
Light
Member
 
Join Date: Jan 2010
Posts: 65
Thanks: 0
Thanked 0 times in 0 posts
Default

I have found TS's Commentary Window to be an excellent tool -- one of the best features of their platform -- and not just for debugging. For large programs with numerous input variables, the ability to click on a bar and see output showing the state of the program on that bar is crucial to understanding complex settings and making good choices with them. In complex systems, a commentary window can indeed act as the in-program "expert," both for program authors and for end users. This option would be very high on my list of most favored improvements to Ninja.
Last edited by Light; 01-14-2010 at 02:07 AM.
Light is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:50 AM.