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!
See more
See less

Partner 728x90

Collapse

How to Fold up Code in Editor

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

    How to Fold up Code in Editor

    How can I fold a section of code so that it is out of view unless I press the plus button in the line number area, similar to the way that variables and properties is by default?

    Is it possible to undo this default behavior for the variables section, so it is always visible?

    #2
    You can set up a region of your own
    #region MyRegion
    //Code here
    #endregion
    Then you can fold or unfold it like the Variables or Properties regions
    If you don't want the editor to fold Variables region you can comment out the beginning and ending tags. The NT editor does fold all regions though automatically, and I've never found away to prevent it. However I use Visual Studio for all my coding anyway.

    VT

    Comment


      #3
      Hi , thanks for your post. I have done that for collapse code, and its works, but every time that I reload de code (program), the code is not collapse.
      Could you help me.
      Thanks

      Comment


        #4
        Welcome to our forums aruizname, you work in a NS strategy here, correct?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Yes. Is a program in NinjaScript. That now is growing and growing¡¡¡
          Thanks

          Comment


            #6
            No, what I meant was it's a strategy file and not an indicator in NinjaScript? Those would be separated and for Strategies we would expect that behavior of your custom regions unfortunately.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Is a strategy. By the way, there is some metod, to "separate code", that is tested in a kind of "subprogram", to be more efficient. Is difficult to manage a program with more than 2000 lines¡¡¡
              Sure than the advanced programmers, have some way to solve this matter.

              Thanks again

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by junkone, Today, 11:37 AM
              0 responses
              0 views
              0 likes
              Last Post junkone
              by junkone
               
              Started by quantismo, 04-17-2024, 05:13 PM
              5 responses
              33 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by proptrade13, Today, 11:06 AM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by love2code2trade, 04-17-2024, 01:45 PM
              4 responses
              34 views
              0 likes
              Last Post love2code2trade  
              Started by cls71, Today, 04:45 AM
              2 responses
              10 views
              0 likes
              Last Post eDanny
              by eDanny
               
              Working...
              X