16 using System.Runtime.CompilerServices;
27 public static partial class Messages
34 [MethodImpl(MethodImplOptions.AggressiveInlining)]
35 public static string InvalidMarketDataType(
BaseData data)
37 return $
"VolumeShareSlippageModel.GetSlippageApproximation(): Cannot use this model with market data type {data.GetType()}";
40 [MethodImpl(MethodImplOptions.AggressiveInlining)]
41 public static string VolumeNotReportedForMarketDataType(
SecurityType securityType)
43 return Invariant($
"VolumeShareSlippageModel.GetSlippageApproximation(): {securityType} security type often ") +
44 "does not report volume. If you intend to model slippage beyond the spread, please consider another model.";
47 [MethodImpl(MethodImplOptions.AggressiveInlining)]
48 public static string NegativeOrZeroBarVolume(decimal barVolume, decimal slippagePercent)
50 return Invariant($
@"VolumeShareSlippageModel.GetSlippageApproximation: Bar volume cannot be zero or negative. Volume: {
51 barVolume}. Using maximum slippage percentage of {slippagePercent}");