Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

get color from a plot in 3rd indicator

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

    get color from a plot in 3rd indicator

    Hi guys, I'm creating a strategy that uses an indicator that wasn't created by me, this indicator has 2 lines, I can read the value of these lines without problems, but one of them changes color in certain situations and I need to read this change of color to complement my decision making. but I can not. The best I could do was read the contents of .Plots(0).brush, but it only reflects the initial color and does not contain the changes. When I open the DataBOX window, I see the values of each indicator line, and each line "in the databox window" is painted in the correct color according to the bar that the mouse is within the graph. Can anyone help ​me read this color, or this is not possible. thank you all.


    #2
    Have you tried reading SomeIndicator.PlotBrushes[x][0] where x is the plot number? If [0] is always unset, try reading [1] if the strategy is intrabar - perhaps the indicator only updates on bar close.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello afsnews,

      Thanks for your post.

      There are no supported or documented means for checking if the brush color of a third-party indicator's plot is a specific brush color for conditions.

      Are you able to modify the third-party indicator?

      If so, you could add public exposed variable to the indicator, set the variable to 1 when the plot changes to one color and set the variable to -1 when the plot changes to the other color. Then, in your strategy you could create a condition that checks if the variable is equal to 1 or -1 to determine the color of the plot.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Originally posted by QuantKey_Bruce View Post
        Have you tried reading SomeIndicator.PlotBrushes[x][0] where x is the plot number? If [0] is always unset, try reading [1] if the strategy is intrabar - perhaps the indicator only updates on bar close.
        hi, yes i've tried this. PlotBrush doesnt work, and .Plots(0).brush wotk, but it dont show correct values, it only shows the value of the start config. tnks a lot

        Comment


          #5


          Hi, unfortunately I don't have access to the indicator's source code, but I managed to contact the developer and asked for exactly what you suggested. I asked him to put an exposed variable, which reflects something like: 1= green, 2 = red, 3=yellow, etc. Thank you for your attention.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          44 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          124 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          65 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X