﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">ошибка при запуске BasketStrategy</title>
  <id>~/topic/3074/oshibka-pri-zapuske-basketstrategy/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-21T09:59:16Z</updated>
  <logo>https://stocksharp.ru/images/logo.png</logo>
  <link href="https://stocksharp.ru/handlers/atom.ashx?category=topic&amp;id=3074" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.ru/posts/m/21767/</id>
    <title type="text">последняя версия - 4.1.5 </title>
    <published>2012-10-12T01:00:40Z</published>
    <updated>2012-10-12T01:00:40Z</updated>
    <author>
      <name>Alexander</name>
      <uri>https://stocksharp.ru/users/2826/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;последняя версия - 4.1.5&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/21761/</id>
    <title type="text">спасибо за ответ! кстати, в примере про дельта хеджирование инструмент вроде тоже не инициализируетс...</title>
    <published>2012-10-11T15:26:45Z</published>
    <updated>2012-10-11T16:19:29Z</updated>
    <author>
      <name>Ant.On.</name>
      <uri>https://stocksharp.ru/users/6276/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;спасибо за ответ!
кстати, в примере про дельта хеджирование инструмент вроде тоже не инициализируется.. вообще какой он должен быть для BasketStrategy, если каждая дочерняя со своим работает?
Возникла другая проблема (возможно не только с BasketStrategy)
при добавлении дочерней стратегии в стратегию, где Trader=RealTimeEmulationTrader&amp;lt;QuikTrader&amp;gt; возникает такой exception. S# версия 4.1.3&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;System.ArgumentException was unhandled
Message=An item with the same key has already been added.
Source=mscorlib
StackTrace:
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary&lt;code&gt;2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary&lt;/code&gt;2.Add(TKey key, TValue value)
at Ecng.Collections.SynchronizedDictionary&lt;code&gt;2.Add(TKey key, TValue value) at Ecng.Collections.CachedSynchronizedDictionary&lt;/code&gt;2.Add(TKey key, TValue value)
at StockSharp.Algo.Slippage.SlippageManager.Register(Order order, Decimal estimatedPrice)
at StockSharp.Algo.Slippage.SlippageManager.Register(Order order)
at StockSharp.Algo.Strategies.Strategy.#=qAF$cAaWD8w6Sf0n2jICfhn3SnIpbRRHW0JdqTYJw4BU=.#=q6LA44T$FSqxi6oZ3W2ppWZVAK415i9fMe2wqeMO4F28=()
at StockSharp.Algo.Strategies.Strategy.#=qfgs3t3F0QJo2uAeiNU2Ttpv2pumAF4y2coQRpub6uDk=.#=qg_9r_6HVmeb3crTgbQEYyZG1aCymBtmmqXvLAMXxG1s=()
at StockSharp.Algo.Strategies.Strategy.#=qDi$TOxQqFULo7BC_ufyNgU4LgLgC6leIVgzHqovrf2Y=.#=qGOiRqrNYsm05dsneYckP8g==(Action #=qZ1RO65PUdyczAFAlB5vbMg==)
at StockSharp.Algo.Strategies.Strategy.#=qE_CXVx3b6gFmJBM42_6QlA==(Action #=qWIPEEA7aG$_X1GVNHJoYng==)
at StockSharp.Algo.Strategies.Strategy.AddOrder(Order order)
at Ecng.Collections.CollectionHelper.ForEach(IEnumerable&lt;code&gt;1 source, Action&lt;/code&gt;1 action)
at StockSharp.Algo.Strategies.Strategy.#=qItQ_g_CJFenTf_DUQIRiSZ75O5671OlCK3jDT_6AHjs=.OnAdded(Strategy #=qLIZqpJfr9DarPEyQ3YDiyg==)
at Ecng.Collections.BaseCollection&lt;code&gt;2.Add(TItem item) at Ecng.Collections.SynchronizedCollection&lt;/code&gt;2.Add(TItem item)
at Robostock.PairTrader.PutOnPT() in c:\tmp\AlgoTrading\S# 4.1.3 Src\Robostock\Robostock\PairTrader.cs:line 110
at Robostock.MainWindow.trade_Click(Object sender, RoutedEventArgs e) in c:\tmp\AlgoTrading\S# 4.1.3 Src\Robostock\Robostock\MainWindow.xaml.cs:line 201
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp;amp; msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Robostock.App.Main() in c:\tmp\AlgoTrading\S# 4.1.3 Src\Robostock\Robostock\obj\x86\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
такая ошибка связана именно с тем что вместо трейдера Эмулятор. Как-нибудь можно обойти это? Заранее спасибо!&lt;/p&gt;
&lt;/blockquote&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/21756/</id>
    <title type="text">В том, что вы не инициализировали инструмент у BasketStrategy, как и написано в ошибке. </title>
    <published>2012-10-11T06:50:13Z</published>
    <updated>2012-10-11T06:50:13Z</updated>
    <author>
      <name>Alexander</name>
      <uri>https://stocksharp.ru/users/2826/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;В том, что вы не инициализировали инструмент у BasketStrategy, как и написано в ошибке.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/21737/</id>
    <title type="text">код: BasketStrategy quote = new BasketStrategy(BasketStrategyFinishModes.All); quote.ChildStrategies...</title>
    <published>2012-10-10T16:14:04Z</published>
    <updated>2012-10-10T16:14:04Z</updated>
    <author>
      <name>Ant.On.</name>
      <uri>https://stocksharp.ru/users/6276/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;код:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-csharp"&gt;            BasketStrategy quote = new BasketStrategy(BasketStrategyFinishModes.All);
            quote.ChildStrategies.Add(quoter_1);
            quote.ChildStrategies.Add(quoter_2);
            this.ChildStrategies.Add(quote);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ошибка:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2012/10/10 19:54:34.203|Error  |BS_SPBFUT006GJ|System.InvalidOperationException: Инструмент не инициализирован.
at StockSharp.Algo.Strategies.Strategy.OnStarted()
at StockSharp.Algo.Strategies.BasketStrategy.OnStarted()
at StockSharp.Algo.Strategies.Strategy.#=qPumxDV5SBHuCYTq_cqUWVTizHkIhg6MP_9mOGwi1SYU=(ProcessStates #=qeRNChQaniV4oK7zWNidypQ==)
В чем может быть дело?&lt;/p&gt;
&lt;/blockquote&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>