For example, variables are blue, functions are red, etc.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
About NinjaScript Source Code by Color
Collapse
X
-
Hello ラリー,
Thanks for your post.
No, NinjaTrader does not have any options available for changing the colors for certain pieces of code seen in the NinjaScript Editor window, such as blue for variables and red for functions.
Visual Studio has add-ons available that could be used to change the color of code when programming in the Visual Studio application. It would be up to you to locate, download, and use those Visual Studio add-ons as this goes beyond what we are able to provide support for.
You could consider downloading Visual Studio, selecting the 'Visual Studio' button in the NinjaScript Editor window to open the project in Visual Studio, and using Visual Studio for developing your NinjaScript indicators and strategies.
See this help guide page for more information about opening a NinjaScript in Visual Studio:https://ninjatrader.com/support/help..._debugging.htm
Note that if you decide to do this, you must make changes to the script in Visual Studio and then run a compile in the NinjaScript Editor window for changes to take effect.
Let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
ラリー You could always make a Skin (NT8 only) to your preferred settings: https://ninjatrader.com/support/help...r_own_skin.htm
I have done this for various NinjaScript Editor colours and it works very well. I just select my version of the skin and there it all is.
There may not be settings for specific types of elements you want, but many things are there.
Thanks.
Comment
-
NinjaTrader_BrandonH
Thank you for your reply.
I am seeing different source code etc. in my environment than the screenshot of the link you sent, why is this?
Comment
-
Hello ラリー,
Thanks for your note.
"I am seeing different source code etc. in my environment than the screenshot of the link you sent, why is this?"
The source code of the DMI indicator may have been modified by the development team between when the screenshot in the help guide was taken and the current release of NinjaTrader 8.
If you are running the most up-to-date version of NinjaTrader 8 (8.0.26.1) seen in the Help > About window of NinjaTrader 8 then these differences between your screenshot and the screenshot in the help guide can be ignored.
Let me know if I may assist further.
<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
NinjaTrader_BrandonH
Thank you for your reply.
I see that you did.
My version of Ninja trader seems to be the latest.
The screenshots I sent you before, I think they are separated by color, but what are the different types of colors (variables, functions, etc.) for each of them?
Comment
-
jeronymite
Thank you for your assistance.
Regarding your progress.
I am trying to create and open the BluePrint.xaml in the article you sent me, but do you mean to open it from ninja script or visual studios?
Comment
-
Hello ラリー,
Thanks for your note.
"I think they are separated by color, but what are the different types of colors (variables, functions, etc.) for each of them?"
Since this is Visual Studio and not NinjaTrader, I would not be able to determine what exactly each color means.
You could consider doing a quick Google search for something like 'Visual Studio syntax colors' to find information about the different syntax colors in Visual Studio.
"I am trying to create and open the BluePrint.xaml in the article you sent me, but do you mean to open it from ninja script or visual studios?"
You could open the BluePrint.xaml file in Visual Studio if you would like to modify it.
See this help guide page for information about creating your own skin: https://ninjatrader.com/support/help...r_own_skin.htm
Let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
We will keep you informed of our progress.
As for BluePrint, I was able to open it in Visual Studio.
Now, I would like to ask about the color of the Ninja script code, how is each of the screenshots I have attached color-coded?Since this is Visual Studio and not NinjaTrader, I would not be able to determine what exactly each color means.
You could consider doing a quick Google search for something like 'Visual Studio syntax colors' to find information about the different syntax colors in Visual Studio.
For example, I would like to know if the blue code is a variable or a function.Last edited by ラリー; 08-28-2022, 07:12 PM.
Comment
-
Hello ラリー,
Thanks for your note.
You could see what conditional colors are used for the NinjaScript Editor window around line 874 in the BluePrint.xaml file.
The cyan blue color will indicate a number, such as 14. The light blue color indicates a keyword. Strings will display as a darker blue color. Text will display as white.
Let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
Hello ラリー,
Thanks for your note.
Yes, keywords are reserved words. Class names and method names will also be light blue in color.
Text is considered anything that is not a number, string, or keyword and will display as white in color.
I would recommend creating a custom indicator or strategy using the NinjaScript Editor window and noting the color of the code as you create the indicator/strategy. For example, if you type in a number and see that it is cyan blue, this means all numbers will be cyan blue. If you add a method and see that it is light blue, then this would mean all methods are light blue. If you create a string and see that it is dark blue, this means all strings will be dark blue, etc.
Let me know if I may assist further.
<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
Thank you for your reply.
You mention that the text is white, but when I search the document linked below, I find a description of DMI (white) in the last 35 lines attached, and there is an article about DMI, but why is there no article about dmMinus (white) in the description in line 37?Text is considered anything that is not a number, string, or keyword and will display as white in color.
https://ninjatrader.com/support/help...o_read_fro.htm
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
85 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
47 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment