Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data Series and String.Compare

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

    Data Series and String.Compare

    I have an indicator that works fine with one series on the panel but if I put 2 ( int this case MES and ES) then it no longer works.
    The toolbar button is fully functional but the properties of the BarsArray is not changing.
    I thought if i put a user property MySeries (eg 0 or 1) it might solve the issue but it doesn't.


    Here is my code

    Code:
    if( String.Compare(ShowExecState,"EXECUTION MARKERS ONLY") == 0 )
    {
    ShowExecState = "FULL TEXT EXECUTION MARKERS";
    
    ChartControl.BarsArray[MySeries].Properties.PlotExecutions = ChartExecutionStyle.TextAndMarker;
    myItem.Header= "FULL";
    myItem.Foreground = Brushes.Red;
    ShowTextAndMarker = false;// a bool to ensure it only triggers once per click
    }
    Edit - If I change my primary DataSeries around it does work?
    So my trades are on MES - which this indicator will change ChartExecutionStyle when MES is primary but not when it's secondary?
    Is that correct behaviour? Should MySeries not change that?
    Last edited by Mindset; 09-30-2020, 02:58 AM.

    #2
    Hello Mindset,

    Thanks for your post.

    Are you trying to change the ChartBars that the indicator is attached to or another ChartBars on the chart?

    If you are trying to change the ChartBars that the indicator is attached to, I suggest to simply use the indicator's ChartBars property.

    this.ChartBars.Properties.PlotExecutions = ChartExecutionStyle.TextAndMarker;

    Could you clarify if you are trying to find a different ChartBars?

    When I try changing properties of all ChartBars in ChartControl.BarsArray, I do not experience an issue.

    Code:
    foreach (ChartBars chtbrs in ChartControl.BarsArray)
        chtbrs.Properties.PaintPriceMarker = false;
    We look forward to assisting.

    Comment


      #3
      no I am trying to change the chartbars that the indicator is attached to. Thank you for the explanation. All Sorted

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      646 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      367 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X