﻿<?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">EmulationStrategyManager + ActionStrategy</title>
  <id>~/topic/1599/emulationstrategymanager--actionstrategy/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-15T21:56:25Z</updated>
  <logo>https://stocksharp.ru/images/logo.png</logo>
  <link href="https://stocksharp.ru/handlers/atom.ashx?category=topic&amp;id=1599" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.ru/posts/m/8248/</id>
    <title type="text">Запускаю с помощью EmulationStrategyManager ActionStrategy. Код стратегии такой: public class TestAc...</title>
    <published>2011-05-19T20:11:22Z</published>
    <updated>2011-05-19T20:11:22Z</updated>
    <author>
      <name>roman</name>
      <uri>https://stocksharp.ru/users/27830/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;Запускаю с помощью EmulationStrategyManager ActionStrategy.&lt;/p&gt;
&lt;p&gt;Код стратегии такой:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    public class TestActionStrategy : ActionStrategy
    {
        public TestActionStrategy()
        {
        }
        protected override void OnRunning()
        {
            base.When(base.Security.LastTradePriceLess(new Unit(0.01m))).Do(new Action(Test));
            base.OnRunning();
        }
        void Test()
        {
            decimal price = Security.LastTrade.Price;
        }
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Процедура Test срабатывает и price равен 77.25
Ожидалось что она сработает когда price будет меньше 0.01 [sad]
Версия 3.1.9&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>