Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Make indicator usable by strategy wizzard

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

    Make indicator usable by strategy wizzard

    Hi,

    I have some indicator that I want to use to build strategy using the strategy wizard. However, I can't see the indicator in the list.

    I have access to the source code. Can I modify the source code to make the indicator usable by the strategy wizard? What do I need to do to make that happen?

    Thanks,
    Hong

    #2
    Hello hongchen2000,

    All custom and system indicators will be avaialble from the strategy wizard.

    Can you see this indicator listed under Tools--> Edit NinjaScript--> Indicator?

    Have you recently compiled your indicators? If you have not, please try compiling and then checking for this indicator in the Strategy Analyzer.
    MatthewNinjaTrader Product Management

    Comment


      #3
      I can see the indicator under Tools--> Edit NinjaScript--> Indicator. I can also open it and edit it. I also click the compile button, as you suggested. However, I still can't see it in the "condition builder" when I try to edit a strategy.

      Is there anything special that I need to do? I also try change the "browsable" for the dataSeries to true but no use.

      I am new to NinjaScript. So maybe there is something obvious that need to set?

      Thanks,
      Hong

      Comment


        #4
        Hong,

        Does this indicator show up from the chart if you right click on the chart--> select "Indicators"?

        Does this indicator have any public plots?

        Do you have any issues with any other custom indicators?
        MatthewNinjaTrader Product Management

        Comment


          #5
          Yes. This indicator show up from the chart if you right click on the chart--> select "Indicators"?

          Yes. It has define some plots:


          [Browsable(false), XmlIgnore] public DataSeries SellStopLine { get { return Values[0]; } } //Sell stop line
          [Browsable(false), XmlIgnore] public DataSeries BuyStopLine { get { return Values[1]; } } //Buy stop line

          Also, the data plots good on the chart and I can see its value in the info box.

          Hong

          Comment


            #6
            Hong,

            I tested that snippet and do not have any issues in a test indicator.

            Is it possible that the indicator has another class name than the file name? The list will generate by classname rather than file name, so there could be a discrepancy here.

            Please check the Public Class under the Description section around line 20
            MatthewNinjaTrader Product Management

            Comment


              #7
              I just realize that the indicator was written for 6.5. I imported them into NT7 and they work fine, except not shown in the strategy condition builder.

              Is that the reason it doesn't show? What do I need to do to make it shown?

              I compare the code with other NT7 indicators and doesn't see obvious issues.

              Comment


                #8
                Originally posted by hongchen2000 View Post
                I just realize that the indicator was written for 6.5. I imported them into NT7 and they work fine, except not shown in the strategy condition builder.

                Is that the reason it doesn't show? What do I need to do to make it shown?

                I compare the code with other NT7 indicators and doesn't see obvious issues.
                Does the indicator have a ChartOnly directive in the Initialize() method.

                If so, comment it out.

                Comment


                  #9
                  Originally posted by hongchen2000 View Post
                  I just realize that the indicator was written for 6.5. I imported them into NT7 and they work fine, except not shown in the strategy condition builder.

                  Is that the reason it doesn't show? What do I need to do to make it shown?

                  I compare the code with other NT7 indicators and doesn't see obvious issues.
                  The NS wrappers might need to get regenerated - would you mind attaching the file used here or sending to support so we could give it a run on our end for you?

                  Thanks,

                  Comment


                    #10
                    Yes. I think we hit it. I compare it to other indicators and it is missing the part that says:
                    #region NinjaScript generated code. Neither change nor remove.
                    // This namespace holds all indicators and is required. Do not change it.
                    ....

                    How is that part generated by NS? Can I do it myself or I need to send the file to you to get it?

                    Hong

                    Comment


                      #11
                      I got it. I just recompile the code and it works now. Thanks a lot for the help.

                      Comment


                        #12
                        Thanks for letting us know, glad to hear it.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        668 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        377 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        110 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        575 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        580 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X