Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Color Must be committed by State.Committed

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

    Plot Color Must be committed by State.Committed

    I remember seeing this issue reported a while back in an early BETA.

    If you set all the PLOTS to transparent color in the State.SetDefaults and then change the color in the "OnBarUpdate()" function based upon logic, no data shows in the "Data Box", just the Panel # & Name.

    I can get around this with setting the colors in the "State.Configure" with:
    Plots[0].Brush=Brushes.Gray;

    #2
    Thank you for sharing this with us. Can you share exactly how you are changing the colors that causes the Data Box to be affected? With the code below, my plot is still showing in the data box, and the plot is visible with a Blue color:

    Code:
    	protected override void OnStateChange()
    		{
    		if (State == State.SetDefaults)
    			{
                            ....
    			AddPlot(Brushes.Transparent, "plot1");
                             }
    		}
    
    		protected override void OnBarUpdate()
    		{
    		Values[0][0] = Low[0];
    
                    if (Close[0] > Close[1])
                           Plots[0].Brush = Brushes.Blue;
    		}
    Dave I.NinjaTrader Product Management

    Comment


      #3
      I am trying to test and bumped into another error that may be causing the problem.

      I downloaded the DLL from the Indicators section that Patrick put up for Jurik features..

      I have been seeing strange issues with graphics on my system and it started during my testing of this issue. Then I started to see Resource issues listed in the Log file.

      I have removed that assembly and need to restart my system to clear the resource issue, but someone might want to look if that DLL has a resource leak, I didn't even use the resources/indicators, but it caused problems upon opening the "Indicator Dialog Box", so it seems like something in the SetDefaults/Configure/Terminate section.

      I will report back on if this fixed my issue or a sample code for you shortly.
      Attached Files

      Comment


        #4
        I have attached a modified ADX to this message to show the issue.

        I am using PlotBrushes[] not Plots[] since I am trying to color each bar, not the entire series. You can modify the code around 125 to see the difference. With your Plots[] the data shows in the databox, but if I use PlotsBrushes[] it does not. To get the PlotsBrushes[] to work, I need to set a default color to the series.


        Originally posted by NinjaTrader_Dave View Post
        Thank you for sharing this with us. Can you share exactly how you are changing the colors that causes the Data Box to be affected? With the code below, my plot is still showing in the data box, and the plot is visible with a Blue color:

        Code:
        	protected override void OnStateChange()
        		{
        		if (State == State.SetDefaults)
        			{
                                ....
        			AddPlot(Brushes.Transparent, "plot1");
                                 }
        		}
        
        		protected override void OnBarUpdate()
        		{
        		Values[0][0] = Low[0];
        
                        if (Close[0] > Close[1])
                               Plots[0].Brush = Brushes.Blue;
        		}
        Attached Files

        Comment


          #5
          Thank you, I can reproduce the issue now. Fortunately, this issue is no longer reproducible in our most current internal builds, although it is present in Beta 5. Please keep this issue in mind to test in the next Beta release, and you should find it resolved.
          Dave I.NinjaTrader Product Management

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CortexZenUSA, Today, 12:53 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by CortexZenUSA, Today, 12:46 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Started by usazencortex, Today, 12:43 AM
          0 responses
          5 views
          0 likes
          Last Post usazencortex  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          168 responses
          2,266 views
          0 likes
          Last Post sidlercom80  
          Started by Barry Milan, Yesterday, 10:35 PM
          3 responses
          13 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X