Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Converting Strategy to Indicator

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

    Converting Strategy to Indicator

    Hello!

    I had to use Strategy Builder to build an indicator and now I want to copy and paste it over from Strategy to Indicator, probably based on this old post: https://ninjatrader.com/support/foru...y-to-indicator

    Since that post is over a decade old and I'm doing this in NT8, can you help me determine which part(s) at the top of the script that I need to swap out? I know there's no guarantee, but I just need a place to start.

    Thanks


    #2
    Hello chartchart,

    Thanks for your post.

    I recommend that you review the strategy inputs and then use the Ninjascript indicator wizard to create the basic indicator structure needed. The wizard will ask for the inputs so rather than copying them over it would be better for the wizard to set them up for you.

    Once completed you can then compare the code structure between the strategy and the blank indicator and copy over the code within the OnBarUpdate(). It is possible that you may need to copy over other parts but there is no uniform or step by step that we can advise to do this. It helps to have an understanding of C# progrmming language.

    You will create errors and will have to address these errors as you go, starting with the top listed error. Once the error is fixed, recompile and check for the next error. Eventually, you should be error-free.

    References:




    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello chartchart,

      Thanks for your post.

      I recommend that you review the strategy inputs and then use the Ninjascript indicator wizard to create the basic indicator structure needed. The wizard will ask for the inputs so rather than copying them over it would be better for the wizard to set them up for you.

      Once completed you can then compare the code structure between the strategy and the blank indicator and copy over the code within the OnBarUpdate(). It is possible that you may need to copy over other parts but there is no uniform or step by step that we can advise to do this. It helps to have an understanding of C# progrmming language.

      You will create errors and will have to address these errors as you go, starting with the top listed error. Once the error is fixed, recompile and check for the next error. Eventually, you should be error-free.

      References:



      How about NinjaTrader adding an "Indicator Builder" next to the Strategy Builder under the Account->New tab?

      Comment


        #4
        Hello MosesMelee,

        Thank you for your suggestion.

        If you would like, I can submit a feature request for this on your behalf.
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Gaby View Post
          Hello MosesMelee,

          Thank you for your suggestion.

          If you would like, I can submit a feature request for this on your behalf.

          Gaby,

          He is one lonely vote of support for a feature request to include an Indicator Builder in future versions as suggested by MosesMelee.

          For non-programmers it is very difficult to work through the errors generated when converting a strategy to an indicator. Student programmers like myself can also have a tough time.

          An Indicator Builder shouldn't be difficult to code using snippets from the Strategy Builder. It would be one more step toward making the platform user friendly.

          Thanks

          Comment


            #6
            Hello,

            I will add your vote to this feature request.
            Gaby V.NinjaTrader Customer Service

            Comment


              #7
              Please add my vote for an indicator builder too.

              Comment


                #8



                chartchart,



                i have been able to create indicators that replicate my strategies to perfection. check out my posts, i think i shared the code in the corresponding threads.


                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by nize786, Today, 12:40 PM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by timwey, Today, 10:55 AM
                3 responses
                16 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by ARobotPolisher, 09-19-2024, 08:02 AM
                3 responses
                33 views
                0 likes
                Last Post Sam2515
                by Sam2515
                 
                Started by samish18, 08-30-2024, 03:10 PM
                43 responses
                312 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by indy73, 02-13-2019, 10:09 PM
                14 responses
                1,295 views
                0 likes
                Last Post Chaos05
                by Chaos05
                 
                Working...
                X