﻿<?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">Strategy testing with Candles from csv file</title>
  <id>~/topic/8237/strategy-testing-with-candles-from-csv-file/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-04-28T03:09:50Z</updated>
  <logo>https://stocksharp.com/images/logo.png</logo>
  <link href="https://stocksharp.com/handlers/atom.ashx?category=topic&amp;id=8237" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.com/posts/m/47373/</id>
    <title type="text">Good. You wouldn&amp;apos;t be worth your salt if you gave out customer code. Perhaps you could tell me what ...</title>
    <published>2019-04-29T12:44:49Z</published>
    <updated>2019-04-29T12:44:49Z</updated>
    <author>
      <name>Sam</name>
      <uri>https://stocksharp.com/users/104377/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Good. You wouldn&amp;#39;t be worth your salt if you gave out customer code. Perhaps you could tell me what I&amp;#39;m doing wrong then when I try to load the candles in designer, it doesn&amp;#39;t show anything using even the basic sample in the designer. The candles are in the bin format. What piece of info is missing that it won&amp;#39;t draw them?&lt;br /&gt;</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47360/</id>
    <title type="text">The resolution was by email. We do not spread customers codes.</title>
    <published>2019-04-27T20:54:01Z</published>
    <updated>2019-04-27T20:54:01Z</updated>
    <author>
      <name>Mikhail Sukhov</name>
      <uri>https://stocksharp.com/users/201/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">The resolution was by email. We do not spread customers codes.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/47358/</id>
    <title type="text">Any resolution to this? I&amp;apos;m having the same problem.</title>
    <published>2019-04-27T05:28:59Z</published>
    <updated>2019-04-27T05:28:59Z</updated>
    <author>
      <name>Sam</name>
      <uri>https://stocksharp.com/users/104377/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Any resolution to this? I&amp;#39;m having the same problem.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39937/</id>
    <title type="text">Send your code in full..</title>
    <published>2017-05-11T14:31:32Z</published>
    <updated>2017-05-11T14:31:32Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Send your code in full..</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39929/</id>
    <title type="text">Hello, Also, when I try to create a candle chart with the above data containing ACCN@NYSE folder, it...</title>
    <published>2017-05-10T19:29:18Z</published>
    <updated>2017-05-10T19:29:18Z</updated>
    <author>
      <name>Shubha </name>
      <uri>https://stocksharp.com/users/98371/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Hello,&lt;br /&gt;&lt;br /&gt;Also, when I try to create a candle chart with the above data containing ACCN@NYSE folder, it does not create any candles. I am using SampleChart sample from Samples/Chart/Sample example that comes with the SDK. It is not able to plot the chart when I point the folder to the right folder and update the security details. &lt;br /&gt;&lt;br /&gt;I am not sure why the data is not being read to create a chart. Maybe this is the reason why strategy is not run. Because it is not able to read the candles. Please let me know what am I missing.&lt;br /&gt;&lt;br /&gt;Thank you.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39927/</id>
    <title type="text">Hello, I am trying to run a simple SMA strategy on the converted candles using HistoryEmulationConne...</title>
    <published>2017-05-10T15:42:25Z</published>
    <updated>2017-05-10T15:42:25Z</updated>
    <author>
      <name>Shubha </name>
      <uri>https://stocksharp.com/users/98371/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Hello,&lt;br /&gt;&lt;br /&gt;I am trying to run a simple SMA strategy on the converted candles using HistoryEmulationConnector on the Data folder. I am specifially using the sample code in the Lesson Video 8 - TestingAndTrading sample.&lt;br /&gt;&lt;br /&gt;The sample works fine and shows the PnL curve when using the sample code and sample data provided with the examples.&lt;br /&gt;&lt;br /&gt; string path = Path.GetFullPath(@&amp;quot;..\..\..\..\History\&amp;quot;);&lt;br /&gt;                ((LocalMarketDataDrive)storage.DefaultDrive).Path = path;&lt;br /&gt;&lt;br /&gt;                // создаем инструмент для тестирования&lt;br /&gt;                _security = new Security&lt;br /&gt;                    {&lt;br /&gt;                        Id = &amp;quot;RIM5@FORTS&amp;quot;,&lt;br /&gt;                        Code = &amp;quot;RIM5&amp;quot;,&lt;br /&gt;                        Name = &amp;quot;RTS-6.15&amp;quot;,&lt;br /&gt;                        PriceStep = 10,&lt;br /&gt;                        StepPrice = 2,&lt;br /&gt;                        Board = ExchangeBoard.Forts&lt;br /&gt;                    };&lt;br /&gt;&lt;br /&gt;When I change the code to point to the converted candles data folder, it does not work.&lt;br /&gt;&lt;br /&gt; string path = Path.GetFullPath(@&amp;quot;..\..\..\..\History\&amp;quot;);&lt;br /&gt; string path = Path.GetFullPath(@&amp;quot;C:\Data\NETProjects\StockSharp\ExampleStrategy\CandleConverter\bin&amp;quot;);&lt;br /&gt;&lt;br /&gt;*_security = new Security&lt;br /&gt;                {&lt;br /&gt;                    Id = &amp;quot;ACCN@NYSE&amp;quot;,&lt;br /&gt;                    Code = &amp;quot;ACCN&amp;quot;,&lt;br /&gt;                    Name = &amp;quot;ACCN&amp;quot;,&lt;br /&gt;                    PriceStep = 10,&lt;br /&gt;                    StepPrice = 2,&lt;br /&gt;                    Board = ExchangeBoard.Nyse  &lt;br /&gt;                };&lt;br /&gt;&lt;br /&gt;The strategy just does not execute. It does not hit the code for Onstarted of strategy and ProcessCandle. &lt;br /&gt;&lt;br /&gt;Please advise what is missing in the data that is converted. &lt;br /&gt;&lt;br /&gt;Thank you!</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39926/</id>
    <title type="text">Hello, I am trying to run a simple SMA strategy on the converted candles using HistoryEmulationConne...</title>
    <published>2017-05-10T15:40:54Z</published>
    <updated>2017-05-10T15:40:54Z</updated>
    <author>
      <name>Shubha </name>
      <uri>https://stocksharp.com/users/98371/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Hello,&lt;br /&gt;&lt;br /&gt;I am trying to run a simple SMA strategy on the converted candles using HistoryEmulationConnector on the Data folder. I am specifially using the sample code in the Lesson Video 8 - TestingAndTrading sample.&lt;br /&gt;&lt;br /&gt;The sample works fine and shows the PnL curve when using the sample code and sample data provided with the examples.&lt;br /&gt;&lt;br /&gt; string path = Path.GetFullPath(@&amp;quot;..\..\..\..\History\&amp;quot;);&lt;br /&gt;                ((LocalMarketDataDrive)storage.DefaultDrive).Path = path;&lt;br /&gt;&lt;br /&gt;                // создаем инструмент для тестирования&lt;br /&gt;                _security = new Security&lt;br /&gt;                    {&lt;br /&gt;                        Id = &amp;quot;RIM5@FORTS&amp;quot;,&lt;br /&gt;                        Code = &amp;quot;RIM5&amp;quot;,&lt;br /&gt;                        Name = &amp;quot;RTS-6.15&amp;quot;,&lt;br /&gt;                        PriceStep = 10,&lt;br /&gt;                        StepPrice = 2,&lt;br /&gt;                        Board = ExchangeBoard.Forts&lt;br /&gt;                    };&lt;br /&gt;&lt;br /&gt;When I change the code to point to the converted candles data folder, it does not work.&lt;br /&gt;&lt;br /&gt; string path = Path.GetFullPath(@&amp;quot;..\..\..\..\History\&amp;quot;);&lt;br /&gt; string path = Path.GetFullPath(@&amp;quot;C:\Data\NETProjects\StockSharp\ExampleStrategy\CandleConverter\bin&amp;quot;);&lt;br /&gt;&lt;br /&gt;*_security = new Security&lt;br /&gt;                {&lt;br /&gt;                    Id = &amp;quot;ACCN@NYSE&amp;quot;,&lt;br /&gt;                    Code = &amp;quot;ACCN&amp;quot;,&lt;br /&gt;                    Name = &amp;quot;ACCN&amp;quot;,&lt;br /&gt;                    PriceStep = 10,&lt;br /&gt;                    StepPrice = 2,&lt;br /&gt;                    Board = ExchangeBoard.Nyse  &lt;br /&gt;                };&lt;br /&gt;&lt;br /&gt;The strategy just does not execute. It does not hit the code for Onstarted of strategy and ProcessCandle. &lt;br /&gt;&lt;br /&gt;Please advise what is missing in the data that is converted. &lt;br /&gt;&lt;br /&gt;Thank you!</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39843/</id>
    <title type="text">We want to perform strategy backtesting on history data stored in txt file. As we understand from th...</title>
    <published>2017-04-24T19:58:21Z</published>
    <updated>2017-05-07T15:20:33Z</updated>
    <author>
      <name>Shubha </name>
      <uri>https://stocksharp.com/users/98371/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">We want to perform strategy backtesting on history data stored in txt file. As we understand from the samples, the txt file should be converted to S# format before we can run strategy and testing on them. Please update if this understanding is correct. &lt;br /&gt;&lt;br /&gt;We need sample code how we can covert txt file to S# format through code. What are the classes we should look at?&lt;br /&gt;&lt;br /&gt;Or alternatively, can we run strategy on history data stored in txt file directly? Please share sample code if this is possible.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Shubha</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39874/</id>
    <title type="text">Ok.</title>
    <published>2017-05-03T18:06:42Z</published>
    <updated>2017-05-03T18:06:42Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Ok.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39872/</id>
    <title type="text">Thank you for the code. We have multiple files where the 5 minute candle data is stored for each sto...</title>
    <published>2017-05-03T09:17:30Z</published>
    <updated>2017-05-03T09:17:30Z</updated>
    <author>
      <name>Shubha </name>
      <uri>https://stocksharp.com/users/98371/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Thank you for the code. We have multiple files where the 5 minute candle data is stored for each stock on the exchange. Please recommend the best approach for running strategy on these files. &lt;br /&gt;&lt;br /&gt;One solution is to convert all of these data to S# bin format as you have specified above. Please let me know if there are other approaches we can consider.&lt;br /&gt;&lt;br /&gt;Thank you, </content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39858/</id>
    <title type="text">The optimal solution is to convert your data into the s# candle format of the store. An example of a...</title>
    <published>2017-04-28T17:00:09Z</published>
    <updated>2017-04-28T17:00:09Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">The optimal solution is to convert your data into the s# candle format of the store. An example of a converter is attached.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39854/</id>
    <title type="text">Hello! Looking forward for the example code as mentioned above, it will be really helpful. Thank you...</title>
    <published>2017-04-27T20:10:57Z</published>
    <updated>2017-04-27T20:10:57Z</updated>
    <author>
      <name>Shubha </name>
      <uri>https://stocksharp.com/users/98371/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Hello! Looking forward for the example code as mentioned above, it will be really helpful.&lt;br /&gt;&lt;br /&gt;Thank you.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39853/</id>
    <title type="text">Ok, we will prepare an example for you.</title>
    <published>2017-04-26T14:12:01Z</published>
    <updated>2017-04-26T14:12:01Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Ok, we will prepare an example for you.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39850/</id>
    <title type="text">Hello, Attaching txt file where the history data is stored. Data is stored in the format date, time,...</title>
    <published>2017-04-25T16:55:06Z</published>
    <updated>2017-04-25T16:55:06Z</updated>
    <author>
      <name>Shubha </name>
      <uri>https://stocksharp.com/users/98371/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Hello,&lt;br /&gt;&lt;br /&gt;Attaching txt file where the history data is stored. Data is stored in the format date, time, O, H, L, C and Volume values separated by comma.&lt;br /&gt;&lt;br /&gt;Thank you.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.com/posts/m/39848/</id>
    <title type="text">Send an example of your txt file.</title>
    <published>2017-04-25T13:46:44Z</published>
    <updated>2017-04-25T13:46:44Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.com/users/97869/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <content type="html">Send an example of your txt file.</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>