Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

I Require Help

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

    I Require Help

    Hello,
    I am trying to modify the existing Chart trader,
    I can put the buttons on CHART_TRADER_GRID, or the CHART_TRADER_BUTTONS_GRID, right essentially, at bottom OR under PNL
    I want to:
    - MOVE PNL to TIPPY TOP
    - APPEND buttons under existing buttons,
    - REMOVE A: and B: display
    - removes INSTRUMENT selector
    I have devoured the SAMPLE_WPF_MOD script so please don't post me a link to that, if you're vendor maybe you can guide me,
    I don't want to use Xaml Like the ATS Quadro Base which is like 5000 lines of code long to accomplish this so is there anyone that can help me name the UI elements and explain how to access them? here's the workflow: MAIN_CHART_WINDOW = System.Windows.Window.GetWindow (ChartControl.Parent) as Chart;

    if (MAIN_CHART_WINDOW != null)
    {
    CHART_TRADER_GRID = (MAIN_CHART_WINDOW.FindFirst ("ChartWindowChartTraderControl") as ChartTrader).Content as Grid;
    }
    if (CHART_TRADER_GRID != null)
    {
    CHART_TRADER_BUTTONS_GRID = CHART_TRADER_GRID.Children[0] as Grid;

    CHART_TRADER_BUTTON_STYLE = Application.Current.TryFindResource ("BasicEntryButton") as Style;

    CHART_TRADER_UPPER_GRID = new Grid ();
    Grid.SetColumnSpan (CHART_TRADER_UPPER_GRID, 3);

    CHART_TRADER_UPPER_GRID.ColumnDefinitions.Add (new ColumnDefinition ());
    CHART_TRADER_UPPER_GRID.ColumnDefinitions.Add (new ColumnDefinition () { Width = new GridLength ((double)Application.Current.FindResource ("MarginBase")) }); // separator column
    CHART_TRADER_UPPER_GRID.ColumnDefinitions.Add (new ColumnDefinition ());

    CHART_TRADER_ROW_UNDER_PNL = new RowDefinition () { Height = new GridLength (31) };


    CHART_TRADER_BUTTONS_EXTRA = new Button[4];

    for (int i = 0; i < 2; ++i)
    {
    CHART_TRADER_BUTTONS_EXTRA[i] = new Button ()
    {
    Content = string.Format ("Button {0}", i + 1),
    Height = 30,
    Margin = new Thickness (0, 0, 0, 0),
    Padding = new Thickness (0, 0, 0, 0),
    Style = CHART_TRADER_BUTTON_STYLE
    };


    CHART_TRADER_BUTTONS_EXTRA[i].Background = Brushes.Gray;
    CHART_TRADER_BUTTONS_EXTRA[i].BorderBrush = Brushes.DimGray;

    }

    CHART_TRADER_BUTTONS_EXTRA[0].Click += ChartTraderButtonMenu_Click;
    CHART_TRADER_BUTTONS_EXTRA[1].Click += ChartTraderButtonMenu_Click;


    Grid.SetColumn (CHART_TRADER_BUTTONS_EXTRA[1], 3);

    for (int i = 0; i < 2; ++i)
    CHART_TRADER_UPPER_GRID.Children.Add (CHART_TRADER_BUTTONS_EXTRA[i]);






    //ADD ROWS

    if (!CHART_TRADER_EXTRA_BUTTONS_ACTIVE)
    {
    //CHART_TRADER_BUTTONS_GRID.RowDefinitions.Insert(CH ART_TRADER_BUTTONS_GRID.RowDefinitions.Count - 1, new RowDefinition(){ Height = new GridLength (31) }); // Insert the separator row

    CHART_TRADER_GRID.RowDefinitions.Add (CHART_TRADER_ROW_UNDER_PNL);


    Grid.SetRow (CHART_TRADER_UPPER_GRID, (0));
    CHART_TRADER_GRID.Children.Add (CHART_TRADER_UPPER_GRID);
    // add a new row (addedRow2) for our lowerButtonsGrid below the ask and bid prices and pnl display


    CHART_TRADER_EXTRA_BUTTONS_ACTIVE = true;
    }
    }

    #2
    Hello Entwaze,

    Thanks for your post.

    We are looking into your inquiry and we will update this forum thread as soon as we are finished researching this item.

    I look forward to assisting further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Hello Entwaze,

      Thanks for your patience.

      We do not have a complete list of the automation ids, but you can find these for any visible objects you need.

      You could find a demonstration video and more information on the forum thread linked below showing how to use the Microsoft Inspect tool to find automation ids of wpf objects in existing programs.
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        No worries i got it done

        Comment


          #5
          you can delete this thread if you want, i don't even remember what i was talking about

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by JoMoon2024, Today, 06:56 AM
          0 responses
          6 views
          0 likes
          Last Post JoMoon2024  
          Started by Haiasi, 04-25-2024, 06:53 PM
          2 responses
          18 views
          0 likes
          Last Post Massinisa  
          Started by Creamers, Today, 05:32 AM
          0 responses
          6 views
          0 likes
          Last Post Creamers  
          Started by Segwin, 05-07-2018, 02:15 PM
          12 responses
          1,786 views
          0 likes
          Last Post Leafcutter  
          Started by poplagelu, Today, 05:00 AM
          0 responses
          3 views
          0 likes
          Last Post poplagelu  
          Working...
          X