17 using System.Collections.Generic;
19 using System.Runtime.CompilerServices;
33 public static partial class Messages
43 [MethodImpl(MethodImplOptions.AggressiveInlining)]
46 return Invariant($
"Warning: fill at stale price ({prices.EndTime.ToStringInvariant()} {security.Exchange.TimeZone})");
53 [MethodImpl(MethodImplOptions.AggressiveInlining)]
56 return Invariant($
"Market never closes for this symbol {security.Symbol}, can no submit a {nameof(orderType)} order.");
62 [MethodImpl(MethodImplOptions.AggressiveInlining)]
63 private static string SubscribedTypesToString(HashSet<Type> subscribedTypes)
65 return subscribedTypes ==
null
67 : Invariant($
" SubscribedTypes: [{string.Join(",
", subscribedTypes.Select(type => type.Name))}]");
74 [MethodImpl(MethodImplOptions.AggressiveInlining)]
77 return Invariant($
"Cannot get ask price to perform fill for {security.Symbol} because no market data was found.") +
78 SubscribedTypesToString(subscribedTypes);
85 [MethodImpl(MethodImplOptions.AggressiveInlining)]
88 return Invariant($
"Cannot get bid price to perform fill for {security.Symbol} because no market data was found.") +
89 SubscribedTypesToString(subscribedTypes);
96 [MethodImpl(MethodImplOptions.AggressiveInlining)]
99 return Invariant($
"Cannot perform fill for {security.Symbol} because no data subscription were found.");
112 "No trade with the OfficialOpen or OpeningPrints flag within the 1-minute timeout.";
118 "No trade with the OfficialClose or ClosingPrints flag within the 1-minute timeout.";
125 "No trade with the OfficialClose or ClosingPrints flag for data that does not include extended market hours.";
130 [MethodImpl(MethodImplOptions.AggressiveInlining)]
133 return Invariant($
"Fill with last {tick.TickType} data.");
140 [MethodImpl(MethodImplOptions.AggressiveInlining)]
143 return Invariant($
@"Warning: No trade information available at {security.LocalTime.ToStringInvariant()} {
144 security.Exchange.TimeZone}, order filled using Quote data");
151 [MethodImpl(MethodImplOptions.AggressiveInlining)]
154 return Invariant($
@"Warning: fill at stale price ({quoteTick.EndTime.ToStringInvariant()} {
155 security.Exchange.TimeZone}), using Quote Tick data.");
162 [MethodImpl(MethodImplOptions.AggressiveInlining)]
165 return Invariant($
@"Warning: No quote information available at {tradeTick.EndTime.ToStringInvariant()} {
166 security.Exchange.TimeZone}, order filled using Trade Tick data");
173 [MethodImpl(MethodImplOptions.AggressiveInlining)]
176 return Invariant($
@"Warning: fill at stale price ({quoteBar.EndTime.ToStringInvariant()} {
177 security.Exchange.TimeZone}), using QuoteBar data.");
184 [MethodImpl(MethodImplOptions.AggressiveInlining)]
187 return Invariant($
@"Warning: No quote information available at {tradeBar.EndTime.ToStringInvariant()} {
188 security.Exchange.TimeZone}, order filled using TradeBar data");
194 [MethodImpl(MethodImplOptions.AggressiveInlining)]
197 return Invariant($
@"Due to a favorable gap at {tradeBar.EndTime.ToStringInvariant()} {security.Exchange.TimeZone}, order filled using the open price ({tradeBar.Open})");
203 [MethodImpl(MethodImplOptions.AggressiveInlining)]
206 return Invariant($
@"Due to an unfavorable gap at {tradeBar.EndTime.ToStringInvariant()} {security.Exchange.TimeZone}, order filled using the open price ({tradeBar.Open})");