﻿<?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">Правило WhenBestAskPriceMore</title>
  <id>~/topic/2869/pravilo-whenbestaskpricemore/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-04-09T06:17:41Z</updated>
  <logo>https://stocksharp.ru/images/logo.png</logo>
  <link href="https://stocksharp.ru/handlers/atom.ashx?category=topic&amp;id=2869" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.ru/posts/m/20458/</id>
    <title type="text">Большое спасибо, понял</title>
    <published>2012-07-22T17:19:15Z</published>
    <updated>2012-07-22T17:19:15Z</updated>
    <author>
      <name>profso</name>
      <uri>https://stocksharp.ru/users/27638/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">Большое спасибо, понял</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/20454/</id>
    <title type="text">security.BestAsk = null у вас</title>
    <published>2012-07-20T10:45:11Z</published>
    <updated>2012-07-20T10:45:11Z</updated>
    <author>
      <name>Alexander</name>
      <uri>https://stocksharp.ru/users/2826/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">security.BestAsk = null у вас</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/20430/</id>
    <title type="text">System.ArgumentException: {&amp;quot;В стакане отсутствует котировка.\r\nИмя параметра: getQuote&amp;quot;} StackTrace...</title>
    <published>2012-07-18T17:50:21Z</published>
    <updated>2012-07-18T17:50:21Z</updated>
    <author>
      <name>profso</name>
      <uri>https://stocksharp.ru/users/27638/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">System.ArgumentException:&lt;br /&gt;{&amp;quot;В стакане отсутствует котировка.\r\nИмя параметра: getQuote&amp;quot;}&lt;br /&gt;&lt;br /&gt;StackTrace:   &lt;br /&gt;в StockSharp.Algo.MarketRuleHelper.#=qcOhC0WJE5q4AmQIoC1tt4Ds2$UQigPCCjmyvhEP1k6o=(Unit #=qEByPJKbHyy3CiH5U8QDYwA==, Func`1 #=qdGG7e$d1RGDmUleVdQSq3g==, Boolean #=qhVAHKFEyjWYtI7z5DD0IJA==)&lt;br /&gt;   в StockSharp.Algo.MarketRuleHelper.WhenBestAskPriceMore(Security security, Unit price)&lt;br /&gt;   в ROBOCOP.MyStrategy.OnStarting() в C:\Users\Алексей\Documents\C#\Мои проекты\ROBOCOP\ROBOCOP\MyStrategy.cs:строка 28&lt;br /&gt;   в StockSharp.Algo.Strategies.Strategy.#=qDUnL50DTyxJPEcqJDPS9zHU90r86WPbXv77_6gajAf8=(ProcessStates #=qzr55ep1Q_tdNk3wYz1P3uQ==)&lt;br /&gt;   в StockSharp.Algo.Strategies.Strategy.Start()&lt;br /&gt;   в ROBOCOP.MainWindow.Start_Click(Object sender, RoutedEventArgs e) в C:\Users\Алексей\Documents\C#\Мои проекты\ROBOCOP\ROBOCOP\MainWindow.xaml.cs:строка 170&lt;br /&gt;   в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)&lt;br /&gt;   в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)&lt;br /&gt;   в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)&lt;br /&gt;   в System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)&lt;br /&gt;   в System.Windows.Controls.Primitives.ButtonBase.OnClick()&lt;br /&gt;   в System.Windows.Controls.Button.OnClick()&lt;br /&gt;   в System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)&lt;br /&gt;   в System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)&lt;br /&gt;   в System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)&lt;br /&gt;   в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)&lt;br /&gt;   в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)&lt;br /&gt;   в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)&lt;br /&gt;   в System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)&lt;br /&gt;   в System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)&lt;br /&gt;   в System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)&lt;br /&gt;   в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)&lt;br /&gt;   в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)&lt;br /&gt;   в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)&lt;br /&gt;   в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)&lt;br /&gt;   в System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)&lt;br /&gt;   в System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)&lt;br /&gt;   в System.Windows.Input.InputManager.ProcessStagingArea()&lt;br /&gt;   в System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)&lt;br /&gt;   в System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)&lt;br /&gt;   в System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)&lt;br /&gt;   в System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)&lt;br /&gt;   в System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)&lt;br /&gt;   в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)&lt;br /&gt;   в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)&lt;br /&gt;   в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)&lt;br /&gt;   в MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)&lt;br /&gt;   в System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)&lt;br /&gt;   в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)&lt;br /&gt;   в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp;amp; msg)&lt;br /&gt;   в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)&lt;br /&gt;   в System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)&lt;br /&gt;   в System.Windows.Application.RunDispatcher(Object ignore)&lt;br /&gt;   в System.Windows.Application.RunInternal(Window window)&lt;br /&gt;   в System.Windows.Application.Run(Window window)&lt;br /&gt;   в System.Windows.Application.Run()&lt;br /&gt;   в ROBOCOP.App.Main() в C:\Users\Алексей\Documents\C#\Мои проекты\ROBOCOP\ROBOCOP\obj\x86\Debug\App.g.cs:строка 0&lt;br /&gt;   в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)&lt;br /&gt;   в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)&lt;br /&gt;   в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&lt;br /&gt;   в System.Threading.ThreadHelper.ThreadStart_Context(Object state)&lt;br /&gt;   в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)&lt;br /&gt;   в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;br /&gt;   в System.Threading.ThreadHelper.ThreadStart()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/20419/</id>
    <title type="text">стэктрейс приведите </title>
    <published>2012-07-17T22:10:31Z</published>
    <updated>2012-07-17T22:10:31Z</updated>
    <author>
      <name>Alexander</name>
      <uri>https://stocksharp.ru/users/2826/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">стэктрейс приведите </content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/20379/</id>
    <title type="text">Коллеги, здравствуйте Помогите разобраться, пжлст, почему не работает правило WhenBestAskPriceMore Е...</title>
    <published>2012-07-16T18:09:11Z</published>
    <updated>2012-07-16T18:09:11Z</updated>
    <author>
      <name>profso</name>
      <uri>https://stocksharp.ru/users/27638/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">Коллеги, здравствуйте&lt;br /&gt;Помогите разобраться, пжлст, почему не работает правило WhenBestAskPriceMore&lt;br /&gt;Есть код Стратегии&lt;br /&gt;&lt;div class="code"&gt;&lt;strong&gt;Код&lt;/strong&gt;&lt;div class="innercode"&gt;&lt;pre class="brush:csharp"&gt;


