Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access attributes of another indicator

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

    Access attributes of another indicator

    Let's say I have 2 existing indicators: A, B. I want to create another indicator X that includes information from A and B. Without changing A and B at all, how can I access all the information about A and B?

    I found this:

    IndicatorA(Param1, Param2, etc.).Value[0]

    worked to get me the value of one of them. But how do I get the color (the color changes over time in this indicator)?

    Also, one of them is a paintbar, so I want to get the color of that, too.

    Thanks!

    #2
    Originally posted by taotree View Post
    Let's say I have 2 existing indicators: A, B. I want to create another indicator X that includes information from A and B. Without changing A and B at all, how can I access all the information about A and B?

    I found this:

    IndicatorA(Param1, Param2, etc.).Value[0]

    worked to get me the value of one of them. But how do I get the color (the color changes over time in this indicator)?

    Also, one of them is a paintbar, so I want to get the color of that, too.

    Thanks!
    You will need to expose values that represent the color states of your paint bar. The following reference sample will be of help.

    RayNinjaTrader Customer Service

    Comment


      #3
      If I understand your answer correctly, it doesn't satisfy my question. I said, without changing indicator A or B. Are you saying that there is no way to find out the color of a plot in another indicator?

      Comment


        #4
        Originally posted by taotree View Post
        If I understand your answer correctly, it doesn't satisfy my question. I said, without changing indicator A or B. Are you saying that there is no way to find out the color of a plot in another indicator?
        Color of a plot does not change.
        You can access it (if it is regular plot)

        Color mycolor = IndicatorA().Plots[0].Pen.Color;

        Comment


          #5
          How to access current plot color

          I have a 3rd party indicator which plots a line. The line can be one of 3 colors. I want to be able to access the current color in a strategy. Is there any way to do this? I can't see that they've exposed any public property to indicate the current color.

          Comment


            #6
            saturntd, welcome to our forums! Can you access the third party indicator code? Then it would be easiest to work with the conditions leading to the line color changes...

            Comment


              #7
              Bertrand thanks for the response. I can't access their code it's proprietary.

              Comment


                #8
                Then you should contact them and ask to add exposed indicator / signal states to their next revision if possible.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Hwop38, 05-04-2026, 07:02 PM
                0 responses
                160 views
                0 likes
                Last Post Hwop38
                by Hwop38
                 
                Started by CaptainJack, 04-24-2026, 11:07 PM
                0 responses
                307 views
                0 likes
                Last Post CaptainJack  
                Started by Mindset, 04-21-2026, 06:46 AM
                0 responses
                244 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by M4ndoo, 04-20-2026, 05:21 PM
                0 responses
                348 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Started by M4ndoo, 04-19-2026, 05:54 PM
                0 responses
                178 views
                0 likes
                Last Post M4ndoo
                by M4ndoo
                 
                Working...
                X