diff --git a/PortfolioManager/App.axaml.cs b/PortfolioManager/App.axaml.cs index a30e6b1..fef23c3 100644 --- a/PortfolioManager/App.axaml.cs +++ b/PortfolioManager/App.axaml.cs @@ -9,7 +9,7 @@ using PortfolioManager.Views; using System; using System.ComponentModel; using Avalonia.Controls; -using Axiom.Utils; +using MarketData; namespace PortfolioManager; diff --git a/PortfolioManager/Cache/ImageCache.cs b/PortfolioManager/Cache/ImageCache.cs index 56a82be..5eed752 100644 --- a/PortfolioManager/Cache/ImageCache.cs +++ b/PortfolioManager/Cache/ImageCache.cs @@ -4,7 +4,7 @@ using Avalonia.Media; using Avalonia.Media.Imaging; using System.Linq; using System.IO; -using Axiom.Utils; +using MarketData; namespace PortfolioManager.Cache { @@ -43,7 +43,7 @@ namespace PortfolioManager.Cache public static ImageCache GetInstance() { - lock (typeof(SymbolCache)) + lock (typeof(ImageCache)) { if (null == imageCacheInstance) imageCacheInstance = new ImageCache(); return imageCacheInstance; diff --git a/PortfolioManager/Renderers/BollingerBandRenderer.cs b/PortfolioManager/Renderers/BollingerBandRenderer.cs index 8b724da..fa5acb6 100644 --- a/PortfolioManager/Renderers/BollingerBandRenderer.cs +++ b/PortfolioManager/Renderers/BollingerBandRenderer.cs @@ -287,7 +287,8 @@ namespace PortfolioManager.Renderers double percentOffsetFromLow = ((latestPrice.Low - limit.StopPrice) / limit.StopPrice); sb.Append(" (").Append(percentOffsetFromLow > 0 ? "+" : "").Append(Utility.FormatPercent(percentOffsetFromLow)).Append(")"); } - Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), 155, 24, FontFactor.FontSize); +// Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), 155, 24, FontFactor.FontSize); + Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), FontFactor.FontSize); Coordinates coordinates = new Coordinates(limit.EffectiveDate.ToOADate(), limit.StopPrice - offsets.Offset(OffsetDictionary.OffsetType.VerticalOffset5PC)); ImageMarker imageMarker = Plotter.Plot.Add.ImageMarker(coordinates, image); } @@ -303,7 +304,8 @@ namespace PortfolioManager.Renderers sb.Append(stopLimit.StopType).Append(" "); sb.Append(Utility.FormatCurrency(stopLimit.StopPrice)); sb.Append(" (").Append(percentOffsetFromLow > 0 ? "+" : "").Append(Utility.FormatPercent(percentOffsetFromLow)).Append(")"); - Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), 155, 24, FontFactor.FontSize); +// Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), 155, 24, FontFactor.FontSize); + Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), FontFactor.FontSize); Coordinates coordinates = new Coordinates(latestPrice.Date.ToOADate() - offsets.Offset(OffsetDictionary.OffsetType.HorizontalOffset3PC), stopLimit.StopPrice - offsets.Offset(OffsetDictionary.OffsetType.VerticalOffset5PC)); ImageMarker imageMarker = Plotter.Plot.Add.ImageMarker(coordinates, image); } @@ -335,8 +337,8 @@ namespace PortfolioManager.Renderers sb.Append(Utility.FormatNumber(portfolioTrade.Shares)); sb.Append("@"); sb.Append(Utility.FormatCurrency(portfolioTrade.Price)); - - Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), 130, 24, FontFactor.FontSize); +// Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), 130, 24, FontFactor.FontSize); + Image image = TextMarkerImageGenerator.GenerateImage(sb.ToString(), FontFactor.FontSize); Coordinates coordinates = new Coordinates(portfolioTrade.TradeDate.ToOADate(), portfolioTrade.Price - offsets.Offset(OffsetDictionary.OffsetType.VerticalOffset5PC)); ImageMarker imageMarker = Plotter.Plot.Add.ImageMarker(coordinates, image); } diff --git a/PortfolioManager/ViewModels/CMMomentumViewModel.cs b/PortfolioManager/ViewModels/CMMomentumViewModel.cs index 959393f..795f405 100644 --- a/PortfolioManager/ViewModels/CMMomentumViewModel.cs +++ b/PortfolioManager/ViewModels/CMMomentumViewModel.cs @@ -351,7 +351,7 @@ namespace PortfolioManager.ViewModels public async Task ExecuteBollingerBands() { - SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,360"); + SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,90"); saveParams.Referer=this; WorkspaceInstantiator.Invoke(saveParams); await Task.FromResult(true); diff --git a/PortfolioManager/ViewModels/CMTrendViewModel.cs b/PortfolioManager/ViewModels/CMTrendViewModel.cs index 207330f..e6b32a7 100644 --- a/PortfolioManager/ViewModels/CMTrendViewModel.cs +++ b/PortfolioManager/ViewModels/CMTrendViewModel.cs @@ -349,7 +349,7 @@ namespace PortfolioManager.ViewModels // ********************************************************************************************************************************* public async Task ExecuteBollingerBands() { - SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,360"); + SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,90"); saveParams.Referer=this; WorkspaceInstantiator.Invoke(saveParams); await Task.FromResult(true); diff --git a/PortfolioManager/ViewModels/MGSHMomentumViewModel.cs b/PortfolioManager/ViewModels/MGSHMomentumViewModel.cs index f33f3ec..17f6834 100644 --- a/PortfolioManager/ViewModels/MGSHMomentumViewModel.cs +++ b/PortfolioManager/ViewModels/MGSHMomentumViewModel.cs @@ -179,7 +179,7 @@ namespace PortfolioManager.ViewModels public async Task ExecuteBollingerBands() { - SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,360"); + SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,90"); saveParams.Referer=this; WorkspaceInstantiator.Invoke(saveParams); await Task.FromResult(true); diff --git a/PortfolioManager/ViewModels/MainWindowViewModel.cs b/PortfolioManager/ViewModels/MainWindowViewModel.cs index 596b719..255e0f5 100644 --- a/PortfolioManager/ViewModels/MainWindowViewModel.cs +++ b/PortfolioManager/ViewModels/MainWindowViewModel.cs @@ -5,7 +5,7 @@ using System.Collections.Specialized; using System.Runtime.CompilerServices; using System.Text; using Avalonia.Threading; -using Axiom.Utils; +using MarketData; using MarketData.Cache; using MarketData.DataAccess; using PortfolioManager.Cache; diff --git a/PortfolioManager/ViewModels/ModelBase.cs b/PortfolioManager/ViewModels/ModelBase.cs index 7e3893a..91e1825 100644 --- a/PortfolioManager/ViewModels/ModelBase.cs +++ b/PortfolioManager/ViewModels/ModelBase.cs @@ -3,7 +3,7 @@ using System.ComponentModel; using System.Diagnostics; using Avalonia.Controls; using Avalonia.Controls.ApplicationLifetimes; -using Axiom.Utils; +using MarketData; namespace PortfolioManager.ViewModels { diff --git a/PortfolioManager/ViewModels/MomentumViewModel.cs b/PortfolioManager/ViewModels/MomentumViewModel.cs index e02f70b..09595f8 100644 --- a/PortfolioManager/ViewModels/MomentumViewModel.cs +++ b/PortfolioManager/ViewModels/MomentumViewModel.cs @@ -348,7 +348,7 @@ namespace PortfolioManager.ViewModels // **************************************************************************************************************************************** public async Task ExecuteBollingerBands() { - SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,360"); + SaveParameters saveParams = SaveParameters.Parse("Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol," + selectedPosition.Symbol + ",SelectedWatchList,{All},SelectedDayCount,90"); saveParams.Referer=this; WorkspaceInstantiator.Invoke(saveParams); await Task.FromResult(true); diff --git a/PortfolioManager/saveparams.config b/PortfolioManager/saveparams.config index f259450..342141f 100644 --- a/PortfolioManager/saveparams.config +++ b/PortfolioManager/saveparams.config @@ -1,19 +1,9 @@ +Type,PortfolioManager.ViewModels.MGSHMomentumViewModel,PathFileName,C:\boneyard\marketdata\Sessions\MGSH20250331.TXT +Type,PortfolioManager.ViewModels.MomentumViewModel,PathFileName,C:\boneyard\marketdata\Sessions\MG20180131.TXT +Type,PortfolioManager.ViewModels.CMMomentumViewModel,PathFileName,C:\boneyard\marketdata\Sessions\CM20191031.TXT +Type,PortfolioManager.ViewModels.CMTrendViewModel,PathFileName,C:\boneyard\marketdata\Sessions\CMT20200817.TXT +Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,SPOT,SelectedWatchList,Valuations,SelectedDayCount,90,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True +Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,GWRE,SelectedWatchList,Valuations,SelectedDayCount,90,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,CRS,SelectedWatchList,Valuations,SelectedDayCount,90,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,SPY,SelectedWatchList,Valuations,SelectedDayCount,180,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,CRK,SelectedWatchList,Valuations,SelectedDayCount,90,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,JFNNX,SelectedWatchList,Valuations,SelectedDayCount,180,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,VSTCX,SelectedWatchList,Valuations,SelectedDayCount,180,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,PSO,SelectedWatchList,Valuations,SelectedDayCount,180,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,PRIM,SelectedWatchList,Valuations,SelectedDayCount,180,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,RNMBY,SelectedWatchList,Valuations,SelectedDayCount,180,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,DRD,SelectedWatchList,Valuations,SelectedDayCount,180,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.MGSHMomentumViewModel,PathFileName,C:\3\MGSH20250331.TXT -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,SXT,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,RGLD,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,PSO,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,TSCDY,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,DBX,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,NRG,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,OPRA,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,MO,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True -Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,EXC,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True +Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,SPY,SelectedWatchList,Valuations,SelectedDayCount,360,SyncTradeToBand,False,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True +Type,PortfolioManager.ViewModels.BollingerBandViewModel,SelectedSymbol,OPRA,SelectedWatchList,Valuations,SelectedDayCount,90,SyncTradeToBand,True,ShowTradeLabels,True,UseLeastSquaresFit,True,ShowInsiderTransactions,True