Fix format for pricing.
This commit is contained in:
@@ -224,7 +224,7 @@ namespace TradeBlotter.ViewModels
|
||||
{
|
||||
get
|
||||
{
|
||||
return Utility.FormatCurrency(trade.Price,3);
|
||||
return Utility.FormatPrice(trade.Price);
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -261,7 +261,7 @@ namespace TradeBlotter.ViewModels
|
||||
{
|
||||
get
|
||||
{
|
||||
return Utility.FormatCurrency(trade.SellPrice);
|
||||
return Utility.FormatPrice(trade.SellPrice);
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
@@ -98,7 +98,8 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
public String SellPrice
|
||||
{
|
||||
get { return trade.IsClosed?Utility.FormatCurrency(trade.SellPrice):Constants.CONST_DASHES; }
|
||||
// get { return trade.IsClosed?Utility.FormatCurrency(trade.SellPrice):Constants.CONST_DASHES; }
|
||||
get { return trade.IsClosed?Utility.FormatPrice(trade.SellPrice):Constants.CONST_DASHES; }
|
||||
set { trade.SellPrice = double.Parse(value); base.OnPropertyChanged("SellPrice"); }
|
||||
}
|
||||
public String Account
|
||||
@@ -146,7 +147,8 @@ namespace TradeBlotter.ViewModels
|
||||
{
|
||||
get
|
||||
{
|
||||
return Utility.FormatCurrency(trade.LatestPrice);
|
||||
return Utility.FormatPrice(trade.LatestPrice);
|
||||
// return Utility.FormatCurrency(trade.LatestPrice);
|
||||
}
|
||||
set { trade.LatestPrice = double.Parse(value); base.OnPropertyChanged("CurrentPrice"); }
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<local:SumFunctionShares />
|
||||
</telerik:GridViewDataColumn.AggregateFunctions>
|
||||
</telerik:GridViewDataColumn>
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="Price" DataMemberBinding="{Binding Path=Price,StringFormat='{}{0:C}'}" />
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="Price" DataMemberBinding="{Binding Path=Price,StringFormat='{}{0:C3}'}" />
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="DaysHeld" DataMemberBinding="{Binding Path=DaysHeld}" />
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="Exposure" DataMemberBinding="{Binding Path=Exposure,StringFormat='{}{0:C}'}" >
|
||||
<telerik:GridViewDataColumn.AggregateFunctions>
|
||||
|
||||
@@ -188,12 +188,13 @@
|
||||
<local:CMMomentumPositionSumFunctionShares />
|
||||
</telerik:GridViewDataColumn.AggregateFunctions>
|
||||
</telerik:GridViewDataColumn>
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="Purch.Price" DataMemberBinding="{Binding Path=PurchasePrice,StringFormat='{}{0:C}'}" />
|
||||
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="Purch.Price" DataMemberBinding="{Binding Path=PurchasePrice,StringFormat='{}{0:C3}'}" />
|
||||
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="CurrentPrice" >
|
||||
<telerik:GridViewDataColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=CurrentPrice,StringFormat='{}{0:C}'}" Foreground="{Binding Path=CurrentPriceColor}"/>
|
||||
<TextBlock Text="{Binding Path=CurrentPrice,StringFormat='{}{0:C3}'}" Foreground="{Binding Path=CurrentPriceColor}"/>
|
||||
</DataTemplate>
|
||||
</telerik:GridViewDataColumn.CellTemplate>
|
||||
</telerik:GridViewDataColumn>
|
||||
|
||||
@@ -208,12 +208,12 @@
|
||||
<local:MomentumPositionSumFunctionShares />
|
||||
</telerik:GridViewDataColumn.AggregateFunctions>
|
||||
</telerik:GridViewDataColumn>
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="Purch.Price" DataMemberBinding="{Binding Path=PurchasePrice,StringFormat='{}{0:C}'}" />
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="Purch.Price" DataMemberBinding="{Binding Path=PurchasePrice,StringFormat='{}{0:C3}'}" />
|
||||
|
||||
<telerik:GridViewDataColumn IsReadOnly="True" Header="CurrentPrice" >
|
||||
<telerik:GridViewDataColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=CurrentPrice,StringFormat='{}{0:C}'}" Foreground="{Binding Path=CurrentPriceColor}"/>
|
||||
<TextBlock Text="{Binding Path=CurrentPrice,StringFormat='{}{0:C3}'}" Foreground="{Binding Path=CurrentPriceColor}"/>
|
||||
</DataTemplate>
|
||||
</telerik:GridViewDataColumn.CellTemplate>
|
||||
</telerik:GridViewDataColumn>
|
||||
|
||||
Reference in New Issue
Block a user