Code cleanup.
This commit is contained in:
@@ -40,14 +40,14 @@ namespace MarketData.Generator.CMTrend
|
||||
return cmtCandidate;
|
||||
}
|
||||
// Check if the symbol is held in any open positions
|
||||
if(null!=symbolsHeld&&symbolsHeld.Any(x => x.Equals(symbol)))
|
||||
if(null!=symbolsHeld&&symbolsHeld.Any(x => x.Equals(symbol, StringComparison.CurrentCultureIgnoreCase)))
|
||||
{
|
||||
cmtCandidate.Violation=true;
|
||||
cmtCandidate.Reason=String.Format("{0} is already held.",symbol);
|
||||
return cmtCandidate;
|
||||
}
|
||||
// No trade symbols
|
||||
if(null!=cmtParams.NoTradeSymbolsList&&cmtParams.NoTradeSymbolsList.Any(x => x.Equals(symbol)))
|
||||
if(null!=cmtParams.NoTradeSymbolsList&&cmtParams.NoTradeSymbolsList.Any(x => x.Equals(symbol, StringComparison.CurrentCultureIgnoreCase)))
|
||||
{
|
||||
cmtCandidate.Violation=true;
|
||||
cmtCandidate.Reason=String.Format("{0} is in the No-Trade list.",symbol);
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace MarketData.Generator.CMTrend
|
||||
public CMTParams Parameters { get; set; }
|
||||
private int MaxDailyPositions { get { return Parameters.MaxDailyPositions; } }
|
||||
private int MaxOpenPositions { get { return Parameters.MaxOpenPositions; } }
|
||||
private List<String> NoTradeSymbols { get { return Utility.ToList(Parameters.NoTradeSymbols); } }
|
||||
private int MaxPricingExceptions { get { return Parameters.MaxPricingExceptions; } }
|
||||
private ActivePositions ActivePositions { get; set; }
|
||||
private Positions AllPositions { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user