Jack
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Print not a static method
Collapse
X
-
Print not a static method
Why is the NinjaTrader Print apparently not a static method in the Strategy namespace? I have a private class in a strategy, and the compiler complains if I put a Print statement in a method in the class - although I can put a Log statement in the method and the compiler does not complain. Even during debugging I would prefer not to clutter up the log window more than it already is.
JackTags: None
-
Hello,
Thank you for the question.
The Print method is an inherited method of Strategy or Indicator types, outside of these types Print does not exist as you have mentioned it is not static.
NinjaTrader 7 was not originally intended to edit other types besides Indicator or Strategy so there is really not a specific use case in NT7 for having int static. Going forward this was taken into account in NT8 and now there is a Output.Process method which is static.
Unfortunately in NT7 to utilize a print in a custom class, you would likely also need to pass the instance of the indicator or strategy to the class so you can access its public methods.
for NT8, you could see this documentation regarding the new forms of debugging: http://ninjatrader.com/support/helpG...output.process
Please let me know if I may be of further assistance.Last edited by NinjaTrader_Jesse; 05-09-2016, 12:21 PM.JesseNinjaTrader Customer Service
-
Apologies, I neglected to mention I am using NT8. I do not find any documentation for Output.Process, and the compiler complains that the name Output does not exist in the current context (custom Strategy in NT8 which otherwise compiles).
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kevinenergy, 02-17-2023, 12:42 PM
|
116 responses
2,757 views
1 like
|
Last Post
by kevinenergy
Today, 07:23 AM
|
||
Started by franatas, 12-04-2023, 03:43 AM
|
7 responses
106 views
0 likes
|
Last Post Today, 07:23 AM | ||
Started by jpapa, Today, 07:22 AM
|
0 responses
3 views
0 likes
|
Last Post
by jpapa
Today, 07:22 AM
|
||
Started by Jltarrau, Today, 05:57 AM
|
3 responses
8 views
0 likes
|
Last Post
by Jltarrau
Today, 07:22 AM
|
||
Started by f.saeidi, Today, 05:56 AM
|
2 responses
8 views
0 likes
|
Last Post Today, 07:17 AM |
Comment