|A strategy is a set of actions occurring in stages, designed to achieve a specific goal within a broader plan, via executing trades.|
The definition of a strategy may be analyzed in three sections:
Strategies are defined in the following steps:
These stages are played in a sequence: once a strategy is triggered it looks to open a position; once a position is open, it is time to manage it as the trade develops; and once a stop or take profit target is hit, it is time to close the position.
Your investment plan or trading carrer may have any number of goals (e.g.: accumulating bitcoin, diversifying on a basket of coins, annual profit targets, etc.). If you attempt to achieve two different goals with a single strategy, you may run into problems. It may be doable, but the strategy would certainly be more complex. In any case, the logical thing to do is to analyze each goal separately so that you can design at least one clear, straightforward strategy for each goal.
The definition of strategy points to the concept of a trade. A trade is a process that exchanges the base asset for the quoted asset and that—after some time, as the trade develops and targets are hit—exchanges back the quoted asset for the base asset. The first and foremost rule of a trade is to preserve capital and its main goal is to increase it.
Click to learn more about strategies
Adding a Strategy Node
To add a strategy, select Add Strategy on the trading system node menu. The strategy node is created along with the rest of the basic structure of nodes required to define each of the strategy stages and their events.
|The trigger stage deals with monitoring the market in search of trading opportunities with the corresponding strategy.|
A trading system may have multiple strategies designed for the same market, with the same base asset.
An important aspect of trading systems is that they are allocated a certain amount of capital (see the base asset parameter). As a consequence, strategies within a trading system have to share that capital allocation.
The logic behind the concept of the trigger stage assumes that different strategies within a trading system are specialized for trading in different market conditions. The trigger stage in each strategy is, therefore, the mechanism by which any particular strategy may be selected to trade, given any particular market situation.
The triggering-on of a strategy effectively blocks the selection of any other strategy in the trading system, and reserves the whole capital allocation for a potential trade, until the strategy is triggered-off.
As a corollary, if certain strategies are meant to trade under the same market situations and open trades concurrently, then those strategies should be put in separate trading systems.
|The trigger-on event defines the set of rules that need to be met for the corresponding strategy to be triggered on. A strategy that is triggered may use all the capital available to the trading system, preventing other strategies in the system from triggering.|
In conceptual terms, the trigger-on event is the mechanism you use to define the specific situations in which you would consider trading with the corresponding strategy. Think of the trigger-on event as the definition of the scenario in which the trading idea behind the strategy should be carefully considered.
Once a strategy is triggered-on, the system starts evaluating the take position event. In conceptual terms, it means that the system has been alerted that the trading idea behind the corresponding trading strategy has produced a signal and that it should carefully monitor the market for the opportunity to take a position.
|The trigger-off event defines the situation in which the corresponding strategy shall be triggered-off. A strategy that is triggered-off releases the capital in reserve and makes it available to other strategies in the trading system.|
In conceptual terms, the trigger-off event is the mechanism you use to define the situation in which the corresponding strategy should stop considering the trading opportunity signaled by the trigger-on event. That is, you use the trigger off event to describe the scenario for the invalidation of the trading idea behind the strategy.
Once a strategy is triggered-on, only two possible scenarios may follow. Either the take position event is triggered, thus, taking a position and opening a trade, or the trigger-off event is triggered first.
In the first scenario, the strategy remains on until the trade is closed. As the trade is closed, the strategy is triggered-off. In the second scenario, the strategy is triggered-off immediately.
Take Position Event
|The take position event defines the situation that needs to be met to enter a trade.|
The trigger-on event merely selects a strategy to be considered for trading under the current market situation. The actual decision to enter a position may require more specific conditions to be met. For that reason, the take position event is a separate entity from the trigger-on event.
Therefore, the take position event is defined with its own set of situations and conditions.
Once the take position event is triggered, the decision to take a position has been made and there is nothing else to consider in that regard. Therefore, the system shifts from the trigger stage to the open stage.
|The open stage deals with all the parameters that define a trade, including position rate and size as well as initial stop and take profit targets.|
Conceptually, the open stage deals with the details that concern the opening of a trade once the decision to take a position has been made. In this stage, you deal with the aforementioned parameters, each of which is defined by a formula.
Ideally, the open stage would also handle the parameters that define the execution of the trade, that is, how and which kinds of orders are to be placed, on which exchanges and so on. However, the execution side of the system is still under development. For the time being, execution is drastically simplified: a single market order is placed for each order.
|Phase 0 represents the starting point for a stop or take profit target, which may be managed in subsequent phases, on the manage stage.|
|The initial stop defines the initial target to stop a loss before the trade gets to be managed.|
Notice that the setting of the stop target has no relation to the execution of orders. The stop is a target, not an order to be placed. That is, the system does not place stop orders.
This is a design feature that allows you to keep your cards, not allowing anyone to anticipate what your strategy may be, not even the exchange. It is a known fact that some exchanges may attempt or allow to front-run stop orders.
Instead, the trading bot instance monitors the market, and only once the stop target has been hit does it place the corresponding order to close the trade.
The initial target is set in phase 0, that is, the departing point for the management of the trade to be handled in the manage stage.
Initial Take Profit
|The initial take profit defines the initial target to take profit before the trade gets to be managed.|
Pretty much like with the initial stop, the initial take profit is a target, and not an order to be placed. Only when the trading bot instance detects that the target has been hit does it place an order to close the trade.
The initial target is set in phase 0, which may shift to the following phase once the corresponding next phase event is validated.
|The size of the position is the amount of capital that will go in the trade, denominated in the quoted asset. The position size node allows setting a size for the position using a formula.|
|The position rate is the rate at which the position is taken, denominated in the quoted asset. The position rate node allows setting the desired position rate with a formula.|
However, for the time being, the formula is overridden by the system as execution is currently limited to market orders until a more robust execution system is deployed. Therefore, the position rate is currently taken from the closing value of the last candle.
Next Phase Event
|The next-phase event is defined by a market situation upon which the management of the trade should shift from one phase to the next phase in a predetermined sequence.|
The management of a trade is performed—by default—in sequential phases. Each phase may define a new formula (either for stop loss or take profit targets). To move from one phase to the next, a certain situation associated with the next phase event must be validated. When that happens, the next phase event is triggered and system shifts the focus to evaluate the formulas and the event corresponding to the following phase in the sequence.
Move to Phase Event
|The move-to-phase event is defined by a market situation upon which the management of the trade should shift from the current phase to an arbitrary phase, determined by a reference.|
The sequence in which phases are executed may be overriden by the use of the move-to-phase event. When the situation in the move-to-phase event validates
true the system shifts the focus to the phase referenced by the move-to-phase event.
Any number of move-to-phase events may be set-up at each and every phase, allowing complete flexibility on how the trade is managed. This feature allows setting complex trade-management algorithms switching to different formulas back and forth or in any configuration imaginble.
truethe management shifts to the referenced phase.
|The manage stage is the third stage in the definition of a strategy and deals with the management of stop and take-profit targets.|
The management of a trade aims to increase the efficiency of your trading system. Conceptually, a trade is not an instantaneous event, but an event which has an opening, a period of maturation, and a closing. The management of the trade happens in that period of maturation.
The concept of managing the trade means that the formulas to determine the take profit and stop may change as the trade develops. The typical situation in which you may want to change your original take profit and stop formulas is when the trade seems to be going well in your favor.
It may be in your best interest to manage both stop and take-profit targets, moving them in the direction of the trade as the market moves, allowing some leeway for a larger profit than expected and, at the same time, cutting the potential for losses.
The management of the trade is handled in phases. Actually, the management of take profit and stop—while correlated—is done independently of each other, therefore, each concept has its own set of phases.
When a situation defined by a set of conditions is met, the next phase event indicates that the take profit or stop formulas shall be changed. At the moment those predefined conditions are met, you enter the next phase. Keep in mind that the trade is in constant development, so there may be as many phases as you deem appropriate for your particular strategy.
The idea of having different phases comes from the notion that big market moves tend to provide clues as to what may come up next. For instance, rallies may accelerate as more traders join the move. Recognizable patterns may emerge. Signs of exhaustion may be identified.
All of these considerations should feed the dynamic analysis performed as the trade develops, and may be contrasted with the predefined conditions that may push take profit or stop further, entering one phase after the next.
|Phase 1 is the first phase in the management of a stop or take-profit target. The management of targets may have as many phases as required.|
The management of phases happens in a sequence. Phase 1 comes after phase 0, which holds the initial definitions for stop and take profit targets. You may continue adding phase 2, phase 3 and so on. Once the next phase event is triggered in one phase, the system applies the targets of the following phase and starts monitoring the situations defined in the corresponding next phase event.
|Close stage is not developed yet. In the future, it will deal with the execution of the closing orders, trading log, and related matters.|
As explained earlier while discussing the open stage, the execution functionality is currently under development. Needless to say, execution of the closing orders is of the highest significance, but in the meantime some temporal execution limitations apply.
Also pending development is the keeping of a formal trading log. The current functionality allows you to see each trade on the screen, along with all the corresponding details, as well as a consolidated report on the live trading panel. This information is stored as a data product, thus, it is not lost. In the future, the system should incorporate a user-friendly feature to browse such logs, and even help analyze them in search for potential optimizations of your trading systems.