﻿<?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-06-13T21:59:32Z</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">&lt;p&gt;Good. You wouldn't be worth your salt if you gave out customer code. Perhaps you could tell me what I'm doing wrong then when I try to load the candles in designer, it doesn'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't draw them?&lt;/p&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">&lt;p&gt;The resolution was by email. We do not spread customers codes.&lt;/p&gt;
</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">&lt;p&gt;Any resolution to this? I'm having the same problem.&lt;/p&gt;
</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">&lt;p&gt;Send your code in full..&lt;/p&gt;
</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">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&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;/p&gt;
&lt;p&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;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</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">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&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;/p&gt;
&lt;p&gt;The sample works fine and shows the PnL curve when using the sample code and sample data provided with the examples.&lt;/p&gt;
&lt;p&gt;string path = Path.GetFullPath(@&amp;quot;........\History&amp;quot;);
((LocalMarketDataDrive)storage.DefaultDrive).Path = path;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            // создаем инструмент для тестирования
            _security = new Security
                {
                    Id = &amp;quot;RIM5@FORTS&amp;quot;,
                    Code = &amp;quot;RIM5&amp;quot;,
                    Name = &amp;quot;RTS-6.15&amp;quot;,
                    PriceStep = 10,
                    StepPrice = 2,
                    Board = ExchangeBoard.Forts
                };
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When I change the code to point to the converted candles data folder, it does not work.&lt;/p&gt;
&lt;p&gt;string path = Path.GetFullPath(@&amp;quot;........\History&amp;quot;);
string path = Path.GetFullPath(@&amp;quot;C:\Data\NETProjects\StockSharp\ExampleStrategy\CandleConverter\bin&amp;quot;);&lt;/p&gt;
&lt;p&gt;*_security = new Security
{
Id = &amp;quot;ACCN@NYSE&amp;quot;,
Code = &amp;quot;ACCN&amp;quot;,
Name = &amp;quot;ACCN&amp;quot;,
PriceStep = 10,
StepPrice = 2,
Board = ExchangeBoard.Nyse&lt;br /&gt;
};&lt;/p&gt;
&lt;p&gt;The strategy just does not execute. It does not hit the code for Onstarted of strategy and ProcessCandle.&lt;/p&gt;
&lt;p&gt;Please advise what is missing in the data that is converted.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
</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">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&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;/p&gt;
&lt;p&gt;The sample works fine and shows the PnL curve when using the sample code and sample data provided with the examples.&lt;/p&gt;
&lt;p&gt;string path = Path.GetFullPath(@&amp;quot;........\History&amp;quot;);
((LocalMarketDataDrive)storage.DefaultDrive).Path = path;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            // создаем инструмент для тестирования
            _security = new Security
                {
                    Id = &amp;quot;RIM5@FORTS&amp;quot;,
                    Code = &amp;quot;RIM5&amp;quot;,
                    Name = &amp;quot;RTS-6.15&amp;quot;,
                    PriceStep = 10,
                    StepPrice = 2,
                    Board = ExchangeBoard.Forts
                };
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When I change the code to point to the converted candles data folder, it does not work.&lt;/p&gt;
&lt;p&gt;string path = Path.GetFullPath(@&amp;quot;........\History&amp;quot;);
string path = Path.GetFullPath(@&amp;quot;C:\Data\NETProjects\StockSharp\ExampleStrategy\CandleConverter\bin&amp;quot;);&lt;/p&gt;
&lt;p&gt;*_security = new Security
{
Id = &amp;quot;ACCN@NYSE&amp;quot;,
Code = &amp;quot;ACCN&amp;quot;,
Name = &amp;quot;ACCN&amp;quot;,
PriceStep = 10,
StepPrice = 2,
Board = ExchangeBoard.Nyse&lt;br /&gt;
};&lt;/p&gt;
&lt;p&gt;The strategy just does not execute. It does not hit the code for Onstarted of strategy and ProcessCandle.&lt;/p&gt;
&lt;p&gt;Please advise what is missing in the data that is converted.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
</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">&lt;p&gt;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;/p&gt;
&lt;p&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;/p&gt;
&lt;p&gt;Or alternatively, can we run strategy on history data stored in txt file directly? Please share sample code if this is possible.&lt;/p&gt;
&lt;p&gt;Regards
Shubha&lt;/p&gt;
</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">&lt;p&gt;Ok.&lt;/p&gt;
</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">&lt;p&gt;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;/p&gt;
&lt;p&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;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
</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">&lt;p&gt;The optimal solution is to convert your data into the s# candle format of the store. An example of a converter is attached.&lt;/p&gt;
</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">&lt;p&gt;Hello! Looking forward for the example code as mentioned above, it will be really helpful.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</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">&lt;p&gt;Ok, we will prepare an example for you.&lt;/p&gt;
</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">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&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;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</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">&lt;p&gt;Send an example of your txt file.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>