Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Code folders decomposition

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

    Code folders decomposition

    Currently, there only 2 places (folder Indicators or Strategy),
    where can put common code for working with dates, files, utilities...

    There is always a problem, where to put the some general routines,
    that are not related to any strategy nor indicator.

    When I am implementing some utility class for working with dates,
    do I have to put inti Indicator folder or into Strategy folder?

    The folder structure should be decomposed better and include
    something like Shared folder, where we can put all the codes,
    that are not logically linked with any Strategy or Indicator.

    #2
    Originally posted by misova View Post
    Currently, there only 2 places (folder Indicators or Strategy),
    where can put common code for working with dates, files, utilities...

    There is always a problem, where to put the some general routines,
    that are not related to any strategy nor indicator.

    When I am implementing some utility class for working with dates,
    do I have to put inti Indicator folder or into Strategy folder?

    The folder structure should be decomposed better and include
    something like Shared folder, where we can put all the codes,
    that are not logically linked with any Strategy or Indicator.
    Place it in Indicators and make it static. That way, you do need an object instance before you can access the construct.

    Comment


      #3
      Hello misova,

      Thank you for your post.

      The next major release will improve upon several aspects of NinjaScript. You can view the enhanced features list at the following link: http://www.ninjatrader.com/downloads...njaTrader8.pdf

      Please let me know if you have any questions.

      Comment


        #4
        I have read all improvement in the PDF quickly,
        but could not find any concrete improvement related
        to the structure of the codebase.

        Am I missing something in the PDF file?


        Originally posted by NinjaTrader_PatrickH View Post
        Hello misova,

        Thank you for your post.

        The next major release will improve upon several aspects of NinjaScript. You can view the enhanced features list at the following link: http://www.ninjatrader.com/downloads...njaTrader8.pdf

        Please let me know if you have any questions.

        Comment


          #5
          Originally posted by koganam View Post
          Place it in Indicators and make it static. That way, you do need an object instance before you can access the construct.
          Thankx,

          Currently I am doing it the same way as you suggested and it works.
          It is easy to handle this issue with workaround - I just don't like it, because it is so ugly
          to put things into the Indicator folder and use it in context of strategies and vice-versa.

          When the logical structure is missing, it is very unprofessional and also harder to maintain.
          Systematic solution is easy, so let's improve in the future.

          Comment


            #6
            Originally posted by misova View Post
            Thankx,

            Currently I am doing it the same way as you suggested and it works.
            It is easy to handle this issue with workaround - I just don't like it, because it is so ugly
            to put things into the Indicator folder and use it in context of strategies and vice-versa.

            When the logical structure is missing, it is very unprofessional and also harder to maintain.
            Systematic solution is easy, so let's improve in the future.
            Not really. Indicators are the primary user class, and can be contained and referenced by strategies. Whereas indicators are not exactly a subclass, strategies and indicators cannot reference strategies, so holding most things that have to do with both classes in the indicators folder is kind of logical.

            That having been said, I agree with you that a "common" folder is much neater.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by gemify, 11-11-2022, 11:52 AM
            6 responses
            803 views
            2 likes
            Last Post ultls
            by ultls
             
            Started by ScottWalsh, Today, 04:52 PM
            0 responses
            3 views
            0 likes
            Last Post ScottWalsh  
            Started by ScottWalsh, Today, 04:29 PM
            0 responses
            7 views
            0 likes
            Last Post ScottWalsh  
            Started by rtwave, 04-12-2024, 09:30 AM
            2 responses
            22 views
            0 likes
            Last Post rtwave
            by rtwave
             
            Started by tsantospinto, 04-12-2024, 07:04 PM
            5 responses
            70 views
            0 likes
            Last Post tsantospinto  
            Working...
            X