How to Create Strategy: Preparation of Datasets

Preparation of Datasets

Disclaimer: It is important to understand for the reader that the development of a trading strategy is not a simple task, but it requires a lot of trial and error. For example, it may require months of work. Therefore, if the reader develops a strategy, it is advised that they test it properly before using it with the real account, otherwise they can lose money. 

First of all, traders should prepare datasets of each market type. 

By dataset we mean data represented on a candlestick chart for a particular period of time and market type.

For example, a bull or bear market (including pull backs), weak or strong bull or bear market, sideways market. Note, each dataset contains only one market type excluding parts where the market type changes. 

It is important to mention that each asset can have it’s specifics. For instance, it can contain many fakeouts or certain patterns can repeat etc. Therefore, it is easier to focus on one asset or a few assets of which the market type is similar, instead of preparing market types of different assets which adds too much complexity. Note, these specifics can change over time even within one asset though it is not very common.

Because of increased complexity that has to be handled during development of a strategy, it is not advised to classify 

  • different assets, e.g. BTCUSD and EURUSD,
  • multiple timeframes, e.g. 15m and 4h, 
  • different volatilities, e.g. 10% and 3% or 
  • volumes, e.g. 10B and 1M

as one market type, even though they appear to be the same. Although the markets can show similar properties on the chart, it is usually misleading.

Size of one dataset depends on a particular market type and strategy, however 100+ candlesticks should be enough to make a trade, and as a result, one dataset should have 100+ candlesticks. 

Note, if you want to use EMA 200 (or similar indicator which is based on historical price data), you need 200 more candlesticks to calculate this indicator, but you base the strategy only on the selected market type. For example, test on the last 100 candlesticks if you have 300 candlesticks in the dataset and the strategy uses EMA 200.  

Amount of datasets per one market type. Basically, the more, the better, but aim for at least tens of datasets per one market type.


In order to develop a strategy, we can follow the following steps:

  1. We develop the strategy on one chart which is in an uptrend, for example
  2. We test it on multiple charts that are similar to the one we used for development
  3. We test it also on downtrend and sideways charts for the opposite results meaning that the strategy won’t be triggered in these markets
  4. We test it on the real market