Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Trader Visibility Change Events Required

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

    Chart Trader Visibility Change Events Required

    Hi ninja experts,

    I’ll be really thankful for some help and guidance. I’m building a custom indicator for which I need to take some actions when Chart Trader panel is opened or closed or hidden/collapsed by the user. I have been able to get and set the current status of the Chart Trader Panel through the use of property ChartTraderVisibility. I’m able to read whether the chart trader is Visible (Trader is ON), Collapsed (Trader is OFF), VisibleCollapsed (Trader is working but hidden). I’m also able to set the property status using
    ChartCommands.ChartTrader.Execute(ChartTraderVisibility.Visible)


    Now the problem is that I need to subscribe to an event which is fired whenever the chart trader visibility is switched between ON, OFF and Hidden. I have tried an event named as IsVisibleChanged but this event can not differentiate between the ON state and the hidden state. It works well for OFF state but it takes ON and hidden, both of these, states as same. So, I’m in need of an event/syntax which is executed whenever the visibility status is changed by the user through clicking the main menu on chart’s top row -> Chart Trader Menu -> Chart Trader sub menu ON or OFF or Hidden buttons. Alternatively, if I can get any event which is related to chart trader's sub menu buttons pressing to change the visibility, this would be equally good.

    Best Regards
    Mubeen Haider

    #2
    Hi Mubeen, thanks for posting.

    There is nothing documented on this subject in the help guide, so you would need to look through the library with IntelliSense in Visual Studio to uncover any further information on the ChartTrader events that are not documented/supported.

    Best regards,
    -ChrisL

    Comment


      #3
      Originally posted by Mubeen Haider View Post
      Hi ninja experts,

      I’ll be really thankful for some help and guidance. I’m building a custom indicator for which I need to take some actions when Chart Trader panel is opened or closed or hidden/collapsed by the user. I have been able to get and set the current status of the Chart Trader Panel through the use of property ChartTraderVisibility. I’m able to read whether the chart trader is Visible (Trader is ON), Collapsed (Trader is OFF), VisibleCollapsed (Trader is working but hidden). I’m also able to set the property status using
      ChartCommands.ChartTrader.Execute(ChartTraderVisibility.Visible)


      Now the problem is that I need to subscribe to an event which is fired whenever the chart trader visibility is switched between ON, OFF and Hidden. I have tried an event named as IsVisibleChanged but this event can not differentiate between the ON state and the hidden state. It works well for OFF state but it takes ON and hidden, both of these, states as same. So, I’m in need of an event/syntax which is executed whenever the visibility status is changed by the user through clicking the main menu on chart’s top row -> Chart Trader Menu -> Chart Trader sub menu ON or OFF or Hidden buttons. Alternatively, if I can get any event which is related to chart trader's sub menu buttons pressing to change the visibility, this would be equally good.

      Best Regards
      Mubeen Haider
      Hi Mubeen Haider, maybe this will help you.

      Code:
      Chart chartWindow = Window.GetWindow(ChartControl.Parent) as Chart;
      foreach (IChartObject obj in chartWindow.ActiveChartControl.ChartObjects.ToList ())
      {
         ChartBars writeTrades = obj as ChartBars;
         if (writeTrades != null)
            {
               switch (writeTrades.Properties.PlotExecutions)
                {
                    case ChartExecutionStyle.DoNotPlot:
                         {
                               writeTrades.Properties.PlotExecutions = ChartExecutionStyle.MarkersOnly;
                               break;
                          }
                   case ChartExecutionStyle.MarkersOnly:
                         {
                               writeTrades.Properties.PlotExecutions = ChartExecutionStyle.TextAndMarker;
                               break;
                         }
                    default:
                        {
                              writeTrades.Properties.PlotExecutions = ChartExecutionStyle.DoNotPlot;
                              break;
                         }
                }
           }
      }
      sidlercom80
      NinjaTrader Ecosystem Vendor - Sidi Trading

      Comment


        #4
        Thanks very much dear sidlercom80 for your help. So nice of you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        582 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        338 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X