Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

About NinjaScript Source Code by Color

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Hello ラリー,

    Thanks for your note.

    If you are looking at the DMI indicator's code, DMI is the name of the indicator that comes default with NinjaTrader. DmMinus is a custom variable that was created in the DMI indicator script.

    There is documentation in the help guide on accessing the DMI indicator since it is an indicator that comes default with NinjaTrader. Since DmMinus is a custom variable used for calculations in the DMI indicator's code, it is not specifically documented.

    DMI Indicator: https://ninjatrader.com/support/help..._index_dmi.htm

    Let me know if I may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #17
      Thank you for your reply.

      Yes, I am looking at DM Iindicator.


      If you are looking at the DMI indicator's code, DMI is the name of the indicator that comes default with NinjaTrader. DmMinus is a custom variable that was created in the DMI indicator script.
      I understand that the white color is all text (including High, Low, etc.) and that there is a difference between documented and undocumented.
      Is it correct that all white is text (including High, Low, etc.)?

      Comment


        #18
        Hello ラリー,

        Thanks for your note.

        Yes, that is correct. Text in the NinjaScript Editor will be white in color, including High[0], Low[0]. Close[0], etc.

        Let me know if I may assist further.
        Brandon H.NinjaTrader Customer Service

        Comment


          #19
          Thank you for your reply.

          I am aware that all text (white) is a variable, but even if it is the same white color, is there a case where it is not a variable but a function or reserved word?

          Comment


            #20
            Hello,

            Not all white text is a variable.

            If you want to know how the NinjaScript Editor colorizes items, you can see the Documents\NinjaTrader8\templates\skins\YourSkin\Bl uePrint.xaml file and look at the colors associated with the NinjaScript Editor:

            Code:
             <!-- NinjaScript Editor -->
            
            <!-- Conditional text colors for the NinjaScript Editor -->
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorBackground" Color="#101010" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorCommentForeground" Color="#7B7466" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorCompilerErrorForeground" Color="DarkRed" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorIdentifierForeground" Color="#F0F0F0" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorIndentationLineForeground" Color="#363636" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorKeywordForeground" Color="LightBlue" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorLineNumbersBackground" Color="Black" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorLineNumbersForeground" Color="#E9E9E9" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorNumberForeground" Color="#22CDFF" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorStringForeground" Color="#0076EC" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorSyntaxErrorForeground" Color="Red" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorPlainTextForeground" Color="#F3F2F1" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorErrorGridBackgroundSelecte dTab" Color="Sienna" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorErrorGridBackgroundOtherTa b" Color="OrangeRed" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorCaretBrush" Color="White" />
            <SolidColorBrush po:Freeze="true" x:Key="NinjaScriptEditorCollapsibleRegionBackgroun d" Color="#232323" />
            If you are looking for additional information to understand the C# code and what each piece of code represents in C#, we would recommend utilizing publicly available C# resources so you can recognize these items when reading the code.

            JimNinjaTrader Customer Service

            Comment


              #21
              Thank you for your reply.

              Not all white text is a variable.
              Is there any way to tell if it is a variable or not within the ninja script editor?

              Comment


                #22
                Hello ラリー,

                Thanks for your note.

                Recognizing variables is a C# concept and in the Support department at NinjaTrader, it is against our policy to provide C# education.

                You could use external sources for learning how to recognize variables in C#. Below is a publicly available website where you could find C# educational materials.

                W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


                Let me know if I may assist further.
                Brandon H.NinjaTrader Customer Service

                Comment


                  #23
                  Thank you for your reply.

                  I will try to learn from the link you sent.
                  Thank you very much for your help.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Segwin, 05-07-2018, 02:15 PM
                  14 responses
                  1,788 views
                  0 likes
                  Last Post aligator  
                  Started by Jimmyk, 01-26-2018, 05:19 AM
                  6 responses
                  837 views
                  0 likes
                  Last Post emuns
                  by emuns
                   
                  Started by jxs_xrj, 01-12-2020, 09:49 AM
                  6 responses
                  3,293 views
                  1 like
                  Last Post jgualdronc  
                  Started by Touch-Ups, Today, 10:36 AM
                  0 responses
                  12 views
                  0 likes
                  Last Post Touch-Ups  
                  Started by geddyisodin, 04-25-2024, 05:20 AM
                  11 responses
                  62 views
                  0 likes
                  Last Post halgo_boulder  
                  Working...
                  X