Example with partial profits
The implementation of alerts and rule-based trading is not yet complete. This documentation describes the planned and partially implemented functionality.
Work in Progress - Target version V0.38.0
loss_action: B_average_down. Each of them can therefore be tried with a single change. The values are editable example settings, not an investment recommendation. A shorter configuration without these additions is shown by the simple example.
As shipped
The strategy enters after a decline of at least 12% over ten observations and invests 3% of net equity. When the position is 10% above the weighted average entry price, it is sold entirely. When it is 10% below, the stop-loss closes it entirely. The additional loss condition under trigger uses the same threshold and does not change this behaviour; it is the basis for averaging down described below. After every transaction a two-day cooldown applies to new entries, and within 30 days at most ten transactions of the instrument are allowed. The position may make up at most 10% of net equity; it is closed on a loss of 25% or when a limit is breached.
Switch on partial profits
With scale_out_enabled: true the plan takes effect. When the position is 4% above the average entry price, step t1 sells a third of the quantity still open. At 7%, step t2 sells the entire remainder. The 10% profit target is then only reached when a single price jump skips step t2; it remains as an upper bound. How steps, reference sizes and partially recorded proposals work together is described in the section Take partial profit.
Add instead of sell
With loss_action: B_average_down the strategy does not sell on a loss but adds to the position. The settings under variant_A_sell_loss are then no longer evaluated. Measured against the initial entry price, 1% of net equity is bought at a loss of 10%, 15% and 20%, at most three times. The first threshold comes from trigger, the following ones result from the 5% step. Once the loss against the average entry price reaches 25%, no further additions are proposed, and the forced exit closes the position. The details are described in the section Add to a losing position.