Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Grid from external library to ChartTrader

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

    Adding Grid from external library to ChartTrader

    Hi,

    I am attempting to add a custom grid with some elements to ChartTrader using an indicator. I have created WPF User Control Library in .NET Framework 4.5, changed it to Page and built. Then I have moved the compiled DLL to %username%\Documents\NinjaTrader 8\bin\Custom so I can reference it inside an indicator. The indicator is quite straight forward, it looks for ChartTrader, creates a new row and adds a grid from the external library. There are no errors but the grid doesn't render.

    Please, see the zip file attached for all the files required to replicate the issue.
    Any help much appreciated.

    Regards,
    Jiri
    Attached Files

    #2
    The external library is not obfuscated but for easier access, here is the XAML code:

    Code:
    <Page x:Class="WpfControlLibrary1.UserControl1"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:t="clr-namespace:NinjaTrader.Gui.Tools;assembly=NinjaTrader.Gui"
                 xmlns:system="clr-namespace:System;assembly=mscorlib"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:local="clr-namespace:WpfControlLibrary1"
                 mc:Ignorable="d"
                 d:DesignHeight="450" d:DesignWidth="240">
        <Grid>
            <Grid.Resources>
                <Style TargetType="Border">
                    <Setter Property="Padding" Value="0,0,0,6" />
                </Style>
            </Grid.Resources>
    
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="6" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
    
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
            </Grid.RowDefinitions>
    
            <Border Grid.Row="0" Grid.Column="0">
                <Button Content="Button 1" />
            </Border>
    
            <Border Grid.Row="0" Grid.Column="2">
                <Button Content="Button 2" />
            </Border>
    
            <Border Grid.Row="1" Grid.Column="0">
                <Button Content="Button 3" />
            </Border>
    
            <Border Grid.Row="1" Grid.Column="2">
                <Button Content="Button 4" />
            </Border>
        </Grid>
    </Page>

    Comment


      #3
      Hello Jiri,

      While this custom WPF work would be outside of what is supported by NinjaTrader, I have a few examples you may find helpful.


      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      77 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      27 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      62 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X