Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IndicatorBaseConverter Error

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

    IndicatorBaseConverter Error

    Hello, I have created TypeConverter for my indicator according to docs. In the region - region NinjaScript generated code. Neither change nor remove. - I receive error during compilation:

    MyCustomConveter​.cs 'NinjaTrader.NinjaScript.Indicators.MyCustomConvet er'
    does not contain a definition for 'EqualsInput' and no extension method 'EqualsInput'
    accepting a first argument of type 'NinjaTrader.NinjaScript.IndicatorsMyCustomConvete r'​ could be found (are you missing a using directive or an assembly reference?)

    Could you please help me?

    #2
    Hello 09try,

    Thanks for your post.

    So we may accurately assist, please send us a screenshot of the error message in question and the TypeConverter code you are using in the indicator script.
    • To send a screenshot with Windows 10 or newer I would recommend using the Windows Snipping Tool.
    • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save it as a jpeg file and send the file as an attachment.
    ​We look forward to assisting further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello Brandon,
      thanks for answer. I have attached screenshot and code. It's standard code as described in the docs

      https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?using_a_typeconverte r_to_custo.htm

      You will get error on lines 29, 34, 38 as you would need additional files. But in my opinion you can comment them out because they just add some values into collection and should not be a problem.

      MyCustomConverter.cs
      Attached Files

      Comment


        #4
        Hello 09try,

        Thanks for your notes.

        In the script you shared you must define an Indicator class in that file before the Type Converter class to resolve the compile errors. Currently, it is trying to use that Type Converter as an indicator.

        It seems IndicatorBaseConverter is inheriting from Indicator with how the code generator finds the indicator in the file and picked that up since the Indicator class is missing from the script.

        See this reference sample from the help guide demonstrating how to use a TypeConverter to customize property grid behavior: https://ninjatrader.com/support/help...r_to_custo.htm

        Attached is an example of this concept added to the code you shared which resolved the compile errors.

        Also, attached is an example of splitting this into different files as well which you might find helpful.
        Attached Files
        Last edited by NinjaTrader_BrandonH; 04-01-2024, 09:29 AM.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Hello Brandon, I had my indicator in separate file. After I merged indicator and converter into single file I could compile.

          Thank you very much for your help!

          Comment


            #6
            @NinjaTrader_BrandonH​ - I see the example you provided, I am trying to do the same thing.. but it's not working for me.. I can get the Strategy Side to work perfectly but not the Indicator side. Can you confirm that this works with 8.1.3.0? It does compile but it does not seem to work https://youtu.be/i2eO0bOH8jQ

            Comment


              #7
              Hello ntcat,

              Thanks for your notes.

              To clarify, have you tested the sample scripts linked in post # 4 which demonstrates how this could be accomplished?

              The sample scripts linked in post # 4 were created using NT 8.1.3.0.

              When you mention "it does not seem to work" what exactly are you referring to that does not work?

              Are you seeing an error message in the Log tab of the Control Center when running the script? If so, what does it report?
              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

              Comment


                #8
                NinjaTrader_BrandonH - I am sorry, did you see the video - https://youtu.be/i2eO0bOH8jQ

                I uploaded and imported directly without modification - I expected to click on a Check Marks ShowFairValueGaps, ShowFibRetracements and ShowOrderBlocks to reveal an options drop down to appear. I loaded a strategy that shows this behavior working.

                It's almost as if the indicator side is disabled from this feature.

                It does compile, and no errors show in the output.
                Attached Files

                Comment


                  #9
                  Perfect.. I actually got this working. This is the first time I have seen the Base Converter work for an Indicator.

                  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