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 StockTrader88, 03-06-2021, 08:58 AM
              45 responses
              3,991 views
              3 likes
              Last Post johntraderuser2  
              Started by TAJTrades, Today, 09:46 AM
              0 responses
              7 views
              0 likes
              Last Post TAJTrades  
              Started by rhyminkevin, Yesterday, 04:58 PM
              5 responses
              62 views
              0 likes
              Last Post dp8282
              by dp8282
               
              Started by realblubb, Today, 09:28 AM
              0 responses
              8 views
              0 likes
              Last Post realblubb  
              Started by AaronKoRn, Yesterday, 09:49 PM
              1 response
              19 views
              0 likes
              Last Post Rikazkhan007  
              Working...
              X