Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
a_trailing_story [2018/05/28 12:06]
t1m3c
a_trailing_story [2018/08/04 23:43] (current)
taniman
Line 1: Line 1:
 ===== A Trailing Story ===== ===== A Trailing Story =====
  
 +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.
 +
 +  * [[a_trailing_story#​Scenario 1 - Trailing Profit]]
 +  * [[a_trailing_story#​Scenario 2 - Trailing Buy]]
 +  * [[a_trailing_story#​Scenario 3 - Trailing Grow]]
 +  * [[a_trailing story#​Scenario 4 - Trailing Rebound]]
 +
 +
 +----
 ===Scenario 1 - Trailing Profit=== ===Scenario 1 - Trailing Profit===
  
Line 24: Line 33:
 Highest bid price is now 3.5% Profit - Bot: "Is that over our gain? Yes?? SELL SELL SELL  Highest bid price is now 3.5% Profit - Bot: "Is that over our gain? Yes?? SELL SELL SELL 
  
-Remember that their 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. ​+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. 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. +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. 
 ---- ----
-===Scenario 2 - Trailing Buy===+=== Scenario 2 - Trailing Buy ===
  
 Let's say that your buy settings in dca.properties are Let's say that your buy settings in dca.properties are
Line 67: Line 77:
 **Note:​** ​ **Note:​** ​
   - 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.   - 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.
 +
 +
 +----
 +=== Scenario 3 - Trailing Grow ===
 +
 +This scenario will explain the effect of ''​[[pairs.properties#​DEFAULT_trailing_profit_type]]''​ and ''​[[dca.properties#​DEFAULT_DCA_trailing_profit_type]]''​ on trailing_profit.
 +
 +Throughout this scenario the bot will recalculate the size of ''​trailing_profit''​ when the profit increases using the formula for GROW: 
 +
 +<file java>
 +multiplier = trailingValue / sellValue;
 +newTrailingValue = Math.abs(multiplier * highestTrailingValue);​
 +</​file>​
 +
 +Let's say that your sell settings in pairs.properties are
 +<file java>
 +DEFAULT_A_sell_strategy = GAIN
 +DEFAULT_A_sell_value = 2 (2.0% profit)
 +DEFAULT_trailing_profit = 0.35 (0.35%)
 +DEFAULT_trailing_profit_type = GROW
 +</​file>​
 +
 +Our multiplier in this scenario is therefore 0.35/2 = 0.175
 +
 +Coin rises to 2.05% Profit - Bot: "​I'​m watching you, but not selling yet in case you keep going up." ​
 +Trailing_profit = 0.175*2.05 = 0.35875
 +
 +Coin drops to 1.95% Profit - Bot: " Damn that sucks we missed out this time. Maybe next time."
 +Trailing Profit resets.
 +
 +Coin rises to 2.5% Profit - Bot: "​I'​m watching again but it might keep rising. Where'​s that downtrend?"​
 +Trailing_profit = 0.175*2.5 = 0.4375
 +
 +Coin drops to 2.1% Profit - Bot: "​It'​s Dropping! Has it dropped 0.4375% yet? No? I'm still watching! ​
 +
 +Coin rises to 4% Profit - Bot: "​I'​m still watching, what will happen next?" ​
 +Trailing_profit = 0.175*4 = 0.7
 +
 +Coin drops to 3.4% Profit - Bot: "​It'​s Dropping! Has it dropped 0.7% yet? No? I'm still watching! ​
 +
 +Coin rises to 6% Profit - Bot: "​I'​m still watching, what will happen next?" ​
 +Trailing_profit = 0.175*6 = 1.05
 +
 +Coin drops to 5.1% Profit - Bot: "​It'​s Dropping! Has it dropped 1.05% yet? No? I'm still watching! ​
 +
 +"​It'​s dropped again, this time more than 1.05%. Gotcha! Let's try to sell!" ​
 +
 +Highest bid price is now 4.7% Profit - Bot: "Is that over our gain? Yes?? SELL SELL SELL 
 +
 +If we had used DEFAULT trailing profit type ProfitTrailer would have tried to sell around the 2.1% profit mark early on. Using grow has allowed us to ride an increasing cascading run on this coin. Please note that this will not work for all coins and every coin can behave differently. Using GROW or SHRINK is no guarantee of better of worse profits and market conditions should be considered.
 +
 +Remember that there must be a buy order big enough to sell our coins too. 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.
 +
 +----
 +
 +=== Scenario 4 - Trailing Rebound ===
 +
 +This scenario will explain the effect of ''​[[pairs.properties#​DEFAULT_trailing_profit_rebound_count]]''​ and ''​[[dca.properties#​DEFAULT_DCA_trailing_profit_rebound_count]]''​ on trailing_profit.
 +
 +Let's say that your sell settings in pairs.properties are
 +<file java>
 +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
 +</​file>​
 +
 +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.
 +
 + 
 +
 +
 +
 +
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
  • a_trailing_story.1527502001.txt.gz
  • Last modified: 5 months ago
  • by t1m3c