Signal/Strategy

From MultiCharts
Revision as of 15:26, 29 April 2013 by Roman MultiCharts (talk | contribs) (Created page with "Trade strategies in MultiCharts .NET consist of one or several signals which are algorithms for order generation based on the analysis of price information on the chart. For...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Trade strategies in MultiCharts .NET consist of one or several signals which are algorithms for order generation based on the analysis of price information on the chart.


For example, a strategy consists of one or more signals (algorithms) as shown in the chart below.

FormatObjects.png

  • Bollinger_Bands_LE signal is an algorithm of order generation for long position entry.
  • Bollinger_Bands_SE signal is an algorithm of order generation for short position entry.
  • Profit_Target signal is an algorithm of profit fixation.
  • Stop_Loss is an algorithm protecting the position from a loss.

A signal is able to generate orders in accordance with a built-in algorithm, which will be executed by the strategy.

Signals have access to the information about the current condition and performance of a strategy.

To add a strategy with one or several signals to a chart:

  1. right clink on the chart,
  2. select Insert Study,
  3. select the Signals tab.

After the strategy calculation you can see markers of orders executed by the strategy. A report upon the results of strategy calculation can be found in the View menu in the Strategy Performance Report.

In MultiCharts .NET signals are objects of the class, inherited from SignalObject.

In the process of the signal calculation orders will be generated according to the algorithm as described in the CalcBar () method. These orders will subsequently be executed by the strategy.

Here is an example of a simple signal:

public class TestSignal : SignalObject 
{
	public TestSignal(object _ctx):base(_ctx){}

	// Declaring orders-objects
private IOrderMarket buy_order;
	
	protected override void Create() {
buy_order = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, EOrderAction.Buy));
}

	protected override void CalcBar(){
		// Signal’s algorithm
                //…………………………
                //Order Generation
		buy_order.Send();
	}
}