Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Tip: Using multi-line comments
Collapse
X
-
Hello balltrader,
No, the comments do not cause a performance hit and are not parsed by the computer.
http://stackoverflow.com/questions/1...ow-down-perfor
Leave a comment:
-
@NinjaTrader Chelsea, can you confirm if there is any performance hit from including long length comments in the script, or since the script is compiled, are the comment (qty and length) of no concern?
Leave a comment:
-
ha ha that is funny
no way do I expect you to recode all your scripts, who would pay for that? lol
i was just making a suggestion to coders, that if you are writing a multi-line comment, use the multiline comment style /* */
which is a different concept than if you are trying to quickly comment out a chunk of code using the toolbar buttons for testing / debugging
I am not requesting a feature change to the toolbar icon behavior onclick event. I can understand the purpose and utility of that.
thank you.
Leave a comment:
-
Hello balltrader,
The comments use double lines so that the NinjaScript editor can comment uncomment selected text. Using /* */ for a block of text makes this much more difficult.
You will find that many examples sent by our staff with multi-line comments will have the comment blocks instead of single line comments. However, our official samples will not.
Are you requesting that we recode all scripts be recoded to use comment blocks instead of single line comment marks?
If so, I will enter this as a feature request in your behalf. It is up to our development to decide if a feature request will be implemented and when.
Leave a comment:
-
Tip: Using multi-line comments
I was perplexed that most of the default sample scripts I have look at so far are using two forward slashes at the start of each line to mark a comment section.
Here is a tip:
If your comment will run on for multiple lines, write the comment likes this:
/*
hi
this
is
a
multiline
comment
*/
I'm not sure if the original comment method was an artifact from an earlier version of ninjascript.
I know one of the toolbar icons in the editor operates by inserting / removing double forward slashes in front of each selected line, maybe this could be updated in future version 8?
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
6 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
12 views
0 likes
|
Last Post Today, 02:00 AM | ||
Started by Mariawilcoxi, Today, 01:32 AM
|
0 responses
4 views
0 likes
|
Last Post
by Mariawilcoxi
Today, 01:32 AM
|
||
Started by gleichnerany, Today, 01:17 AM
|
0 responses
5 views
0 likes
|
Last Post
by gleichnerany
Today, 01:17 AM
|
||
Started by WHICKED, 03-27-2024, 12:33 PM
|
4 responses
47 views
0 likes
|
Last Post Today, 12:28 AM |
Leave a comment: