Strategies written by using Strategy can be tested in three modes:
When using all three modes the maximum emphasis is focused on the fact that the strategy code, written by using Strategy is not changed when switching from real trading to testing and back. This is achieved through the implementation of the IConnector main interface, which is a gateway to the trading system. How the interface is used – this has been shown already in the StockSharp Architecture section. In testing mode not real trading system, but the emulation will act as the trading system (depending on the selected mode). Therefore, the strategy code will never know about it - whether it is trading with a real exchange, or it is the emulation.
The basic requirement for the strategies code is that it should not contain gateway specific operations. For example, if we are talking about the OpenECry the strategy code should not have methods to work with Historical data.