Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

converting indicator to strategy

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

    converting indicator to strategy

    PROBLEM: I have an "indicator" which does not plot anything in the sense of, say, the way an SMA does. My indicator draws and moves a wide variety of arrows at the currently forming candle on the chart indicating buy or sell points as price action develops during a session.. However, there is no single (or even multiple) numerical value that is available to read (like an SMA) to condition buying or selling. At the moment, the trader interprets the indicator's arrows arrows and must manually enter a multi-lot order on the DOM with multiple entry prices.

    I am unable to use the Strategy Wizard for this indicator because it does not publish something reference-able like the SMA does. Forcing the indicator to have some public DataSeries to contain a proxy for the arrow positions
    is hugely impractical due to the complexity of the logic which develops arrows and manages them.

    DESIRED SOLUTION: I would like the indicator to "push the button" on the DOM when it draws arrows it thinks are good rather than have the trader manually transfer the respective prices to a DOM in real time. The indicator should continue its current visible arrow plotting but additionally start up a DOM with a buy/sell price at the moment it thinks that a good trade is at hand. The DOM, of course would be preset with stop and target information.
    I did the seemingly obvious thing of putting AtmStrategyCreate(long parameter list) into the indicator code
    but get the message "AtmStrategyCreate does not exist in the current context.".

    Although I have made many successful strategies using the Strategy Wizard using standard indicators which publish continuous numeric values in DataSeries objects, the lack of a meaningful publishable continuous value of this indicator has stumped me. What are my options?
    1) Make a dummy strategy in the Strategy Wizard and copy/paste the entire 2000 lines of indicator code into it?
    2)Fiddle with "Using declarations" region of the indicator in some way?
    3)Both
    4)None of the above

    Thanks in advance for your tireless efforts to help guys like me.
    Roland

    #2
    Roland, for the AtmStrategyCreate() you would need to work in a strategy correct, it could for sure draw your arrows as well.

    To see a complete working sample of this functionality you can refer to the 'SampleAtmStrategy' we provide per default with every NT install.

    With NT7 you could access the draw objects collection and thus generate trades directly with the values gathered - http://www.ninjatrader.com/support/h...drawobject.htm

    Comment


      #3
      converting indicator to strategy

      Bertrand:
      Thanks for very prompt reply. I will do as you suggest.
      Using the outline of the sample ATM strategy, I will fold in all the indicator code (version 6.5) and give it a go.
      I'll keep this thread updated if any new problems arise.
      Thanks again.

      Comment


        #4
        Indicator to ATM Strategy - Getting error on ADD(new Plot(...

        OK, I moved all the indicator code into the Sample Strategy.
        But got "The type of namespace name "Plot" could not be found.(are you missing a using directive)
        and "PlotStyle" does not exist in the current context
        and so forth about all the Add(newPlot lines.
        What's missing?
        Can't tell yet if there are other complaints.

        Comment


          #5
          Roland, you could unfortunately not Plot directly from a strategy, so you would need to remove those lines.

          Comment


            #6
            Indicator to ATM Strategy - missing parameters

            Yes, unfortunate about not being able to use Plot. Just have to separate that part out and run in a parallel indicator. But Draw line seems to work.

            New Question. The original indicator had some special parameters separated out under a "Category" called "Display Aids" They were physically coded after the Category called "Parameters" in the Properties region. These are not showing up in the strategy.. How can I get these to appear in the User Gui?

            Comment


              #7
              Roland, can you please post the code you're using so we can see what could be going on?
              AustinNinjaTrader Customer Service

              Comment


                #8
                converting indicator to strategy

                Attached in an excerpted file which illustrates the problem. When used as a strategy the adjustable parameters in the
                PROPERTIES REGION which are not in the Parameters" category do not show up in the user Gui. They do show up when used this way in the original indicator.
                Thanks for your help in advance.
                Attached Files

                Comment


                  #9
                  roland, are you using NT6.5 or NT7? I fixed two lines so it would compile on my NT7, and as far as I can tell, it looks like the additional parameters are present.
                  Attached Files
                  AustinNinjaTrader Customer Service

                  Comment


                    #10
                    converting indicator to strategy

                    Using Ninja 6.5. What are the 2 lines?

                    Comment


                      #11
                      Roland, unfortunately I'm not sure I follow : the file compiled well on my 6.5 and I believe it showed all parameters - which ones are you missing? I believe Austin was referring to changing Category to GridCategory to make it work on his NT7.

                      Comment


                        #12
                        converting indicator to strategy

                        Yes the sample does compile in 6.5. However, in the Properties region, parameters marked as Category "Debug Aids" or "Display Aids" or "Adaptive Parameters" do not show up in the GUI. They are all near the end of the Properties region.

                        Comment


                          #13
                          You run unfortunately into an expected limitation for the property categories with NT 6.5 - we have improved support for it in our NT7.

                          Comment


                            #14
                            converting indicator to strategy

                            Inability to separate out parameter types in 6.5 is definitely an unfortunate limitation..
                            But here are some compromises - Is there a way to add to some of the "categories" that are already there, for example, "General" or "order Handling"? Also is there a way to pick up the value of existing sub parameters if set by the user, such as "Time in Force" or "default quantity" in "Order Properties"

                            Comment


                              #15
                              Helllo roland_nt,

                              You can specify your own categories in version 7, but cannot add to the system categories.

                              Yes, you can check for values assigned to those properties.

                              if (TimeInForce == TimeInForce.Day)

                              if (DefaultQuantity == 1)
                              Ryan M.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              650 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              370 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              109 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              574 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              577 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X