437 lines
31 KiB
XML
437 lines
31 KiB
XML
<UserControl x:Class="TradeBlotter.Views.CMTTrendView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:vw="clr-namespace:TradeBlotter.Views"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
|
|
xmlns:dc="clr-namespace:TradeBlotter.UIUtils"
|
|
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
|
xmlns:local="clr-namespace:TradeBlotter.UIUtils"
|
|
xmlns:wpfx="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="400" d:DesignWidth="768">
|
|
<UserControl.Resources>
|
|
<Style x:Key="MomentumItemStyle" TargetType="{x:Type telerik:RadGridView}">
|
|
</Style>
|
|
<local:IntValueConverter x:Key="IntFormat"/>
|
|
<local:DateValueConverter x:Key="DateFormat"/>
|
|
<local:RMultipleValueConverter x:Key="RMultipleFormat"/>
|
|
</UserControl.Resources>
|
|
<wpfx:BusyIndicator Name="BusyBar" IsBusy="{Binding Path=BusyIndicator}" BusyContent="{Binding Path=BusyContent}">
|
|
<Grid Background="LightGray">
|
|
<DockPanel>
|
|
<Grid DockPanel.Dock="Left" Margin="0,2,4,2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*" />
|
|
<ColumnDefinition Width="3" />
|
|
<ColumnDefinition Width="11*" />
|
|
<ColumnDefinition Width="3" />
|
|
<ColumnDefinition Width="11*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="35" />
|
|
<RowDefinition Height="3" />
|
|
<RowDefinition Height="1*" />
|
|
<RowDefinition Height="3" />
|
|
<RowDefinition Height="2*" />
|
|
</Grid.RowDefinitions>
|
|
<!--<Label Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="5" FontFamily="Arial" Content="{Binding Path=Title}" HorizontalAlignment="Center" FontSize="20"></Label>-->
|
|
<TextBox Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="5" FontFamily="Arial" BorderThickness="0" IsReadOnly="true" Background="Transparent" Text="{Binding Path=Title, Mode=OneWay}" HorizontalAlignment="Center" FontSize="20"></TextBox>
|
|
|
|
<StackPanel Orientation="Vertical" Grid.Row="2" Grid.RowSpan="5" Grid.Column="0">
|
|
<Label Content="Date" HorizontalAlignment="Left" ></Label>
|
|
<telerik:RadDatePicker SelectableDateStart="{Binding Path=SelectableDateStart}" SelectableDateEnd="{Binding Path=SelectableDateEnd}" VerticalAlignment="Top" HorizontalAlignment="Left" SelectedDate="{Binding Path=SelectedDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
<Label Content="Parameters" HorizontalAlignment="Left" ></Label>
|
|
<ComboBox ItemsSource="{Binding Path=Parameters, Mode=OneWay}" SelectedItem="{Binding Path=SelectedParameter, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" >
|
|
<ComboBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel/>
|
|
</ItemsPanelTemplate>
|
|
</ComboBox.ItemsPanel>
|
|
</ComboBox>
|
|
<TextBox Height="24" MinWidth="80" HorizontalAlignment="Stretch" IsReadOnly="true" Text="{Binding Path=ParameterValue, Mode=OneWay,ValidatesOnDataErrors=True, UpdateSourceTrigger=LostFocus}" Validation.ErrorTemplate="{x:Null}"/>
|
|
<Label Content="Tradeable Cash" HorizontalAlignment="Left" ></Label>
|
|
<TextBox Background="WhiteSmoke" Focusable="true" Height="24" MinWidth="80" HorizontalAlignment="Stretch" IsReadOnly="true" Text="{Binding Path=CashBalance, Mode=OneWay}" >
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip IsEnabled="true" HasDropShadow="True">
|
|
<TextBlock Background="LemonChiffon" Text="{Binding Path=TradeableCashDescription}"/>
|
|
</ToolTip>
|
|
</ToolTipService.ToolTip>
|
|
</TextBox>
|
|
<Label Content="Non-Tradeable Cash" HorizontalAlignment="Left" ></Label>
|
|
<TextBox Background="WhiteSmoke" Focusable="true" Height="24" MinWidth="80" HorizontalAlignment="Stretch" IsReadOnly="true" Text="{Binding Path=NonTradeableCash, Mode=OneWay}" >
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip IsEnabled="true" HasDropShadow="True">
|
|
<TextBlock Background="LemonChiffon" Text="{Binding Path=NonTradeableCashDescription}"/>
|
|
</ToolTip>
|
|
</ToolTipService.ToolTip>
|
|
</TextBox>
|
|
<Label Content="Monitor Interval (sec)" HorizontalAlignment="Left" ></Label>
|
|
<ComboBox ItemsSource="{Binding Path=MonitorIntervals, Mode=OneWay}" SelectedItem="{Binding Path=SelectedMonitorInterval, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}" >
|
|
<ComboBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel/>
|
|
</ItemsPanelTemplate>
|
|
</ComboBox.ItemsPanel>
|
|
</ComboBox>
|
|
<Button Margin="0,2" IsEnabled="{Binding Path=CanMonitor}" Content="{Binding Path=MonitorStatus}" HorizontalAlignment="Stretch" Command="{Binding Path=Monitor}"></Button>
|
|
<Button Content="Load Trade File" HorizontalAlignment="Stretch" Command="{Binding Path=LoadFile}"></Button>
|
|
<Button Content="Reload" HorizontalAlignment="Stretch" Command="{Binding Path=Reload}" IsEnabled="{Binding Path=ReloadEnabled}"></Button>
|
|
<Button Margin="0,2" Content="{Binding Path=PercentButtonText}" HorizontalAlignment="Left" Command="{Binding Path=ToggleReturnOrPercentCommand}"></Button>
|
|
<Label Content="Expectancy" HorizontalAlignment="Left" ></Label>
|
|
<TextBox Background="WhiteSmoke" Focusable="false" Height="24" MinWidth="80" HorizontalAlignment="Stretch" IsReadOnly="true" Text="{Binding Path=ModelExpectation, Mode=OneWay}" Foreground="{Binding Path=ExpectationColor}" >
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip IsEnabled="true" HasDropShadow="True">
|
|
<TextBlock Background="LemonChiffon" Text="{Binding Path=ExpectationDescription}"/>
|
|
</ToolTip>
|
|
</ToolTipService.ToolTip>
|
|
</TextBox>
|
|
</StackPanel>
|
|
|
|
<DockPanel x:Name="DockPanelA" Grid.Row="2" Grid.Column="2">
|
|
<telerik:RadGridView SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}" ItemContainerStyle="{StaticResource MomentumItemStyle}" AlternationCount="2" AlternateRowBackground="Bisque" ShowGroupFooters="True" ShowColumnFooters="True" ItemsSource="{Binding Path=AllItems, ValidatesOnDataErrors=True}" AutoGenerateColumns="False" >
|
|
<telerik:RadContextMenu.ContextMenu>
|
|
<telerik:RadContextMenu x:Name="GridContextMenu" StaysOpen="False" ItemsSource="{Binding CandidateMenuItems}">
|
|
<telerik:RadContextMenu.ItemContainerStyle>
|
|
<Style TargetType="telerik:RadMenuItem">
|
|
<Setter Property="Header" Value="{Binding Text}" />
|
|
<Setter Property="Command" Value="{Binding MenuItemClickedCommand}" />
|
|
<Setter Property="StaysOpenOnClick" Value="False" />
|
|
</Style>
|
|
</telerik:RadContextMenu.ItemContainerStyle>
|
|
</telerik:RadContextMenu>
|
|
</telerik:RadContextMenu.ContextMenu>
|
|
<telerik:RadGridView.Columns>
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Symbol" DataMemberBinding="{Binding Path=Symbol}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.CompanyDescription}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="AnalysisDate" DataMemberBinding="{Binding Path=AnalysisDate,StringFormat='{}{0:MM/dd/yyyy}'}" />
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="AnnualizedReturn" DataMemberBinding="{Binding Path=AnnualizedReturn,StringFormat='{}{0:N4}'}" />
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Score" DataMemberBinding="{Binding Path=Score,StringFormat='{}{0:N4}'}" />
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="EPSSlope" DataMemberBinding="{Binding Path=EPSSlope,StringFormat='{}{0:N4}'}" />
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="ProfitMarginSlope" DataMemberBinding="{Binding Path=ProfitMarginSlope,StringFormat='{}{0:N4}'}" />
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="PriceSlope" DataMemberBinding="{Binding Path=PriceSlope,StringFormat='{}{0:N4}'}" />
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Volatility" DataMemberBinding="{Binding Path=Volatility,StringFormat='{}{0:N4}'}" />
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="SharpeRatio" DataMemberBinding="{Binding Path=SharpeRatio,StringFormat='{}{0:N4}'}" />
|
|
</telerik:RadGridView.Columns>
|
|
</telerik:RadGridView>
|
|
</DockPanel>
|
|
|
|
<DockPanel x:Name="DockPanelB" Grid.Row="2" Grid.Column="4" Width="Auto" Height="Auto" >
|
|
<Border Grid.Row="0" Grid.Column="2" CornerRadius="6" BorderBrush="WhiteSmoke" Background="LightGray" BorderThickness="2" Padding="8" Width="Auto" Height="Auto">
|
|
<d3:ChartPlotter Width="Auto" Height="Auto" Background="WhiteSmoke" Name="gainLoss" Margin="10,10,20,10" dc:ChartPlotterLegendBehavior.LegendVisibleProperty="{Binding Path=LegendVisible}" LegendVisibility="Hidden" d3:Viewport2D.UsesApproximateContentBoundsComparison="False" BorderThickness="0">
|
|
<d3:ChartPlotter.MainHorizontalAxis>
|
|
<d3:HorizontalDateTimeAxis Name="dateAxis"/>
|
|
</d3:ChartPlotter.MainHorizontalAxis>
|
|
<d3:ChartPlotter.MainVerticalAxis>
|
|
<d3:VerticalAxis Name="countAxis"/>
|
|
</d3:ChartPlotter.MainVerticalAxis>
|
|
<d3:LineGraph d3:NewLegend.Description="Gain/Loss" d3:Viewport2D.UsesApproximateContentBoundsComparison="False" x:Name="Data" DataSource="{Binding Path=Data}" Stroke="MidnightBlue" StrokeThickness="2"/>
|
|
<d3:CursorCoordinateGraph Name="cursorGraph" dc:CoordinateGraphBehavior.XTextMappingProperty="MM/dd/yyyy" LineStrokeThickness="1"/>
|
|
<d3:Header FontFamily="Arial" Content="{Binding Path=GraphTitle}"/>
|
|
<d3:VerticalAxisTitle FontFamily="Arial" Content="Gain/Loss"/>
|
|
<d3:HorizontalAxisTitle FontFamily="Arial" Content="Date" />
|
|
</d3:ChartPlotter>
|
|
</Border>
|
|
</DockPanel>
|
|
|
|
<DockPanel x:Name="DockPanel2" Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="3" Width="Auto" Height="Auto">
|
|
<Grid>
|
|
<Grid x:Name="PositionsView" Visibility="Visible">
|
|
<telerik:RadGridView SelectedItem="{Binding Path=SelectedPosition, Mode=TwoWay}" ItemContainerStyle="{StaticResource MomentumItemStyle}" AlternationCount="2" AlternateRowBackground="Bisque" ShowGroupFooters="True" ShowColumnFooters="True" ItemsSource="{Binding Path=AllPositions, ValidatesOnDataErrors=True}" AutoGenerateColumns="False" >
|
|
<telerik:RadContextMenu.ContextMenu>
|
|
<telerik:RadContextMenu x:Name="PositionGridContextMenu" StaysOpen="False" ItemsSource="{Binding PositionsMenuItems}">
|
|
<telerik:RadContextMenu.ItemContainerStyle>
|
|
<Style TargetType="telerik:RadMenuItem">
|
|
<Setter Property="Header" Value="{Binding Text}" />
|
|
<Setter Property="Command" Value="{Binding MenuItemClickedCommand}" />
|
|
<Setter Property="StaysOpenOnClick" Value="False" />
|
|
</Style>
|
|
</telerik:RadContextMenu.ItemContainerStyle>
|
|
</telerik:RadContextMenu>
|
|
</telerik:RadContextMenu.ContextMenu>
|
|
<telerik:RadGridView.Columns>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Symbol" DataMemberBinding="{Binding Path=Symbol}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.CompanyDescriptionSelectedPosition}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=Symbol}" Foreground="{Binding Path=SymbolColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Purchased" DataMemberBinding="{Binding Path=PurchaseDate,StringFormat='{}{0:MM/dd/yyyy}'}" >
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=PurchaseDate,StringFormat='{}{0:MM/dd/yyyy}'}" Foreground="{Binding Path=PurchaseDateColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Sold" DataMemberBinding="{Binding Path=SellDate,Converter={StaticResource DateFormat}}" >
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=SellDate,Converter={StaticResource DateFormat}}" Foreground="{Binding Path=SellDateColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Days" DataMemberBinding="{Binding Path=DaysHeld}" >
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=DaysHeld}" Foreground="{Binding Path=DaysHeldColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Shares" DataMemberBinding="{Binding Path=Shares,StringFormat='{}{0:N0}'}" >
|
|
<telerik:GridViewDataColumn.AggregateFunctions>
|
|
<local:CMTTrendPositionSumFunctionShares />
|
|
</telerik:GridViewDataColumn.AggregateFunctions>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=Shares}" Foreground="{Binding Path=SharesColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Purchase Price" DataMemberBinding="{Binding Path=PurchasePrice,StringFormat='{}{0:C}'}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipPurchasePrice}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=PurchasePrice,StringFormat='{}{0:C}'}" Foreground="{Binding Path=PurchasePriceColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Current Price" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipPrice}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=CurrentPrice,StringFormat='{}{0:C}'}" Foreground="{Binding Path=CurrentPriceColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Price Low" DataMemberBinding="{Binding Path=CurrentPriceLowAsString,StringFormat='{}{0:S}'}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipPriceLow}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=CurrentPriceLowAsString,StringFormat='{}{0:C}'}" Foreground="{Binding Path=CurrentPriceLowAsStringColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Initial Stop" DataMemberBinding="{Binding Path=InitialStopLimit,StringFormat='{}{0:C}'}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipInitialStop}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=InitialStopLimit,StringFormat='{}{0:C}'}" Foreground="{Binding Path=InitialStopLimitColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Trailing Stop" DataMemberBinding="{Binding Path=TrailingStopLimit,StringFormat='{}{0:C}'}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipTrailingStop}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=TrailingStopLimit,StringFormat='{}{0:C}'}" Foreground="{Binding Path=TrailingStopLimitColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="R/Share" DataMemberBinding="{Binding Path=R,StringFormat='{}{0:C}'}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipR}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=R,StringFormat='{}{0:C}'}" Foreground="{Binding Path=RColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Risk" DataMemberBinding="{Binding Path=TotalRiskExposure,StringFormat='{}{0:C}'}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipTotalRiskExposure}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.AggregateFunctions>
|
|
<local:CMTTrendPositionSumFunctionRisk />
|
|
</telerik:GridViewDataColumn.AggregateFunctions>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=TotalRiskExposure,StringFormat='{}{0:C}'}" Foreground="{Binding Path=TotalRiskExposureColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<!--<telerik:GridViewDataColumn IsReadOnly="True" Header="RMultiple" DataMemberBinding="{Binding Path=RMultipleAsString,StringFormat='{}{0:S}'}" >-->
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="RMultiple" DataMemberBinding="{Binding Path=RMultiple,Converter={StaticResource RMultipleFormat}}" >
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipRMultiple}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=RMultipleAsString,StringFormat='{}{0:S}'}" Foreground="{Binding Path=RMultipleColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="E-Ratio" DataMemberBinding="{Binding Path=EdgeRatioAsString,StringFormat='{}{0:S}'}" >
|
|
<telerik:GridViewDataColumn.AggregateFunctions>
|
|
<local:CMTTrendPositionSumFunctionEdgeRatio />
|
|
</telerik:GridViewDataColumn.AggregateFunctions>
|
|
<telerik:GridViewColumn.ToolTipTemplate>
|
|
<DataTemplate >
|
|
<StackPanel Orientation="Horizontal" >
|
|
<TextBlock Background="LemonChiffon" MaxWidth="1000" TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type vw:CMTTrendView}},Path=DataContext.ToolTipEdgeRatio}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</telerik:GridViewColumn.ToolTipTemplate>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=EdgeRatioAsString,StringFormat='{}{0:S}'}" Foreground="{Binding Path=EdgeRatioAsStringColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Exposure">
|
|
<telerik:GridViewDataColumn.AggregateFunctions>
|
|
<local:CMTTrendPositionSumFunctionExposure />
|
|
</telerik:GridViewDataColumn.AggregateFunctions>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=ActiveExposure,StringFormat='{}{0:C}'}" Foreground="{Binding Path=ActiveExposureColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Market Value">
|
|
<telerik:GridViewDataColumn.AggregateFunctions>
|
|
<local:CMTTrendPositionSumFunctionMarketValue />
|
|
</telerik:GridViewDataColumn.AggregateFunctions>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=ActiveMarketValue,StringFormat='{}{0:C}'}" Foreground="{Binding Path=ActiveMarketValueColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="GainLoss" >
|
|
<telerik:GridViewDataColumn.AggregateFunctions>
|
|
<local:CMTTrendPositionSumFunctionGainLoss />
|
|
</telerik:GridViewDataColumn.AggregateFunctions>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=GainLoss,StringFormat='{}{0:C}'}" Foreground="{Binding Path=GainLossColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="GainLoss(%)" >
|
|
<telerik:GridViewDataColumn.AggregateFunctions>
|
|
<local:CMTTrendPositionSumFunctionGainLossPcnt />
|
|
</telerik:GridViewDataColumn.AggregateFunctions>
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=GainLossPcnt,StringFormat='{}{0:P3}'}" Foreground="{Binding Path=GainLossPcntColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Last Stop Adj." DataMemberBinding="{Binding Path=LastStopAdjustment,Converter={StaticResource DateFormat}}" >
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=LastStopAdjustment,Converter={StaticResource DateFormat}}" Foreground="{Binding Path=LastStopAdjustmentColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Days" DataMemberBinding="{Binding Path=DaysSinceLastStopAdjustment,Converter={StaticResource IntFormat},ConverterParameter=0}" >
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=DaysSinceLastStopAdjustment,Converter={StaticResource IntFormat},ConverterParameter=0}" Foreground="{Binding Path=DaysSinceLastStopAdjustmentColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
<telerik:GridViewDataColumn IsReadOnly="True" Header="Updated" DataMemberBinding="{Binding Path=LastUpdated,StringFormat='{}{0:MM/dd/yyyy HH:mm:ss}'}" >
|
|
<telerik:GridViewDataColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Path=LastUpdated,StringFormat='{}{0:MM/dd/yyyy HH:mm:ss}'}" Foreground="{Binding Path=LastUpdatedColor}"/>
|
|
</DataTemplate>
|
|
</telerik:GridViewDataColumn.CellTemplate>
|
|
</telerik:GridViewDataColumn>
|
|
|
|
</telerik:RadGridView.Columns>
|
|
</telerik:RadGridView>
|
|
</Grid>
|
|
</Grid>
|
|
</DockPanel>
|
|
<GridSplitter Panel.ZIndex="1" Background="LightBlue" ResizeDirection="Rows" Grid.Column="2" Grid.ColumnSpan="5" Grid.Row="3" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0"/>
|
|
<GridSplitter Grid.Row="1" Grid.Column="1" ResizeDirection="Columns" Grid.RowSpan="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="LightBlue" Width="3"/>
|
|
<GridSplitter Grid.Row="1" Grid.Column="3" ResizeDirection="Columns" Grid.RowSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="LightBlue" Width="3"/>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Grid>
|
|
</wpfx:BusyIndicator>
|
|
</UserControl>
|
|
|
|
|
|
|