Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Plot colors

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

    Plot colors

    Hey,

    I have this indicator that's a DLL so I can't see the code. It has one plot and it changes colors (red/green). I don't care how it was done although I can guess its some sort of over ride of the plot method. All I need to know is when the color changes. The plot its self is set at some random color like blue and that's what it shows in the settings, but the correct plot color is shown in the data box when I hover over the bars. My question is how does the data box access the plot color and can it be replicated in a strategy?

    Methods already tried: plotColors shows empty, Pen.color shows the random color (blue in this example).

    #2
    Hello Joe Jack,

    If you are trying to access the color of a plot inside of an Strategy you may view the following thread that will give an example.




    Otherwise, there is not a supported method you can read from to get the color of an indicator plot for a particular bar from another indicator.

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Right, well like I said in the original post plot colors just returns Color [EMPTY]. Have any idea why that might be?. It doesn't mater if i use PlotColors[0][4],PlotColors[0][0], PlotColors[1][0], or PlotColors[1][1]. All the same result.

      Comment


        #4
        Hello Joe Jack,

        Are you trying to access this in a Strategy or and Indicator?
        JCNinjaTrader Customer Service

        Comment


          #5
          In a strategy.

          Comment


            #6
            You wouldn't be able to read the color directly.

            It would be required that the developer of the DLL you're using has exposed this data series/plot to be accessed programmatically. You'd also need to know what value satisfy the condition to change the plot colors

            if(myCustomAddOn().PlotSignal[0] > thresholdValue)
            // do something
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by marcus2300, Yesterday, 10:21 AM
            6 responses
            20 views
            0 likes
            Last Post marcus2300  
            Started by skorpn, Today, 01:28 AM
            0 responses
            9 views
            0 likes
            Last Post skorpn
            by skorpn
             
            Started by ETFVoyageur, Today, 12:52 AM
            0 responses
            6 views
            0 likes
            Last Post ETFVoyageur  
            Started by Board game geek, Yesterday, 02:20 AM
            2 responses
            23 views
            0 likes
            Last Post Board game geek  
            Started by jackiegils, Yesterday, 11:05 PM
            0 responses
            7 views
            0 likes
            Last Post jackiegils  
            Working...
            X