Develop Your System

This section is to discuss the key components in Cyan Spring framework and how to develop your system based on those components

Introduction

Skill requirements

Adaptor framework

Strategy framework

Tutorial

Single-order Strateiges

To develop a single-order strategy, you simply create a new class of your own and make it a subclass of com.cyanspring.strategy.singleorder.SingleOrderStrategy. Once you have your single-order strategy class, you need to provide implementation for the following members
IQuantityAnalyzer quantityAnalyzer
This class member is an interface, you need to create a class which implments this interface and put it in spring configuration xml file.
	public interface IQuantityAnalyzer {
		QuantityInstruction analyze(SingleOrderStrategy strategy);

	}
	
The only method in this interface returns a QuantityInstruction specifies how much active quantity and passive quantity you want to send to market, which is later to be interpreted by price analyzer.
IPriceAnalyzer priceAnalyzer
This class member is an interface, you need to create a class which implments this interface and put it in spring configuration xml file.
	public interface IPriceAnalyzer {
		PriceInstruction analyze(QuantityInstruction qtyInstruction, SingleOrderStrategy strategy);
	}
	
The only method in this interface takes the result from quantity analyzer and produce a PriceInstruction for the framework to work out child order actions.

Please refer to PriceInstruction for the details.