![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2006
Location: Ferrara, , Italy
Posts: 138
Thanks: 0
Thanked 0 times in 0 posts
|
Hi all,
nt6 does provide something like "expert commentary" of ts? Thanks M |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
What's that,I am not familiar with this feature.
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2005
Location: , ,
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
|
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] |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Nov 2006
Location: Ferrara, , Italy
Posts: 138
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#6 |
|
Member
Join Date: Oct 2009
Posts: 64
Thanks: 9
Thanked 5 times in 4 posts
|
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 |
|
|
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Member
Join Date: Oct 2009
Posts: 64
Thanks: 9
Thanked 5 times in 4 posts
|
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 |
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#10 | |
|
Senior Member
Join Date: Oct 2009
Location: Australia
Posts: 108
Thanks: 2
Thanked 14 times in 7 posts
|
Quote:
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 |
|
|
|
|
|
|
#11 |
|
Member
Join Date: Oct 2009
Posts: 64
Thanks: 9
Thanked 5 times in 4 posts
|
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. |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Oct 2009
Location: Australia
Posts: 108
Thanks: 2
Thanked 14 times in 7 posts
|
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 |
|
|
|
|
|
#13 |
|
Member
Join Date: Jan 2010
Posts: 65
Thanks: 0
Thanked 0 times in 0 posts
|
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.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|