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

How can I put my wpf user control behind the ChartTrader order/position lines?

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

    How can I put my wpf user control behind the ChartTrader order/position lines?

    I have an indicator that creates a WPF Grid with Buttons and a StackPanel with Labels, the Grid is added to the UserControlCollection.
    But as shown in the screenshot below it's on top of the chart, above the ChartTrader position and SL / TP orders markers.
    I would like it below these markers, because now the X close boxes of the markers are below my buttons.

    How can I change this?
    Can I change my Grid's Zindex within the Chart Window?
    Click image for larger version

Name:	change wpf grid zindex.png
Views:	309
Size:	75.2 KB
ID:	1124634
    Attached Files

    #2
    Hello wjadevries,

    I believe in this case you would need to avoid using a WPF control and instead use OnRender if it needs to be behind the X. You would otherwise need to not use that area and move your controls left. The UserControlCollection is an overlay on the chart panel so any controls will be above the chart and cannot be factored into the zordering of rendering/the charts existing controls that are above the rendering.

    One thought here would be to make the button transparent and then use OnRender for its visual. The click would still happen from the transparent button over that area. That would be far easier than trying to wire into the charts click events and trying to make sure you clicked within a rectangle if you were only using OnRender. However that will block the X so moving it left would still be advisable if you need to use the chart trader with this tool.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Sounds a lot of hussle for a simple issue.
      So I'll just move it a little bit to the left, thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by traderqz, Today, 12:06 AM
      2 responses
      3 views
      0 likes
      Last Post traderqz  
      Started by RideMe, 04-07-2024, 04:54 PM
      5 responses
      28 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by f.saeidi, Today, 08:13 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by DavidHP, Today, 07:56 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by kujista, Today, 06:23 AM
      3 responses
      11 views
      0 likes
      Last Post kujista
      by kujista
       
      Working...
      X