In any of the below examples other strategies could be used. Once all buy or sell strategies are true, they all behave in the same way and only the price matters while trailing.
The below explanations all assume
DEFAULT_trailing_buy_reset_with_strategies = false
If GAIN is not used as one of the sell strategies, then trailing profit settings cannot be used.
Let's say that your sell settings in pairs_config are
DEFAULT_A_sell_strategy = GAIN
# Start trailing as soon as profit is higher than 1%
DEFAULT_A_sell_value = 1
DEFAULT_trailing_profit = 0.25
Coin rises to 1.05% Profit - Bot: “I'm watching you, but not selling yet in case you keep going up.”
Coin drops to 0.95% Profit - Bot: “ Damn that sucks we missed out this time. Maybe next time.”
Coin rises to 1.5% Profit - Bot: “I'm watching again but it might keep rising. Where's that downtrend?”
Coin drops to 1.35% Profit - Bot: “It's Dropping! Has it dropped 0.25% yet? No? I'm still watching!
Coin rises to 6% Profit - Bot: “I'm still watching, what will happen next?”
Coin drops to 5.74% Profit - Bot: “It's dropped again, this time more than 0.25%. Gotcha! Let's try to sell!”
Highest bid price is now 3.5% Profit - Bot: “Is that over our gain? Yes?? SELL SELL SELL
Remember that there must be a buy order big enough to sell our coins to. The bot can't react with millisecond reactions and looks at the highest bid price to see if it meets all our criteria. If it does the bot will place a sell order at that price.
Many many coins rise and fall in lurches like this. Fast rises, fast downs. Some don't, and those are usually the coins you see sell at close to top price - trail amount.
Remember - there MUST be a buyer on the other side who is willing to pay the price to buy the coin. Sometimes there is not, that is why you will see gaps between where the bot could have sold, and where it actually sold. The same is true on the trailing buy side.
Let's say that your buy settings in the dca config are
DEFAULT_DCA_A_buy_strategy = RSI
DEFAULT_DCA_A_buy_value = 30
DEFAULT_DCA_A_buy_value_limit = 0
DEFAULT_DCA_B_buy_strategy = LOWBB
DEFAULT_DCA_B_buy_value = 30
DEFAULT_DCA_B_buy_value_limit = 20
DEFAULT_DCA_trailing_buy = 0.3 (0.3%)
RSI = 33, lowest ask price is at LOWBB 35 - Bot: “I'm so bored.”
RSI = 29, lowest ask price is at LOWBB 28 - Bot: “Both strategies are true so lets make note of the current ask price (0.00500000)”
Lowest ask price is 0.00495000 - Bot: “Price has dropped, let's wait for the uptrend now.”
Lowest ask price is 0.00502000 - Bot: “Price has risen, but how much? ((0.00478-0.00475)/0.005)*100 = 1.4%. 1.4% is more than trailing_buy but the price is back over 0.00500000. Let's start again.”
RSI = 28, lowest ask price is at LOWBB 29 - Bot: “Both strategies are still true so lets make note of the current ask price (0.00502000)”
Lowest ask price is 0.00499000 - Bot: “Price has dropped, let's wait for the uptrend now.”
Lowest ask price is 0.00500000 - Bot: “Price has risen, but how much? ((0.005-0.00499)/0.00502)*100 = 0.199%. Not enough, let's keep waiting”
Lowest ask price is 0.00495000 - Bot: “Price has dropped to a new low, let's wait for the uptrend now.”
Lowest ask price is 0.00497000 - Bot: “Price has risen, but how much? ((0.00497-0.00495)/0.00502)*100 = 0.398%. 0.398% is more than trailing_buy and the price is below our starting price (0.00502000). Let's try to buy”
Remember - there MUST be a seller on the other side who is asking the required price in order to sell the coin. Sometimes there is not, that is why you will see gaps between where the bot could have bought, and where it actually bought.
- Be aware that once trailing begins, even if RSI and LOWBB (or whatever strategies you are using) becomes untrue, the bot will still attempt to buy once it has trailed enough, as long as the price is still below the price at the time when trailing started.
- The exception to this is if
default_dca_trailing_buy_reset_with_strategies
is set to true, which will reset the trail if the strategies are no longer true.
If GAIN is not used as one of the sell strategies, then trailing profit settings cannot be used.
This scenario will explain the effect of DEFAULT_trailing_profit_rebound_count
and DEFAULT_DCA_trailing_profit_rebound_count
on trailing_profit.
Let's say that your sell settings in pairs_config are
DEFAULT_A_sell_strategy = GAIN
DEFAULT_A_sell_value = 1 (1.0% profit)
DEFAULT_trailing_profit = 0.15 (0.15%)
DEFAULT_trailing_profit_rebound_count = 2
Coin rises to 1.25% Profit - Bot: “I'm watching you, but not selling yet in case you keep going up.”
Coin drops to 1.05% Profit - Bot: “It has dropped 0.15% or more, that's the first time, lets keep watching. Setting the target rebound price to 1.05%”
Coin drops to 0.95% Profit - Bot: ” Damn that sucks we missed out this time. Maybe next time.”
Coin rises to 1.45% Profit - Bot: “I'm watching you, but not selling yet in case you keep going up.”
Coin drops to 1.2% Profit - Bot: “It has dropped 0.15% or more, that's the first time, lets keep watching. Setting the target rebound price to 1.2%.”
Coin drops to 1.02% Profit - Bot: “Twiddling my thumbs waiting for the price to rebound.”
Coin rises to 1.5% Profit - Bot: “I'm watching again. We've rebounded once!”
Coin drops to 1.35% Profit - Bot: “It's Dropping! Has it dropped 0.15% yet? Yes! Setting the target rebound price to 1.35%.”
Coin rises to 1.8% Profit - Bot: “We've rebounded again! That's two. Where's that downtrend”
Coin drops to 1.6% Profit - Bot: “It's dropped again, more than 0.15% and we've rebounded twice already. Gotcha! Let's try to sell!”
Rebound is useful for coins that are up and down during a price rise but ultimately are still uptrending. If the rebounds are not achieved then no sale will be attempted.
Remember that there must be a buy order big enough to sell our coins to. The bot can't react with millisecond reactions and looks at the highest bid price to see if it meets all our criteria. If it does the bot will place a sell order at that price.
Many many coins rise and fall in lurches like this. Fast rises, fast downs. Some don't, and those are usually the coins you see sell at close to top price - trail amount.
Remember - there MUST be a buyer on the other side who is willing to pay the price to buy the coin. Sometimes there is not, that is why you will see gaps between where the bot could have sold, and where it actually sold. The same is true on the trailing buy side.
Version 2.2 introduces 2 new methods of stop loss. Traling Stop Loss and Take Profit Safety. The image below demonstrates their differences from standard Stop Loss.
In the example above DEFAULT_trailing_stop_loss_trigger = -3
and DEFAULT_trailing_stop_loss_trigger_arm = 1.5
- If
DEFAULT_trailing_stop_loss_trigger_arm
is NOT set Trailing Stop Loss is armed automatically.- If
DEFAULT_trailing_stop_loss_trigger_arm
is set, and the price never goes above the arm value ProfitTrailer will not sell due to not being armed.- If trailing stop loss is used in DCA it is affected by
DCA_stop_before_complete
Take profit Safety is similar to trailing stop loss but uses fixed values rather than dynamically trailing.
If the profit goes above DEFAULT_take_profit_safety_arm
we flag the coin as armed. Then if the profit comes back down below the DEFAULT_take_profit_safety_fire
value the bot will attempt to sell the coin.
If the coin is never armed ProfitTrailer will not do anything if the price reaches the fire value.