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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      78 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X