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
buy_and_sell_strategies [2019/01/31 14:31]
armchairguru
buy_and_sell_strategies [2019/04/12 22:45] (current)
sgtbatten [FIXEDPRICE]
Line 27: Line 27:
 ^ [[buy_and_sell_strategies#​RSI]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ | ^ [[buy_and_sell_strategies#​RSI]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
 ^ [[buy_and_sell_strategies#​STOCH]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ | ^ [[buy_and_sell_strategies#​STOCH]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
-^ [[buy_and_sell_strategies#​STOCHRSI (Classic)|STOCHRSI]]    (Deprecated - Use STOCHRSID ​for TradingView visualization) ​|  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ | +^ [[buy_and_sell_strategies#​STOCHRSID]] (Use for TradingView visualization) |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
-^ [[buy_and_sell_strategies#​STOCHRSID]]  ​|  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |+
 ^ [[buy_and_sell_strategies#​STOCHRSIK]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ | ^ [[buy_and_sell_strategies#​STOCHRSIK]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
 ^ [[buy_and_sell_strategies#​STOCHRSICROSS]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ | ^ [[buy_and_sell_strategies#​STOCHRSICROSS]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
Line 36: Line 35:
 ^ [[buy_and_sell_strategies#​PDHIGH]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ | ^ [[buy_and_sell_strategies#​PDHIGH]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
 ^ [[buy_and_sell_strategies#​ANDERSON]] ​ | | |  {{glyphicon>​ok?​12}} ​ | | ^ [[buy_and_sell_strategies#​ANDERSON]] ​ | | |  {{glyphicon>​ok?​12}} ​ | |
 +^ [[buy_and_sell_strategies#​FIXEDPRICE]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
 ^ [[buy_and_sell_strategies#​DISABLED]] ​  *See explanation below | | | | | ^ [[buy_and_sell_strategies#​DISABLED]] ​  *See explanation below | | | | |
  
Line 201: Line 201:
  
 ==== GAIN ==== ==== GAIN ====
 +**Note:** If GAIN is not used as a sell strategy, then trailing profit settings cannot be used. Be aware that allowing other strategies to sell regardless of current price may result in coins being sold for a loss.
  
-This MANDATORY ​sell strategy is true when current profit is greater than or equal to ''​sell_value''​.+This sell strategy is true when current profit is greater than or equal to ''​sell_value''​.
  
-GAIN acts as the minimum profit level you are targeting ​and as such it is required that GAIN be used as one of the sell strategies you use. If you set a negative value coins can be sold for a loss. +GAIN acts as the minimum profit level you are targeting. If you set a negative value coins can be sold for a loss. 
  
 The ''​sell_value''​ is a percentage of profit that must be reached. When calculating the price required to make this amount of profit the bot also accounts for fees (on Binance the bot assumes the full fee, not the BNB discounted fee.)  The ''​sell_value''​ is a percentage of profit that must be reached. When calculating the price required to make this amount of profit the bot also accounts for fees (on Binance the bot assumes the full fee, not the BNB discounted fee.) 
Line 692: Line 693:
 ''​[[indicators.properties#​SMA_cross_candles]] = 5''​ ''​[[indicators.properties#​SMA_cross_candles]] = 5''​
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.2''​→ buy strategy is true when the calculated spread is larger than -0.2% (Fast SMA is LOWER than Slow SMA) and the Fast SMA crossed below the slow SMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.2 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.2''​→ buy strategy is true when the calculated spread is larger than -0.2% (Fast SMA is LOWER than Slow SMA) and the Fast SMA crossed below the slow SMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.2 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast SMA is ABOVE Slow SMA) and the Fast SMA crossed above the slow SMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast SMA is ABOVE Slow SMA) and the Fast SMA crossed above the slow SMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast SMA is HIGHER than Slow SMA) and the Fast SMA crossed above the slow SMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used. \\+''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast SMA is HIGHER than Slow SMA) and the Fast SMA crossed above the slow SMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used. \\
  
 ---- ----
Line 744: Line 745:
 ''​[[indicators.properties#​EMA_cross_candles]] = 5''​ ''​[[indicators.properties#​EMA_cross_candles]] = 5''​
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.5''​→ buy strategy is true when the calculated spread is larger than -0.5% (Fast EMA is LOWER than Slow EMA) and the Fast EMA crossed below the slow EMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.5 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.5''​→ buy strategy is true when the calculated spread is larger than -0.5% (Fast EMA is LOWER than Slow EMA) and the Fast EMA crossed below the slow EMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.5 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast EMA is ABOVE Slow EMA) and the Fast EMA crossed above the slow EMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast EMA is ABOVE Slow EMA) and the Fast EMA crossed above the slow EMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast EMA is HIGHER than Slow EMA) and the Fast EMA crossed above the slow EMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.05 if used.\\+''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast EMA is HIGHER than Slow EMA) and the Fast EMA crossed above the slow EMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.05 if used.\\
  
  
Line 800: Line 801:
 ''​[[indicators.properties#​HMA_cross_candles]] = 5''​ ''​[[indicators.properties#​HMA_cross_candles]] = 5''​
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.2''​→ buy strategy is true when the calculated spread is larger than -0.2% (Fast HMA is LOWER than Slow HMA) and the Fast HMA crossed below the slow HMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.2 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.2''​→ buy strategy is true when the calculated spread is larger than -0.2% (Fast HMA is LOWER than Slow HMA) and the Fast HMA crossed below the slow HMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.2 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast HMA is ABOVE Slow HMA) and the Fast HMA crossed above the slow HMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast HMA is ABOVE Slow HMA) and the Fast HMA crossed above the slow HMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast HMA is HIGHER than Slow HMA) and the Fast HMA crossed above the slow HMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used. \\+''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast HMA is HIGHER than Slow HMA) and the Fast HMA crossed above the slow HMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used. \\
  
 \\ \\
Line 851: Line 852:
 ''​[[indicators.properties#​DEMA_cross_candles]] = 5''​ ''​[[indicators.properties#​DEMA_cross_candles]] = 5''​
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.2''​→ buy strategy is true when the calculated spread is larger than -0.2% (Fast DEMA is LOWER than Slow DEMA) and the Fast DEMA crossed below the slow DEMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.2 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.2''​→ buy strategy is true when the calculated spread is larger than -0.2% (Fast DEMA is LOWER than Slow DEMA) and the Fast DEMA crossed below the slow DEMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.2 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast DEMA is ABOVE Slow DEMA) and the Fast DEMA crossed above the slow DEMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (Fast DEMA is ABOVE Slow DEMA) and the Fast DEMA crossed above the slow DEMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast DEMA is HIGHER than Slow DEMA) and the Fast DEMA crossed above the slow DEMA within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used. \\+''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (Fast DEMA is HIGHER than Slow DEMA) and the Fast DEMA crossed above the slow DEMA within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used. \\
  
 \\ \\
Line 952: Line 953:
 ''​[[pairs.properties#​DEFAULT_A_sell_value]] = 80''​ → sell zone begins when the STOCH value is greater than or equal to 80. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be greater than 80 if used.\\ ''​[[pairs.properties#​DEFAULT_A_sell_value]] = 80''​ → sell zone begins when the STOCH value is greater than or equal to 80. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be greater than 80 if used.\\
 ''​[[dca.properties#​DEFAULT_DCA_A_buy_value|DEFAULT_DCA_B_buy_value]] = 30''​ → DCA buy zone begins when the STOCH value is less than 30. ''​[[dca.properties#​DEFAULT_DCA_A_buy_value_limit|DEFAULT_DCA_B_buy_value_limit]]''​ must be less than 30 if used.\\ ''​[[dca.properties#​DEFAULT_DCA_A_buy_value|DEFAULT_DCA_B_buy_value]] = 30''​ → DCA buy zone begins when the STOCH value is less than 30. ''​[[dca.properties#​DEFAULT_DCA_A_buy_value_limit|DEFAULT_DCA_B_buy_value_limit]]''​ must be less than 30 if used.\\
- 
-\\ 
-[[buy_and_sell_strategies|TOP]] 
-\\ 
----- 
-==== STOCHRSI (CLASSIC) ==== 
-=== (Deprecated - Use STOCHRSID for TradingView visualization) === 
- 
-This buy/sell strategy is true when the STOCHRSI value is less than the ''​buy_value''​ or is greater than or equal to the ''​sell_value''​. 
- 
-STOCHRSI as a buy strategy is true if ''​buy_value''​ > STOCHRSI > ''​buy_value_limit''​. 
- 
-STOCHRSI as a sell strategy is true if ''​sell_value''​ <= STOCHRSI <= ''​sell_value_limit''​. 
- 
----- 
-**The Numbers** 
- 
-Valid Values: 
-Values between 0 and 1 are valid. ​ 
- 
----- 
-**The Parameters** 
- 
-''​[[indicators.properties#​STOCHRSI_candle_period]]''​\\ 
-''​[[indicators.properties#​STOCHRSI_rsi_length]]''​\\ 
-''​[[indicators.properties#​STOCHRSI_stoch_length]]''​\\ 
- 
----- 
-**The Formula** 
-<file java> 
-StochRSI = (RSI - Lowest Low RSI) / (Highest High RSI - Lowest Low RSI) 
-</​file>​ 
- 
----- 
-**Examples** 
- 
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.2''​ → buy zone begins when the calculated value is less than 0.2. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than 0.2 if used. \\ 
-''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.8''​ → sell zone begins when the calculated value is greater than or equal to 0.8. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be greater than 0.8 if used.\\ 
-''​[[dca.properties#​DEFAULT_DCA_A_buy_value|DEFAULT_DCA_B_buy_value]] = 0.3''​ → buy zone begins when the calculated value is less than 0.3. ''​[[dca.properties#​DEFAULT_DCA_A_buy_value_limit|DEFAULT_DCA_B_buy_value_limit]]''​ must be less than 0.3 if used.\\ 
  
 \\ \\
Line 998: Line 960:
  
 ==== STOCHRSID ==== ==== STOCHRSID ====
 +=== (Use for TradingView visualization) ===
  
 This buy/sell strategy is true when the STOCHRSID value is less than the ''​buy_value''​ or is greater than or equal to the ''​sell_value''​. This buy/sell strategy is true when the STOCHRSID value is less than the ''​buy_value''​ or is greater than or equal to the ''​sell_value''​.
Line 1150: Line 1113:
  
 ''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.5''​→ buy strategy is true when the calculated spread is larger than -0.5% (K is LOWER than D) and the K  ''​[[pairs.properties#​DEFAULT_A_buy_value]] = -0.5''​→ buy strategy is true when the calculated spread is larger than -0.5% (K is LOWER than D) and the K 
- line crossed below the D line within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.5 if used. \\+ line crossed below the D line within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than -0.5 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (K is HIGHER than D) and the K line crossed above the D line within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\+''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.05''​→ buy strategy is true when the calculated spread is larger than 0.05% (K is HIGHER than D) and the K line crossed above the D line within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be more than 0.05 if used. \\
  
-''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (K is HIGHER than D) and the K line crossed above the D line within the last 5 candles ​(excluding the current candle). ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used.\\+''​[[pairs.properties#​DEFAULT_A_sell_value]] = 0.6''​ → sell strategy is true when the calculated spread is 0.6% or larger (K is HIGHER than D) and the K line crossed above the D line within the last 5 candles. ''​[[pairs.properties#​DEFAULT_A_sell_value_limit]]''​ must be more than 0.6 if used.\\
  
 \\ \\
Line 1323: Line 1286:
 Valid Values: positive or negative decimal values. Valid Values: positive or negative decimal values.
  
-So yesterday ​high for ETHBTC was 0.034432\\+So previous candle ​high for ETHBTC was 0.034432\\
 Current bid price is about 0.0321190\\ Current bid price is about 0.0321190\\
 So the PDHIGH value is negative (-6.71%).\\ ​ So the PDHIGH value is negative (-6.71%).\\ ​
Line 1407: Line 1370:
 For the 4th buy onwards the default value of -3 will be used indefinitely as no level specific value has been set. For the 4th buy onwards the default value of -3 will be used indefinitely as no level specific value has been set.
  
 +
 +\\
 +[[buy_and_sell_strategies|TOP]]
 +\\
 +
 +==== FIXEDPRICE====
 +
 +FIXEDPRICE is as the name says a fixed price buying/​selling strategy
 +
 +The buy strategy is true when source price is below the specified price in buy_value \\
 +The sell strategy is true when source price is above or equal to the specified price in sell_value \\
 +
 +**Note:** It is recommended to use this strategy only with PAIR specific overrides as different coins have different prices. \\
 +So it's impossible to create a default value to pick all coins in a good price range.
 +----
 +
 +**The Numbers**
 +
 +Valid Values: positive decimal values.
 +
 +----
 +**The Formula**
 +
 +----
 +
 +**The Parameters**
 +
 +''​[[indicators.properties#​FIXEDPRICE_source]]''​ = (ASK,BID or CLOSE)\\
 +
 +----
 + 
 +**Examples**
 +An example use of this strategy is to buy as soon as the ask price of a pair is below our specified price.
 +\\
 +
 +In Indicators Config:
 +<file java>
 +FIXEDPRICE_source = ASK
 +</​file>​
 +\\
 +In Pairs Config:
 +<file java>
 +BTT_A_buy_strategy = FIXEDPRICE
 +BTT_A_buy_value = 0.00000016
 +</​file>​
 +
 +''​[[pairs.properties#​DEFAULT_A_buy_value]] = 0.00000016''​ → buy zone begins when the ask price for BTT is below 16 satoshi.\\
 +''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ must be less than 0.00000016 if used.
  
 \\ \\
  • buy_and_sell_strategies.1548945090.txt.gz
  • Last modified: 3 months ago
  • by armchairguru