Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Referencing a Custom Indicator in a Strategy

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

    Referencing a Custom Indicator in a Strategy

    Dear Support,

    It seems that it's not possible to reference a custom indicator in a strategy. This worked in NT7.

    An example is attached. The standard RSI indicator was cloned and renamed to RSIcustom. The SampleMACrossOver strategy was cloned and renamed to SampleMACrossOverCustom.

    When referencing RSIcustom in the strategy, the compiler complains that 'NinjaTrader.NinjaScript.Indicators.RSIcustom' is a 'type' but is used like a 'variable'

    The reference to the standard RSI indicator works fine (see the attached strategy code).

    Is there a fix or workaround to this issue?

    Using NT8 Beta 8.0.0.2.
    Attached Files

    #2
    Hello NinjaStrat,

    Thank you for your post.

    The NinjaScript Generated Code is not being created for your custom indicator, this should not be the case in NT 8 Beta 2. I can confirm that this is working properly on my end.

    Was the RSIcustom created in NT 8 Beta 2 or was this created in the previous release of NT 8 Beta?

    Can you send us your Log and Trace files via Help > E-mail Support? Please reference this thread "http://www.ninjatrader.com/support/forum/showthread.php?t=74667"

    Comment


      #3
      NinjaStrat,

      If your custom indicator is within a folder under "Indicators", BETA2 is not created the proper wrapper. Pull it out of the folder for now and it should work. I spend about 4 hours tracking this one down as it was a surprise in BETA2.

      Comment


        #4
        Hi NJA_MC,
        Sub-folders not used. The custom indicator is located in the standard folder: \NinjaTrader 8\bin\Custom\Indicators

        NT8 BETA2 (Beta 8.0.0.2.) installed without transferring settings etc from NT7. BETA1 never installed. NT7 installed. Log and trace files sent to support. Many hours spent on this.

        Comment


          #5
          Sorry, I mean a sub folder within the editor. This happened to me with BETA2. Any indicator not in the root of the editor Indicator doesn't get the wrapper code added which causes that error.

          Comment


            #6
            Hi Support,
            After many hours, the cause of the problem has been determined. A custom indicator had an underscore character in it's class name. This prevented the wrapper from being created. Worked ok in NT7 but apparently not in NT8.

            Is this a bug or are underscore characters not allowed in the class name?

            Comment


              #7
              Originally posted by NinjaStrat View Post
              Hi Support,
              After many hours, the cause of the problem has been determined. A custom indicator had an underscore character in it's class name. This prevented the wrapper from being created. Worked ok in NT7 but apparently not in NT8.

              Is this a bug or are underscore characters not allowed in the class name?
              ref: http://www.ninjatrader.com/support/f...ad.php?t=74520

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by morrnel, Today, 06:07 PM
              2 responses
              16 views
              0 likes
              Last Post morrnel
              by morrnel
               
              Started by thumper57, Yesterday, 04:30 PM
              6 responses
              21 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by sastrades, 05-10-2024, 09:59 AM
              3 responses
              55 views
              0 likes
              Last Post rc5781
              by rc5781
               
              Started by guyonabuffalo, Yesterday, 10:01 PM
              2 responses
              22 views
              0 likes
              Last Post guyonabuffalo  
              Started by reynoldsn, 05-10-2024, 07:04 PM
              5 responses
              28 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X