﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">Не отображаются сделки на графике</title>
  <id>~/topic/8052/ne-otobrazhayutsya-sdelki-na-grafike/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-09T12:11:20Z</updated>
  <logo>https://stocksharp.com/images/logo.png</logo>
  <link href="https://stocksharp.com/handlers/atom.ashx?category=topic&amp;id=8052" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.com/posts/m/39127/</id>
    <title type="text">Я вставил схожую Вашей логику отрисовки сделок в пример SampleChart... Все рисуется нормально. Код п...</title>
    <published>2017-02-06T16:04:14Z</published>
    <updated>2017-02-06T16:04:14Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Я вставил схожую Вашей логику отрисовки сделок в пример SampleChart... Все рисуется нормально. Код прилагается.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39124/</id>
    <title type="text">Добрый день, Воспроизводится ли ошибка? </title>
    <published>2017-02-06T09:59:35Z</published>
    <updated>2017-02-06T09:59:35Z</updated>
    <author>
      <name>Knup</name>
      <uri>https://stocksharp.com/users/50721/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Добрый день,&lt;/p&gt;
&lt;p&gt;Воспроизводится ли ошибка?&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39061/</id>
    <title type="text">Я попробую воспроизвести ошибку. </title>
    <published>2017-02-01T13:13:13Z</published>
    <updated>2017-02-01T13:13:13Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Я попробую воспроизвести ошибку.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39047/</id>
    <title type="text">Вроде да, корректные (типа DateTime) (см. рис 1 http://stocksharp.ru/file/104150). Нет, цикл foreach...</title>
    <published>2017-01-31T14:49:50Z</published>
    <updated>2017-01-31T14:49:50Z</updated>
    <author>
      <name>Knup</name>
      <uri>https://stocksharp.com/users/50721/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;ol&gt;
&lt;li&gt;Вроде да, корректные (типа DateTime) (см. рис 1 &lt;a href="http://stocksharp.ru/file/104150"&gt;http://stocksharp.ru/file/104150&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Нет, цикл foreach полностью исполняется (см. рис 2 &lt;a href="http://stocksharp.ru/file/104150"&gt;http://stocksharp.ru/file/104150&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Пробовал различные таблицы сделок dealtable подставлять. Отрисовывается именно 1-я сделка. 2-я и последующие - по какой-то причине нет. &lt;img src="/file/104150/12.png" alt="12.png" /&gt;&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39039/</id>
    <title type="text">Даты сделок в таблице корректные? При отрисовке второй сделки, прога на ошибку не вылетает? </title>
    <published>2017-01-31T12:52:56Z</published>
    <updated>2017-01-31T12:52:56Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;ol&gt;
&lt;li&gt;Даты сделок в таблице корректные?&lt;/li&gt;
&lt;li&gt;При отрисовке второй сделки, прога на ошибку не вылетает?&lt;/li&gt;
&lt;/ol&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39032/</id>
    <title type="text">Здравствуйте, Необходимо по моей таблице сделок (список List dealtable) отобразить графически сделки...</title>
    <published>2017-01-31T11:01:53Z</published>
    <updated>2017-01-31T11:01:53Z</updated>
    <author>
      <name>Knup</name>
      <uri>https://stocksharp.com/users/50721/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">&lt;p&gt;Здравствуйте,&lt;/p&gt;
&lt;p&gt;Необходимо по моей таблице сделок (список List&lt;DealTableRow&gt; dealtable) отобразить графически сделки на графике цены (историческая).&lt;/p&gt;
&lt;p&gt;Делаю следующим образом:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
private void DrawTradesElements(List&amp;lt;DealTableRow&amp;gt; dealtable)
        {
            if (_chartTradeElement != null)
                _chartArea.Elements.Remove(_chartTradeElement);

            _chartTradeElement = new ChartTradeElement();

            _chartArea.Elements.Add(_chartTradeElement);

            var data = new ChartDrawData();

            this.GuiAsync(() =&amp;gt;
            {
                foreach (var d in dealtable)
                {
                    // Формируем сделку MyTrade, используя данные строки d таблицы сделок dealtable
                    var t = new MyTrade
                    {
                        Trade = new Trade
                        {
                            Time = d.enter_time,
                            Price = d.p_enter.To&amp;lt;decimal&amp;gt;(),
                            OrderDirection = d.direction == &amp;quot;LONG&amp;quot; ? Sides.Buy : Sides.Sell,
                            Volume = 1,
                        }
                    };

                    t.Order = new Order {Direction = t.Trade.OrderDirection ?? Sides.Buy};

                    data.Group(t.Trade.Time).Add(_chartTradeElement, t);
                }

                Chart.Draw(data);
            });
        }

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;В результате на графике Chart отображается только одна (первая) сделка из таблицы сделок dealtable:
&lt;a href="http://stocksharp.ru/file/104146"&gt;http://stocksharp.ru/file/104146&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Почему не отображаются все сделки?&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>