Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to call other indicators from code

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

    How to call other indicators from code

    I need one indicator to get the value of another one in the OnBarUpdate code. I'm having trouble with a particular (licensed and locked) indicator that keeps returning 0 as its value.

    I can get values from these other indicators:

    Standard indicator EMA(9)[0].ToString() = 1.33744268334864
    Custom indicator SAFqt(9)[0].ToString() = 1.33678766781693

    but this indicator returns 0 every time:
    MA_Multicolor(2, 30, mAType, 30, 9)[0].ToString() = 0

    This is a moving average indicator like the other two. I can't look at the source code because it's licensed. But I should be able to use the above statement to get its value, shouldn't I?

    Bryan

    #2
    Hello Bryan,

    Seems like the indicator developer is using the following.



    Let me know if any questions.

    -Brett
    BrettNinjaTrader Product Management

    Comment


      #3
      OK, thanks, you're probably right. Although the properties and methods from the indicator do appear when I just type in MA_Multicolor. and it then displays the possible values after the dot.

      Comment


        #4
        Yep, sounds about right. In either case we would need access to code to further isolate unfortunately.

        -Brett
        BrettNinjaTrader Product Management

        Comment


          #5
          When calling an indicator that has the ChartOnly property set to true, I get an error message:

          "Error on calling 'OnBarUpdate' method for indicator 'aa' on bar 0: The indicator 'AATestIndicator' is intended for visualization and can only be used on a chart."

          So I'm not sure that is the problem in this case, with it returning 0.

          VT

          Comment


            #6
            Originally posted by VTtrader View Post
            When calling an indicator that has the ChartOnly property set to true, I get an error message:

            "Error on calling 'OnBarUpdate' method for indicator 'aa' on bar 0: The indicator 'AATestIndicator' is intended for visualization and can only be used on a chart."

            So I'm not sure that is the problem in this case, with it returning 0.

            VT
            Hm... yeah, I don't get that message. But I'm still out of luck if it returns 0 every time.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            648 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            574 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X