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

MAKE strategy into an indicator?

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

    MAKE strategy into an indicator?

    If this has already been answered somewhere, please direct me. Thank you. I have a strategy that I would like to make into an indicator. Is this possible? I have an AUTO strategy that works by itself. I would like to make this into an indicator so that I can use it in real time. Does that make sense? If so, am I able to do this? How?

    Thank you,
    bubbadirect

    #2
    Hello bubbadirect,

    Both indicators and strategies can be used in real time. If your strategy actually submits orders through methods like EnterLong(), then it cannot be turned into to an indicator. Order placement is exclusive to strategies.

    If your strategy is only used for alerting, messaging, or drawing, then it could be translated to an indicator, and the same code can be used in both.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by bubbadirect View Post
      If this has already been answered somewhere, please direct me. Thank you. I have a strategy that I would like to make into an indicator. Is this possible? I have an AUTO strategy that works by itself. I would like to make this into an indicator so that I can use it in real time. Does that make sense? If so, am I able to do this? How?

      Thank you,
      bubbadirect
      You will have to create a new indicator and copy your code logic into it. Then remove or substitute any methods that are "Strategy" only methods.

      Comment


        #4
        okay thank you! there is an info.xml file, a .cs file, and 2 dll files (one is a .x64.dll and the other is a .x86.dll) So I just copy the .cs file into the new indicator file then? Is this what you mean?

        Thanks again,
        bubbadirect

        Comment


          #5
          THIS line? // This namespace holds all strategies and is required. Do not change it.
          AND THIS ONE? public partial class Strategy : StrategyBase

          Comment


            #6
            No, you are working with a custom assembly. This means the source code is not available for you to view or edit, and you cannot transfer this to an indicator without it.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Thank you RYAN. So am I stuck then? :-(

              Comment


                #8
                You don't have access to the source code, so you can only use the strategy in NinjaTrader. This is how the author of your strategy intended to distribute the file. If you desire the source code you would need to request it from them, but it's their intellectual property and they're under no obligation to provide.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #9
                  okay thank you

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by judysamnt7, 03-13-2023, 09:11 AM
                  4 responses
                  55 views
                  0 likes
                  Last Post DynamicTest  
                  Started by ScottWalsh, Today, 06:52 PM
                  4 responses
                  35 views
                  0 likes
                  Last Post ScottWalsh  
                  Started by olisav57, Today, 07:39 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post olisav57  
                  Started by trilliantrader, Today, 03:01 PM
                  2 responses
                  19 views
                  0 likes
                  Last Post helpwanted  
                  Started by cre8able, Today, 07:24 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post cre8able  
                  Working...
                  X