namespace ROBOCOP
{
    public class MyStrategy:Strategy
    {
        
        public MyStrategy()
        {
        
        }

       protected override void OnStarting()
        {                      

            try
            {
                var d = new Unit(0.003m);

                Security
                    .WhenBestAskPriceMore(d)
                    .Do(ReOr)
                    .Apply(this);
            }
            catch (ApplicationException ex) 
            {
                MessageBox.Show(ex.Message);
            }
            base.OnStarting();
        }
       
       public void ReOr()
        {
          
           var direction = OrderDirections.Buy;

           var order = this.CreateOrder(direction, Security.BestAsk.Price, Volume);

           RegisterOrder(order);
  
        }


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;При Старте стратегии и обработке следующего кода&lt;br /&gt;&lt;div class="code"&gt;&lt;strong&gt;Код&lt;/strong&gt;&lt;div class="innercode"&gt;&lt;pre class="brush:csharp"&gt;


Security
                    .WhenBestAskPriceMore(d)
                    .Do(ReOr)
                    .Apply(this);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;выдает исключение&lt;br /&gt;&lt;div class="quote"&gt;&lt;span class="quotetitle"&gt;Цитата:&lt;/span&gt;&lt;div class="innerquote"&gt;&lt;br /&gt;В стакане отсутствует котировка.&lt;br /&gt;Имя параметра: getQuote&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>