Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modifications to chart WPF elements and tab considerations

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

  • NinjaTrader_ChelseaB
    replied
    Hello petrovna,

    Welcome to the NinjaTrader forums!

    Are you adding the SampleWPFModifications reference sample to the chart in the Indicators window in the Configured area?

    Leave a comment:


  • petrovna
    replied
    Originally posted by Subhash Badri View Post
    Still not working

    I followed the exact steps like you suggested. I checked the custom\indicators folder and the file is present and I hope that confirms that import was successful.

    I launch the chart but do not see any button controls.

    I have the same issue man! did everything as yousaid and no changes.. what else can you suggest?

    Leave a comment:


  • fawzanalim
    replied
    Hi Chelsea,
    Thanks for the sample code. I've been using it for awhile now. Everything seems to work properly, but I get this weird bug sometimes. All my buttons disappear except the last row. I tried to regenerate the bug a lot, but couldn't. It happens with any buttons. It's working fine, all of a sudden all the buttons are gone when I pressed a button. There is no log messages. In order to bring those buttons back, I have to remove the script and add it again. Any idea whats causing this issue?

    Leave a comment:


  • cay7man
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello cay7man,

    It's still adding a new column on line 223 and shifting columns on line 230.
    Great! Its removed now. Not sure what I did before. I was adjusting the columns. TY!

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello cay7man,

    It's still adding a new column on line 223 and shifting columns on line 230.

    Leave a comment:


  • cay7man
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello cay7man,

    Is the menu still being created and added to the chart grid?

    For the top toolbar, Yes. Looks fine. Left bar is blank and couldn't be removed. I'm attaching the modified code...
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello cay7man,

    Is the menu still being created and added to the chart grid?

    Leave a comment:


  • cay7man
    replied
    Hi Chelsea, Thank you for the amazing sample code. I took ChartCustomToolbarExample and modified to have only the top toolbar. I simply removed all the references to left*
    to get rid off the left toolbar. It didn't work. I still get blank left toolbar. Any clues? TY!

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Mindset,

    Are you referring to toolbarTopMenuButton1 in the top tool bar or toolbarLeftMenuButton2 on the left toolbar?

    There isn't anything named button1, but the first button is on the top tool bar.

    Leave a comment:


  • Mindset
    replied
    Hi

    YOur sample WPF code in help doesn't load button 1 to the left hand side toolbar - because there isn't a button 1!! FYI

    Leave a comment:


  • Mindset
    replied
    Hi Chelsea B

    Simple dumb error that #fawzanalim helped me solve. I had the wrong margins when setting the buttons - so buttons were written over each other or not at all etc! that only took a month to sort out.
    On with the next issue!

    Edit - code for 8 buttons provided here as raw material for anyone else having similar issues/ looking to learn
    Please note I have found in using it every now and again it won't load/fouls up - throw the chart away and use another one; works for me!
    Ps Chelsea, I get nothing in the logs when this happens.
    Attached Files
    Last edited by Mindset; 10-16-2021, 01:11 AM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Mindset,

    Take one step at a time.

    First, are any errors appearing on the Log tab of the Control Center?

    Are the indexes used all correct and smaller than the size of the collection?

    Are the buttons being added to the proper columns in your custom grid?

    Leave a comment:


  • fawzanalim
    replied
    Here's four buttons in the lowergrid
    Attached Files

    Leave a comment:


  • fawzanalim
    replied
    It contains 12 buttons. Haven't faced any issues so far. But my buttons are in the uppergrid, not lowergrid.
    Attached Files
    Last edited by fawzanalim; 10-13-2021, 11:46 PM.

    Leave a comment:


  • Mindset
    replied
    Hi Chelsea
    Me again. Still can't wrap my head around creating more buttons/grids.
    I followed your model and added a second lower grid (lower1buttonsgrid ) with a further 2 buttons

    Code:
    lower1ButtonsGrid.ColumnDefinitions.Add(new System.Windows.Controls.ColumnDefinition());
    lower1ButtonsGrid.ColumnDefinitions.Add(new System.Windows.Controls.ColumnDefinition() { Width = new GridLength((double)Application.Current.FindResourc e("MarginBase")) });
    lower1ButtonsGrid.ColumnDefinitions.Add(new System.Windows.Controls.ColumnDefinition());
    then I added a new row

    Code:
     addedRow3 = new System.Windows.Controls.RowDefinition() { Height = new GridLength(31) };
    then I put my buttons into the columns

    Code:
    System.Windows.Controls.Grid.SetColumn(buttonsArra y[4], 0);
    System.Windows.Controls.Grid.SetColumn(buttonsArra y[5], 2);
    for (int i = 4; i < 6; ++i)
    lower1ButtonsGrid.Children.Add(buttonsArray[i]);
    Then I added it to the InsertWPF method

    Code:
     if (chartTraderButtonsGrid != null || lower1ButtonsGrid != null)
    {
    chartTraderGrid.Children.Remove(lower1ButtonsGrid) ;
    chartTraderGrid.RowDefinitions.Remove(addedRow3);
    }
    but I get no buttons at all.
    Its so frustrating. User fawzanalim managed to kindly share his code with 12 buttons but that has issues when you reload ( it moves all the instrument and account details downwards underneath the new buttons upon reload).

    If you can help I would be most grateful.
    Attached Files
    Last edited by Mindset; 10-13-2021, 08:11 PM.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by cmoran13, 04-16-2026, 01:02 PM
0 responses
51 views
0 likes
Last Post cmoran13  
Started by PaulMohn, 04-10-2026, 11:11 AM
0 responses
31 views
0 likes
Last Post PaulMohn  
Started by CarlTrading, 03-31-2026, 09:41 PM
1 response
165 views
1 like
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 04-01-2026, 02:41 AM
0 responses
100 views
1 like
Last Post CarlTrading  
Started by CaptainJack, 03-31-2026, 11:44 PM
0 responses
160 views
2 likes
Last Post CaptainJack  
Working...
X