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

  • fawzanalim
    replied
    It was happening because I had 6 rows and 6 grids instead of 6 rows in 1 grid. I changed to one grid, issue got fixed

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello fawzanalim,

    What specific line of code when added reproduces the behavior and when removed the behavior can no longer be reproduced?

    Are you adding and removing rows in relation to the ChartControl?

    Are you getting errors in the Log tab of the Control Center when the behavior occurs?

    Leave a comment:


  • fawzanalim
    replied
    No, the problem does not occur with the original sample code.
    Firstly i separated case 5, the problem does not occur in this step. It occurs with the 12 buttons that I have attached previously. It removes top 10 buttons.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello fawzanalim,

    Is this behavior occurring with the original example?

    Leave a comment:


  • fawzanalim
    replied
    Hi
    Thanks for the sample file. It helped a lot. I separated Case 5 into a new indicator. Removed the bottom button row and made 5 duplicates of the top row of custom buttons. But I am having an issue. When I have multiple tabs open in a chart window and run indicator in all of them, then reload ninjascript in one tab, all custom buttons disappear except the last row in the other tabs. I can't find the problem behind this. Need help.
    Attached Files

    Leave a comment:


  • dtl-saw
    replied
    Hi Chelsea B.
    My initial testing confirms that you've fixed the problem.
    I appreciate your work especially with this WPF script.
    Thanks

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello dtl-saw,

    I had to take a deeper look which took a long time. I think its fixed.
    The ChartControl appears to be null when closing the tab.

    Please redownload and test.


    nothingbutprofits,

    What can you screenshot and draw a box around what you are referring to as the 'NT8 Bar title label'?

    Are you referring to where it says 'Chart' on the upper left of the chart?
    Last edited by NinjaTrader_ChelseaB; 10-05-2021, 04:49 PM.

    Leave a comment:


  • nothingbutprofits
    replied
    Hi Chelsea,

    I like this WPF indicator very much - it helps us big time.

    Is it possible to change the color on that NT8 Bar title label when clicking on either submenu1 (green) or submenu2 (red)?

    Many thanks.

    References:
    https://ninjatrader.com/support/foru...considerations

    Leave a comment:


  • dtl-saw
    replied
    Hi Chelsea B.
    I downloaded and imported the new file and repeated the steps I described from before and the Error window still appears requiring closing down the app.
    I verified the timestamp on the download is from your 9/28 edits.
    Can you double check that you attached the file that fixed the problem.
    thanks

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello dtl-saw,

    I hadn't realized these wpf modification in State.DataLoaded doesn't play nice with duplicating tabs. I've moved to State.Historical which appears to be late enough for the ChartControl to be ready.

    Thanks for reporting the behavior. I've updated the script.
    Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've

    Leave a comment:


  • dtl-saw
    replied
    When I add the indicator "Sample WPF Modifications" to a chart and then duplicate the chart to a new tab and then close the newly added tab by clicking on the "x" in the tab then I get "Unhandled exception: Object reference not set to an instance of an object" Error menus repeating many times as I move the mouse over the screen and am forced to close the application.

    Are you able to replicate this behavior?

    Leave a comment:


  • Unsuitable
    replied
    Originally posted by aligator View Post

    Thanks. Understnd, but I do not want to have a blank button or show text. I want to experiment with a geometric shape, vectors, or a path, etc.
    Ok well post #165 is how I achieved custom icons via Inkscape.

    Leave a comment:


  • aligator
    replied
    Originally posted by Unsuitable View Post

    If I understand correctly, there's no need to use an Icon path. Use a regular button and set the content to EW ABC, 12345 wave, etc. A regular button does not require an icon. Refer to post #167 for the example script.
    Thanks. Understnd, but I do not want to have a blank button or show text. I want to experiment with a geometric shape, vectors, or a path, etc.

    Leave a comment:


  • Unsuitable
    replied
    Originally posted by aligator View Post

    Yes, basically I want to create a button indicator for NT8 main menu that would use a geometric path, EW ABC, 12345 wave, etc, as an icon. I am looking for the NT8 C# sample script or indicator..
    If I understand correctly, there's no need to use an Icon path. Use a regular button and set the content to EW ABC, 12345 wave, etc. A regular button does not require an icon. Refer to post #167 for the example script.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello aligator,

    An example of using Path Geometry in a Menu or Button can be found in the SampleWPFModifications example script.
    https://ninjatrader.com/support/foru...07#post1124507
    Last edited by NinjaTrader_ChelseaB; 05-18-2021, 09:19 AM.

    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