Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to load indicator: Is a method but is used like a type

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

    Trying to load indicator: Is a method but is used like a type

    Hey fellas -

    I'm trying to load this indicator into my custom strategy but I get this error on compiling. What does it mean as this is the first time I've had this issue with any indicator?

    NinjaScript File Error Code Line Column
    TestScript.cs 'NinjaTrader.NinjaScript.Strategies.Strategy.amaTr adersDynamicIndex(int, int, int, int, double)' is a 'method' but is used like a 'type' CS0118 33 11

    I've attached my simple test script and the indicator code.

    Thanks!
    Attached Files

    #2
    Hello PN720,
    Thanks for your post.

    Change the way you are instantiating the indicator from
    Code:
    private amaTradersDynamicIndex TDIInd;
    to
    Code:
    private Indicators.LizardIndicators.amaTradersDynamicIndex TDIInd;
    You need to do this when you are calling your indicators from a folder.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Ah, makes sense, thanks again!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      48 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X