ATAS
|
The Strategy API allows you to create strategies based on the Indicators API to automate your trading process.
In order to develop a strategy it is necessary to:
Functionality of Chart Strategies allows receiving and processing the whole set of data available in indicators and performing trading operations on the basis of these data.
The ChartStrategy class is inherited from the Indicator class. Thus, strategies have the full functionality of indicators.
In addition to the functionality of indicators, strategies have additional properties and methods responsible for trading functionality:
Properties:
Main strategy public methods:
Strategy virtual methods, which, if necessary, have to be redefined in the created strategy:
Strategy positions.
Every strategy holds its position inside. This position could differ from the general position on the account.
The account general position could be received through the TradingManager.Position property.
The strategy internal position could be received through the CurrentPosition and AveragePrice properties.
Important! When a strategy is stopped, its internal position is reset to zero. It is extremely desirable to redefine the OnStopping method and realize the logic of closing internal positions and cancelling the posted orders in it.
You can find the chart strategy in the list of strategies. For this it is necessary:
Add
button.When developing a strategy, you can set specific order options using the TradingManager strategy property.
Reduced only orders are a risk control mechanism that ensures that when executed, they will only reduce an existing position, preventing any unintended increase in exposure. This feature is particularly important in markets where precise control over positions is crucial for effective risk management.
When you place a Post only order, you are telling the exchange that you want your order to be treated as a maker order only. In other words, you want to ensure that your order doesn't execute as a taker order, which would result in you paying trading fees. If your Post only order would execute immediately as a taker order, it will be canceled instead.
A Close on trigger order is a type of trading order that is executed when a specified trigger condition is met in the market. It's often used for risk management and to automatically close positions or execute specific actions when a certain price level is reached.