NexusFi: Find Your Edge


Home Menu

 





Ninja Script Print command fails to show on chart.


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one TheGaryGuy with 5 posts (1 thanks)
    2. looks_two MrYou with 1 posts (0 thanks)
    3. looks_3 Zondor with 1 posts (1 thanks)
    4. looks_4 dmh24 with 1 posts (1 thanks)
    1. trending_up 3,600 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 7 posts
    2. attach_file 0 attachments




 
Search this Thread

Ninja Script Print command fails to show on chart.

  #1 (permalink)
 TheGaryGuy 
Bellevue, WA/USA
 
Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeri
Broker: ThinkOrSwim, TastyWorks.com, TDAmeritrade, Interactive Brokers (soon)
Trading: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
Posts: 33 since Oct 2012
Thanks Given: 47
Thanks Received: 26

I am trying to use the Print(variable); command in a strategy... DrawDot works and shows on the screen.. but no variable or text will show with the Print. Any idea where the printed output is supposed to show up or how to get it to show up on the chart?
(I need this for debugging code).

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
55 thanks
NexusFi site changelog and issues/problem reporting
48 thanks
What percentage per day is possible? [Poll]
31 thanks
GFIs1 1 DAX trade per day journal
29 thanks

  #2 (permalink)
 
MrYou's Avatar
 MrYou 
NC, USA
 
Experience: None
Platform: None Yet
Trading: Guitar
Posts: 403 since Jun 2011
Thanks Given: 618
Thanks Received: 196

RTFM:

"Print()

Definition

Prints data to the NinjaTrader output window."


Output Window = Control Center -> Tools -> Output Window...

Reply With Quote
  #3 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731


The methods DrawText() and DrawTextFixed(), described in the Ninjatrader Help, will do what you are requesting.

The Print statement is generally used to print diagnostic statements useful for code development.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to Zondor for this post:
  #4 (permalink)
 TheGaryGuy 
Bellevue, WA/USA
 
Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeri
Broker: ThinkOrSwim, TastyWorks.com, TDAmeritrade, Interactive Brokers (soon)
Trading: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
Posts: 33 since Oct 2012
Thanks Given: 47
Thanks Received: 26

Thanks for pointing me in the right direction!

Started this thread Reply With Quote
  #5 (permalink)
 TheGaryGuy 
Bellevue, WA/USA
 
Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeri
Broker: ThinkOrSwim, TastyWorks.com, TDAmeritrade, Interactive Brokers (soon)
Trading: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
Posts: 33 since Oct 2012
Thanks Given: 47
Thanks Received: 26

Normally I would say thank you for your rapid response to my simple question but not this time.

I have worked in computer technical support for over 40 years... and one reply to a customer with "RTFM" in it would get me fired at any company I have worked for. Yes, it is OK to think it, but not say it.

I had found the definition of the print command in help, but no description of the window it was to display in. Perhaps you should think back to when you were a new user and didn't know this "non-intuitive platform"... this is my first question on my first actual ninja script program.

So the final result is "YOU ARE FIRED". Please don't respond to any of my questions in the future as I really don't want to put you to any "trouble". And yes, I try to use help and "the non existent" manual before I ask any question.

Response was timely at least.

Sincerely, Gary



MrYou View Post
RTFM:

"Print()

Definition

Prints data to the NinjaTrader output window."


Output Window = Control Center -> Tools -> Output Window...


Started this thread Reply With Quote
The following user says Thank You to TheGaryGuy for this post:
  #6 (permalink)
 TheGaryGuy 
Bellevue, WA/USA
 
Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeri
Broker: ThinkOrSwim, TastyWorks.com, TDAmeritrade, Interactive Brokers (soon)
Trading: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
Posts: 33 since Oct 2012
Thanks Given: 47
Thanks Received: 26


Zondor View Post
The methods DrawText() and DrawTextFixed(), described in the Ninjatrader Help, will do what you are requesting.

The Print statement is generally used to print diagnostic statements useful for code development.

Zondor: Thank you again and you are right the print statement (and having the output window up so you can see the results of your calculations (or anything) is great.

One word of warning however for those who have not experienced this: I have learned that running code with the print() commands active in the optimizer will hang NinjaTrader! It keeps calling for more and more memory and finally there is none to be had. BEWARE Print() when Optimizing!

Started this thread Reply With Quote
  #7 (permalink)
 dmh24 
Denver, CO
 
Experience: Advanced
Platform: SierraChart
Broker: Optimus, Rithmic
Trading: ES
Posts: 67 since Sep 2011
Thanks Given: 6
Thanks Received: 34


TheGaryGuy View Post
And yes, I try to use help and "the non existent" manual before I ask any question.

here is the online version of "the non existent" manual: NinjaTrader Version 7
and here is a handy PDF in case you want to easily search in one place: https://ninjatrader.com/support/helpGuides/nt7/pdf/NinjaTraderVersion7HelpGuide.pdf

Reply With Quote
The following user says Thank You to dmh24 for this post:
  #8 (permalink)
 TheGaryGuy 
Bellevue, WA/USA
 
Experience: Advanced
Platform: NinjaTrader, TOS, TDAmeri
Broker: ThinkOrSwim, TastyWorks.com, TDAmeritrade, Interactive Brokers (soon)
Trading: Index and Stock options, Stocks (seldom), Nadex (just starting), Forex
Posts: 33 since Oct 2012
Thanks Given: 47
Thanks Received: 26


dmh24 View Post
here is the online version of "the non existent" manual: NinjaTrader Version 7
and here is a handy PDF in case you want to easily search in one place: https://ninjatrader.com/support/helpGuides/nt7/pdf/NinjaTraderVersion7HelpGuide.pdf

Thanks for this link! I really needed the PDF so i can read and mark it up like any reference book. Using the online version (for me) is like trying to filter the ocean through a straw.

Started this thread Reply With Quote





Last Updated on January 22, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts