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_logic [2019/01/11 13:05]
armchairguru
buy_and_sell_logic [2019/04/10 21:31] (current)
armchairguru
Line 2: Line 2:
 ====Why won’t my Bot Buy, or Sell?==== ====Why won’t my Bot Buy, or Sell?====
 //[authored originally by Vae Victus 2018.01.22]//​\\ //[authored originally by Vae Victus 2018.01.22]//​\\
-//[updated for v2.0 2018.04.14]//+//[updated for v2.3 2019.04.09]//
  
 ====Table of Contents==== ====Table of Contents====
Line 13: Line 13:
     * [[buy_and_sell_logic#​DCA Selling]]     * [[buy_and_sell_logic#​DCA Selling]]
   * [[buy_and_sell_logic#​Detailed PBL Explanation]]   * [[buy_and_sell_logic#​Detailed PBL Explanation]]
-    ​* [[buy_and_sell_logic#​Buying with LOWBB]] +  ​* [[buy_and_sell_logic#​How different BUY strategy settings affect the PBL]]
-    * [[buy_and_sell_logic#​Buying with HIGHBB]] +
-    * [[buy_and_sell_logic#​Buying with SMAGAIN]] +
-    * [[buy_and_sell_logic#​Buying with SMASPREAD]] +
-    * [[buy_and_sell_logic#​Buying with SMACROSS]]+
   * [[buy_and_sell_logic#​How Indicators Configuration affect the PBL]]   * [[buy_and_sell_logic#​How Indicators Configuration affect the PBL]]
  
Line 23: Line 19:
  
 ====BUY USING MULTIPLE INDICATORS==== ====BUY USING MULTIPLE INDICATORS====
-V2.0 of ProfitTrailer introduced the ability to buy and sell with multiple indicators being used at the same time, and introduced several new indicators: RSI, STOCH, SHOCHRSI, MACD, BBWIDTH, and OBV. With multiple ​indicators, you are able to look at different aspects of the trend of a coin before deciding if you should buy or sell. Combining these indicators ​properly can improve your profitability by a large margin vs using a single ​indicator+V2.0 of ProfitTrailer introduced the ability to buy and sell with multiple ​strategies/indicators being used at the same time, and introduced several new strategies: RSI, STOCH, SHOCHRSI, MACD, BBWIDTH, and OBV, and more. With multiple ​strategies, you are able to look at different aspects of the trend of a coin before deciding if you should buy or sell. Combining these strategies ​properly can improve your profitability by a large margin vs using a single ​strategy
  
 For example, several good indicator pairings are: LOWBB and RSI for buying, HIGHBB and RSI for selling, LOWBB and STOCH, HIGHBB and STOCH, etc.  ​ For example, several good indicator pairings are: LOWBB and RSI for buying, HIGHBB and RSI for selling, LOWBB and STOCH, HIGHBB and STOCH, etc.  ​
  
-Combining the indicators ​would look like the following example (using LOWBB and STOCH for example): ​+Combining the strategies ​would look like the following example (using LOWBB and STOCH for example): ​
 <​file>​ <​file>​
 DEFAULT_A_buy_strategy = LOWBB DEFAULT_A_buy_strategy = LOWBB
Line 34: Line 30:
  
 #Note that the second strategy uses  "​B"​ instead of "​A"​. ​ #Note that the second strategy uses  "​B"​ instead of "​A"​. ​
-#You can have 5 indicators ​used at one time, so A through ​E. They do not need to be consecutive.+#You can have 10 strategies ​used at one time, so A through ​J. They do not need to be consecutive.
 DEFAULT_B_buy_strategy = STOCH DEFAULT_B_buy_strategy = STOCH
 DEFAULT_B_buy_value = 20          - will become true when STOCH <= 20 DEFAULT_B_buy_value = 20          - will become true when STOCH <= 20
Line 56: Line 52:
 ---- ----
 ====UNDERSTANDING THE BUY==== ====UNDERSTANDING THE BUY====
-There are several factors that determine when a bot buys or sells. These are all set in the 3 main configuration ​files that deal with your buying and selling strategies: Indicators.properties, Pairs.properties, and DCA.properties+There are several factors that determine when a bot buys or sells. These are all set in the 3 main configuration ​GUI sections ​that deal with your buying and selling strategies: Indicators, Pairs, and DCA. 
  
 ===PAIRS BUYING=== ===PAIRS BUYING===
Line 62: Line 58:
  
 ==Possible Buy Log== ==Possible Buy Log==
-First, let’s discuss buying. The Possible Buy Log (PBL) is your indicator that your buy strategy is picking up potential candidates to buy. The different settings in the 3 files mentioned above control how the bot evaluates candidates. When you understand how you can tweak those settings, you will understand how to make the bot perform with more profitable behavior. ​+First, let’s discuss buying. The Possible Buy Log (PBL) is your indicator that your buy strategy is picking up potential candidates to buy. The different settings in the 3 GUI sections ​mentioned above control how the bot evaluates candidates. When you understand how you can tweak those settings, you will understand how to make the bot perform with more profitable behavior. ​
  
 When the PBL filters out coins based on these settings. Any of these conditions will prevent a coin from appearing in the [[web_interface_guide#​Possible Buy Log|PBL]]: ​ When the PBL filters out coins based on these settings. Any of these conditions will prevent a coin from appearing in the [[web_interface_guide#​Possible Buy Log|PBL]]: ​
Line 71: Line 67:
   * hidden_pairs will not be shown   * hidden_pairs will not be shown
  
-In version 2.0, the PBL will look for ALL the buy indicators/strategies that you have set (up to total) to be true before it will begin to consider buying a coin. Then it will begin trailing if you have trailing set. As you can see, with v2.0, there are even more hurdles to leap over before the bot will buy, which of course, is a good thing. The more criteria your buy meets, the better the buy should be to try to create an opportunity to create a profit in the future from that purchase. ​+In version 2.3, the PBL will look for ALL the buy strategies that you have set (up to 10 total) to be true before it will begin to consider buying a coin. The exception to this is the [[pairs.properties#​default_buy_strategy_formula]] setting, which allows any valid combination of strategies to be true in order to consider a buy. Then it will begin trailing if you have trailing set. As you can see, there are even more hurdles to leap over before the bot will buy, which of course, is a good thing. The more criteria your buy meets, the better the buy should be to try to create an opportunity to create a profit in the future from that purchase. ​
  
 You can choose to make the bot buy very quickly by creating very loose and aggressive buy settings, but remember that is defeating the purpose of being selective, and using a bot that can do all these calculations and checks for you without emotion. ​ You can choose to make the bot buy very quickly by creating very loose and aggressive buy settings, but remember that is defeating the purpose of being selective, and using a bot that can do all these calculations and checks for you without emotion. ​
Line 104: Line 100:
  
   DEFAULT_DCA_enabled   DEFAULT_DCA_enabled
-The first thing to understand is that you can turn DCA on in the Pairs file with the DEFAULT_DCA_enabled = true setting, or turn it off with “false”. It is probably best to turn it off at first. ​+The first thing to understand is that you can turn DCA on in the Pairs file with the DEFAULT_DCA_enabled = true setting, or you can also use a percentage drop at which to send the pairs to the DCA log using DEFAULT_DCA_enabled = -2 (send the coins to DCA when they drop 2% in price), or turn it off with “false”. It is probably best to turn it off at first. ​
  
 When you turn it on, you need to understand that DCA can eat up a lot of your balance in a hurry if you have bought coins at too high a price and they begin to drop in value. ​ When you turn it on, you need to understand that DCA can eat up a lot of your balance in a hurry if you have bought coins at too high a price and they begin to drop in value. ​
  
-In v2.0 of the software, the amount of the coin being purchased in each DCA cycle can be set for each subsequent purchase using [[faq#DCA level specific settings]]! By default the amount of coin to be purchased (''​[[dca.properties#​DEFAULT_DCA_buy_percentage]]''​) is normally 100% of the current amount of the coin you hold. DCA purchasing can use a large amount of your balance very quickly, so you need to understand how to use and control it. +The amount of the coin being purchased in each DCA cycle can be set for each subsequent purchase using [[faq#DCA level specific settings]]! By default the amount of coin to be purchased (''​[[dca.properties#​DEFAULT_DCA_buy_percentage]]''​) is normally 100% of the current amount of the coin you hold. DCA purchasing can use a large amount of your balance very quickly, so you need to understand how to use and control it. 
  
 Example. If you have bought 0.002 BTC worth of ETH, and you let it DCA, the bot will purchase the following amounts, assuming that you have it set to buy 100% each time:  Example. If you have bought 0.002 BTC worth of ETH, and you let it DCA, the bot will purchase the following amounts, assuming that you have it set to buy 100% each time: 
Line 131: Line 127:
 ====UNDERSTANDING THE SELL==== ====UNDERSTANDING THE SELL====
  
-The sell is just like the buy, and like the buy, can happen in two places: the Pairs side of the bot, and in the DCA side. The sell is driven by default, with a simple GAIN strategy. If you want to try to get more profit from your sells, you can use multiple ​indicators ​coupled together to try to ensure the price of the coin is at a true “high” point before selling. Remember that with multiple ​indicators ​for selling, you **must ​use GAIN** as the base strategy to set the minimum % profit gain.  ​ +The sell is just like the buy, and like the buy, can happen in two places: the Pairs side of the bot, and in the DCA side. The sell is driven by default, with a simple GAIN strategy. If you want to try to get more profit from your sells, you can use multiple ​strategies ​coupled together to try to ensure the price of the coin is at a true “high” point before selling. Remember that with multiple ​strategies ​for selling, ​if you choose to not use GAIN as a sell strategy, your sell settings could potentially sell the coins for a loss! It's probably best at the start if you use GAIN as one of the sell strategies and set the minimum % profit gain.  ​
- +
-If however you are using multiple indicators, like GAIN, HIGHBB and RSI together as your sell strategy, then all 3 of those indicators must evaluate to true before the bot will begin to try to sell. Then, if you are also using trailing_profit+
  
 +If however you are using multiple strategies, like GAIN, HIGHBB and RSI together, then all 3 of those strategies must evaluate to true before the bot will begin to try to sell. The exception to this is the [[pairs.properties#​default_sell_strategy_formula]] which will use any valid combination of strategies that must evaluate as true. Then, if you are also using trailing_profit settings, the bot will begin to trail instead of simply selling.\\
 +**Note:** If you do not use GAIN as a sell strategy, you cannot use trailing profit settings.
 +\\
 +\\
  
 ===PAIRS SELLING=== ===PAIRS SELLING===
  
   DEFAULT_A_sell_value   DEFAULT_A_sell_value
-For the strategy being used, this is the value to be used for the comparison to see if the indicator ​is true or not. +For the strategy being used, this is the value to be used for the comparison to see if the strategy ​is true or not. 
  
-For example, with the GAIN strategy, this is the amount of profit you wish to see before the bot turns this indicator ​true. It is true when the price of the coin exceeds the bought price average by the amount indicated. For The actual setting is found in the Pairs.properties file+For example, with the GAIN strategy, this is the amount of profit you wish to see before the bot turns this strategy ​true. It is true when the price of the coin exceeds the bought price average by the amount indicated. For The actual setting is found in the Pairs config GUI
  
-Another example would be with RSI, the sell_value property would be the RSI level to attain before the RSI indicator ​is set to true. +Another example would be with RSI, the sell_value property would be the RSI level to attain before the RSI strategy ​is set to true. 
  
   DEFAULT_trailing_profit   DEFAULT_trailing_profit
-But, there is a twist! Before executing the sell, the DEFAULT_trailing_profit setting will attempt to allow the bot to work the price upward if it is still going up before it sells. Like the DEFAULT_A_trailing_buy setting above, the profit setting tries to maximize your gains. You can read a Trailing scenario here in [[a_trailing_story|A Trailing Story.]] ​+But, there is a twist! Before executing the sell, the DEFAULT_trailing_profit setting will attempt to allow the bot to work the price upward if it is still going up before it sells. Like the DEFAULT_A_trailing_buy setting above, the profit setting tries to maximize your gains. You can read a Trailing scenario here in [[a_trailing_story|A Trailing Story.]]\\ 
 +Note: If you do not use GAIN as a sell strategy, you cannot use trailing profit settings. 
 +\\ 
 +\\
  
 ===DCA SELLING=== ===DCA SELLING===
-Selling in DCA is similar to selling in Pairs. It uses a GAIN by itself, or multiple other indicators, and has the normal sell parameters already discussed in Pairs. Remember, they can be set differently than what you have in Pairs, and probably **should** be different. ​+Selling in DCA is similar to selling in Pairs. It can use any combination of valid strategies, and has the normal sell parameters already discussed in Pairs. Remember, they can be set differently than what you have in Pairs, and probably **should** be different. ​
  
 Example - when you have a coin that has gone down in value, it is often wise to set the ''​sell_value''​ to a lower value than for a coin that you bought and never went down in price and thus never entered DCA. A coin that has been held at a loss is tying up your balance, and is not making you money. You may wish to get out of it quickly and at a lower profit margin than a purchase that is skyrocketing. ​ Example - when you have a coin that has gone down in value, it is often wise to set the ''​sell_value''​ to a lower value than for a coin that you bought and never went down in price and thus never entered DCA. A coin that has been held at a loss is tying up your balance, and is not making you money. You may wish to get out of it quickly and at a lower profit margin than a purchase that is skyrocketing. ​
Line 162: Line 163:
 Why is my bot not buying? Why won't it sell? Why are there things in my Possible Buy Log (PBL), but it's not buying? Why is my PBL empty? Why is my bot not buying? Why won't it sell? Why are there things in my Possible Buy Log (PBL), but it's not buying? Why is my PBL empty?
    
-The PBL is populated based on several settings in your Pairs.configuration ​and Indicators.configuration files. One of the main factors in buying is:+The PBL is populated based on several settings in your Pairs config GUI and Indicators ​config GUI. One of the main factors in buying is:
  
 <​file>​Your Balance or your TCV (Total Current Value)</​file>​ <​file>​Your Balance or your TCV (Total Current Value)</​file>​
  
-A zero or too low of a balance in your exchange and/or a TCV of zero will keep the bot from adding any coin pairs to your PBL. Additionally,​ if your balance is lower than your ''​[[pairs.properties#​DEFAULT_initial_cost]]''​ setting for the Pairs.properties file, or the ''​[[dca.properties#​DEFAULT_DCA_max_cost]]''​ setting in your DCA.properties file, then the bot won't be able to buy. +A zero or too low of a balance in your exchange and/or a TCV of zero will cause the coins in the PBL to display INSUFFICIENT BALANCE below the buy settings. Additionally,​ if your balance is lower than your ''​[[pairs.properties#​DEFAULT_initial_cost]]''​ setting for the Pairs config GUI, or the ''​[[dca.properties#​DEFAULT_DCA_max_cost]]''​ setting in your DCA config GUI, then the bot won't be able to buy. 
  
  
Line 172: Line 173:
 ---- ----
 ====Pairs Configuration:​==== ====Pairs Configuration:​====
-Settings ​in this file that affect buying:+Settings that affect buying:
  
 <​file>​DEFAULT_trading_enabled = true</​file>​ <​file>​DEFAULT_trading_enabled = true</​file>​
Line 179: Line 180:
 ---- ----
 <​file>​DEFAULT_sell_only_mode = false</​file>​ <​file>​DEFAULT_sell_only_mode = false</​file>​
-If this is “true” the bot will not populate the PBL+If this is “true” the bot will populate the PBL but the coin will show a SOM underneath its buy settings.
 ---- ----
 <​file>​max_trading_pairs</​file>​ <​file>​max_trading_pairs</​file>​
-If the coin pairs in the Pairs log + the DCA log = max_trading_pairs,​ then the PBL will not be populated. If you want more in the PBL, increase this number. ​ +If the coin pairs in the Pairs log + the DCA log = max_trading_pairs,​ then all PBL pairs will show MAX PAIRS under the buy settings, if you want to buy more pairs increase this number. ​
----- +
-<​file>​DEFAULT_min_orderbook_volume_percentage = 150</​file>​ +
-If there is not enough trading volume in the current order books, it will not be considered in the PBL. This setting is measured in percentage, and says "If the volume available in the order book is above 150% of my desired trade amount, then execute the trade, otherwise, do not." ​+
 ---- ----
 <​file>​DEFAULT_min_buy_volume = 500</​file>​ <​file>​DEFAULT_min_buy_volume = 500</​file>​
Line 199: Line 197:
  
 ====How different BUY strategy settings affect the PBL==== ====How different BUY strategy settings affect the PBL====
-Understanding the PBL (Possible Buy Log) and how different buy strategies affect it is key to understanding the bot.  +Understanding the PBL (Possible Buy Log) and how different buy strategies affect it is key to understanding the bot.\\ 
- +Follow this link for detailed explanations ​of all possible ​strategies.\\ 
-=== Buying with LOWBB === +[[buy_and_sell_strategies|Click Here for Buy and Sell Strategy Explanations]]
-For a simple example of this, we look at LOWBB, as it is a fairly straightforward strategy when used by itself.  +
- +
-<​file>​DEFAULT_A_buy_strategy = LOWBB +
-DEFAULT_A_buy_value = X</​file>​ +
-When using LOWBB, the main setting that affects the PBL is ''​[[pairs.properties#​DEFAULT_A_buy_value]]''​ (which, remember, is a percentage). For a coin pair to be bought using LOWBB, the current price must be equal to or less than the value of the LOWBB band multiplied by (1 + DEFAULT_A_buy_value expressed as a percentage). So, in other words, +
- +
-Negative buy_value ​\\ +
-  Buy Price = LOWBB - ((HIGHBB - LOWBB) * ABS(buy_value)/​100) +
- +
-Positive buy value \\ +
-  Buy Price = LOWBB + ((HIGHBB - LOWBB) * ABS(buy_value)/​100) +
- +
-So, for the PT bot to even being to consider a coin pair to be put on the PBL, it needs to be close to the Buy Price. How close the current price needs to be is a closely guarded secret, but it must be reasonably close, say within 10%.  +
- +
-Thus, as an example, if you have no items in the PBL, and your ''​[[pairs.properties#​DEFAULT_A_buy_value]]''​ is set to 0 (which would make the buy price be exactly the LOWBB value), and you look at your exchange and see that all the current coin pairs are up 10 or 20%, then your Buy Price calculation is not close enough to the current prices ​of all the coin pairs. To get the bot to move items into the PBL, the  ''​buy_value''​ may need to be increased. (Again, remember, this is for an exercise only in understanding how the PBL works. If you artificially force the bot to buy a coin, that is not a strategy that is going to create profitable sales in the future. Get a strategy, and then stick to it. Be Patient!!) +
- +
-**What are normal values for DEFAULT_A_buy_value for LOWBB?** \\ +
-(Remember that “A” represents “A” through “E” where you can have up to 5 ''​DEFAULT_X_buy_strategy''​ settings).  +
- +
-Values normally range between -20 for very, very conservative (things are going down in the market and you want to make sure you don’t buy unless the coin is 20% below its normal LOWBB line), to 0 for somewhat conservative,​ to 10-15% for somewhat aggressive, to 25-45% for very aggressive.  +
- +
----- +
-=== Buying with HIGHBB === +
-HIGHBB is the opposite of LOWBB. It's values range from 0 at the HIGHBB line, to 50 at the midpoint, to 100 at the LOWBB line. The bot will set HIGHBB indicator to "​true"​ when the HIGHBB value is <= than the ''​DEFAULT_A_buy_value''​.  +
- +
-For example, if you want to set the HIGHBB buy_value to 20% away from the top, you would do the following: \\ +
-''​[[pairs.properties#​DEFAULT_A_buy_strategy]] = HIGHBB''​\\ +
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = 20''​ +
- +
-If the buy_value is 20, and HIGHBB is = 9, then 9 <= 20, and therefore the indicator is true.  +
- +
----- +
----- +
-===Buying with SMA or EMA strategies ​(SMA/​EMAGAIN,​ SMA/​EMASPREAD,​ SMA/​EMACROSS)=== +
- +
-''​[[pairs.properties#​DEFAULT_A_buy_strategy]] = SMAGAIN (or SMASPREAD, SMACROSS)''​\\ +
-''​[[pairs.properties#​DEFAULT_A_buy_value]] = X''​\\ +
-''​[[pairs.properties#​DEFAULT_A_buy_value_limit]] = Y''​ +
- +
-**Note:** SMA and EMA buy strategies are very similar. Simple Moving Average and Exponential Moving Average are calculated somewhat differently,​ but the strategies trade very similarly, so we will not duplicate the explanations here. Just replace EMA with SMA in your strategy if you wish.  +
- +
-== SMA Formula == +
-//Excerpt from [[https://​www.investopedia.com/​articles/​trading/​10/​simple-exponential-moving-averages-compare.asp|Investopedia.com]]//​\\ +
- +
-Simple moving averages became the preferred method ​for tracking market prices because they are quick to calculate and easy to understand. Early market practitioners operated without the use of the sophisticated chart metrics in use today, so they relied primarily on market prices as their sole guides. They calculated market prices by hand, and graphed those prices to denote trends and market direction. This process was quite tedious, but proved quite profitable with confirmation of further studies. +
- +
-To calculate a 10-day simple moving average, simply add the closing prices of the last 10 days and divide by 10. The 20-day moving average is calculated by adding the closing prices over a 20-day period and divide by 20, and so on. +
- +
-== EMA Formula == +
-//Excerpt from [[https://​www.investopedia.com/​articles/​trading/​10/​simple-exponential-moving-averages-compare.asp|Investopedia.com]]//​\\ +
- +
-The exponential moving average is a refined and more commonly used moving average, thanks to earlier practitioners'​ experiments with the computer. The EMA focuses more on most recent prices rather than on a long series of data points, as the simple moving average required. +
- +
-To Calculate an EMA: +
-<file java> +
-  Current EMA = ((Price(current) - previous EMA)) X multiplier) + previous EMA. +
-</​file>​ +
- +
-The most important factor is the smoothing constant that = 2/(1+N) where N = the number of days. +
-<file java> +
-  A 10-day EMA = 2/(1+10) = 0.1818 +
-</​file>​ +
- +
-This means a 10-period EMA weights the most recent price 18.18%, a 20-day EMA 9.52% and 50-day EMA 3.92% weight on the most recent day. The EMA works by weighting the difference between the current period'​s price and the previous EMA, and adding the result to the previous EMA. The shorter the period, the more weight applied to the most recent price. +
- +
----- +
- +
-=== Buying with SMAGAIN === +
-When using SMAGAIN, the main setting that affects the PBL is ''​[[pairs.properties#​DEFAULT_A_buy_value]]''​ (which, remember, is a percentage). For a coin pair to be bought using SMAGAIN, the current price must be equal to or less than the value of the lower SMA band multiplied by (1 + ''​DEFAULT_A_buy_value''​ expressed as a percentage). So, in other words:  +
- +
-<file java> +
-  ​Buy Price < = Lower SMA value * (1 + DEFAULT_A_buy_value/​100) +
-</​file>​ +
- +
- +
-**What are normal values for DEFAULT_A_buy_value for SMAGAIN?** \\ +
-Values normally range between -2 for very, very conservative (things are going down in the market ​and you want to make sure you don’t buy unless the coin is 2% below the low SMA line), to 0 for somewhat conservative,​ to 1-1.5% for somewhat aggressive, to 2% for very aggressive.  +
- +
-''​[[pairs.properties#​DEFAULT_A_buy_value_limit]]''​ in SMAGAIN puts a lower limit on your DEFAULT_A_buy_value setting so that you will not, for example, go below -X% of the low SMA line. See [[buy_and_sell_strategies|Buy & Sell Strategies]] for details on this setting, but it will affect PBL if your coin pair price is below that limit.  +
- +
----- +
-===Buying with SMASPREAD=== +
-This is similar to SMAGAIN, but the DEFAULT_A_buy_value is a percentage spread between the fast and slow SMA lines. If your coin pairs are not populating the PBL, consider the current spread of the SMA lines, and adjust your DEFAULT_A_buy_value accordingly.  +
- +
----- +
-===Buying with SMACROSS=== +
-Buying with SMACROSS is similar to SMAGAIN, but the two SMA lines must have crossed within the last ''​SMA_cross_candles''​ (set in Indicators.configuration) value, minus one candle (e.g. if SMA_cross_candles is 5, then the cross must have occurred within the last 4 candles). In addition, the current value of the coin must be below the lower SMA line by DEFAULT_A_buy_value % (again, similar to SMAGAIN explained above and in [[buy_and_sell_strategies|Buy & Sell Strategies]].  +
- +
-Thus if your PBL is not being populated, adjust both your SMA_cross_candles value (in Indicators.configuration file) and your DEFAULT_A_buy_value in Pairs.configuration.  +
- +
----- +
----- +
-=== Buying with LOSS strategy === +
-Buying with LOSS says that to buy, the current coin pair price must be equal to or below DEFAULT_A_buy_value loss % of the coin pair within the last 24 hours. Thus, the buy price is calculated:​ +
-<file jave> +
-  Buy Price < = Current Coin Price * (1 - ABS[DEFAULT_A_buy_value/​100]) < DEFAULT_A_buy_value_limit ​   +
-</​file>​ +
-The PBL will not be populated with possibly buys if they are not near the Buy Price calculated above. If you are not getting PBL listings, try adjusting the DEFAULT_A_buy_value closer to 0, to allow for a smaller loss.  +
- +
-**Normal Values for DEFAULT_A_buy_value with LOSS** \\ +
-0 is the lowest possible value. Using 0 says that the coin should be purchased if the current value of the coin is equal to or less than the loss on that coin in the past 24 hours. If that coin is up in price in the past 24 hours, therefore, it will not be considered for the PBL unless that gain is close to zero. Any value greater than 0 is more conservative.  +
- +
----- +
----- +
-=== Buying with RSI strategy === +
- +
-The Relative Strength Index is a momentum oscillator that measures the speed and change of price movements. It is a commonly used and very popular indicator and works well when paired with Bollinger Bands.  +
-The default and typically used ''​RSI_length''​ for RSI is 14, lowering increases sensitivity,​ raising decreases it. +
-RSI is typically considered overbought when above 70 and oversold when below 30. +
- +
-More can be learned about this indicator here: http://​stockcharts.com/​school/​doku.php?​id=chart_school:​technical_indicators:​relative_strength_index_rsi +
- +
-When buying with RSI, the buy_value must be less or equal to calculated RSI.  +
- +
-The comparison for the RSI strategy is:  +
-“DEFAULT_A_buy_value < = RSI < DEFAULT_A_buy_value_limit”  +
- +
-**Normal Values for RSI**\\ +
-To buy with RSI, normal values are 30 or less. This can be adjusted up or down based on your risk tolerance. Lower is more conservative,​ higher is more aggressive.  +
- +
----- +
----- +
-=== Buying with STOCH strategy === +
-A summary definition from [[http://​stockcharts.com/​school/​doku.php?​id=chart_school:​technical_indicators:​stochastic_oscillator_fast_slow_and_full|this at StockCharts.com]] (there is a great deal of in depth information in this article): +
- +
-The Stochastic Oscillator is a momentum indicator that shows the location of the close relative to the high-low range over a set number of periods. STOCH follows the speed or the momentum of price. As a rule, the momentum changes direction before price. STOCH is also used to identify bull and bear set-ups to anticipate a future reversal. Because the Stochastic Oscillator is range bound, is also useful for identifying overbought and oversold levels. +
- +
-When buying with STOCH, the buy_value must be equal to or less than the value of the calculated STOCH.  +
- +
-The comparison for the STOCH strategy is:  +
-“DEFAULT_A_buy_value < = STOCH < DEFAULT_A_buy_value_limit” +
- +
-**Normal Values for STOCH**\\ +
-To buy with STOCH, max and min values are between 0 and 100, as it is expressed as a percentage. Normal values for judging oversold is 20 and overbought is 80. A buy value of 20 can be adjusted up or down based on your risk tolerance. For the buy , lower is more conservative,​ higher is more aggressive.  +
- +
----- +
----- +
-=== Buying with STOCHRSI strategy === +
-== (Deprecated - Use STOCHRSID for TradingView visualization) == +
- +
-From [[http://​stockcharts.com/​school/​doku.php?​id=chart_school:​technical_indicators:​stochrsi|this article on StockCharts.com]] (much more info here, please read):  +
- +
-StochRSI is an oscillator that measures the level of RSI relative to its high-low range over a set time period. StochRSI applies the Stochastics formula to RSI values, instead of price values. This makes it an indicator of an indicator. The result is an oscillator that fluctuates between 0 and 1. +
- +
-Traders looking to enter a stock based on an overbought or oversold reading in RSI might find themselves continuously on the sidelines. Chande and Kroll developed StochRSI to increase sensitivity and generate more overbought/​oversold signals. A move above 0.80 is considered overbought, while a move below 0.20 is considered oversold. Second, it can be used to identify the short-term trend.  +
- +
-When buying with STOCHRSI, the buy_value must be equal to or less than the value of the calculated STOCHRSI.  +
- +
-The comparison for the STOCHRSI strategy is:  +
-“DEFAULT_A_buy_value < = STOCHRSI < DEFAULT_A_buy_value_limit” +
- +
-**Normal Values for STOCHRSI**\\ +
-To buy with STOCHRSI, max and min values are between 0 and 1. Normal values for judging oversold is 0.20 and overbought is 0.80. A buy value of 0.20 can be adjusted up or down based on your risk tolerance. For the buy , lower is more conservative,​ higher is more aggressive.  +
- +
----- +
----- +
-=== Buying with MACD strategy === +
-MACD becomes true based on the comparison below.  +
- +
-The comparison for MACD strategy comparison is  +
-<​file>​ +
-If buy_value >= 0 +
-  true when: DEFAULT_A_buy_value < MACD < DEFAULT_A_buy_value_limit +
-if buy_value < 0 +
-  true when: DEFAULT_A_buy_value > MACD > DEFAULT_A_buy_value_limit +
-</​file>​ +
- +
-**Normal Values for MACD**\\ +
-Because MACD is unbound, it is difficult to provide “normal” values in the current implementation of this strategy. You can test the values for each coin by using [[http://​www.TradingView.com|TradingView.com]] to model the behavior.  +
- +
-It is recommended that you combine MACD with RSI, STOCH, or STOCHRSI as a verification of the signal.  +
- +
----- +
----- +
-=== Buying with BBWIDTH strategy === +
-When buying with BBWIDTH, the buy_value must be less or equal to calculated BBWIDTH.  +
- +
-The comparison for BBWIDTH strategy is:  +
-“DEFAULT_A_buy_value < = BBWIDTH < DEFAULT_A_buy_value_limit”  +
- +
-**Normal Values for BBWIDTH**\\ +
-To buy with BBWIDTH, normal values are 30 or less. This can be adjusted up or down based on your risk tolerance. Lower is more conservative,​ higher is more aggressive. You will likely need to adjust BBWIDTH buy_values per coin. You can test the values for each coin by using [[http://​www.TradingView.com|TradingView.com]] to model the behavior.  +
- +
-BBWIDTH is not a good stand alone indicator, and should be combined with other indicators like RSI, STOCH, STOCHRSI, etc.  +
- +
-From [[http://​stockcharts.com/​school/​doku.php?​id=chart_school:​technical_indicators:​bollinger_band_width|this article at StockCharts.com]] (much more info here, please read):  +
- +
-Bollinger BandWidth is an indicator derived from Bollinger Bands.  +
- +
-BandWidth measures the percentage difference between the upper band and the lower band. BandWidth decreases as Bollinger Bands narrow and increases as Bollinger Bands widen. Because Bollinger Bands are based on the standard deviation, falling BandWidth reflects decreasing volatility and rising BandWidth reflects increasing volatility. +
- +
-Bollinger Bands consist of a middle band with two outer bands. The middle band is a simple moving average usually set at 20 periods. The outer bands are usually set 2 standard deviations above and below the middle band. Settings can be adjusted to suit the characteristics of particular securities or trading styles. +
- +
-Bollinger BandWidth is best known for identifying The Squeeze. This occurs when volatility falls to a very low level, as evidenced by the narrowing bands. The upper and lower bands are based on the standard deviation, which is a measure of volatility. The bands narrow as price flattens or moves within a relatively narrow range. The theory is that periods of low volatility are followed by periods of high volatility. Relatively narrow BandWidth (a.k.a. the Squeeze) can foreshadow a significant advance or decline. After a Squeeze, a price surge and subsequent band break signal the start of a new move. A new advance starts with a Squeeze and subsequent break above the upper band. A new decline starts with a Squeeze and subsequent break below the lower band. +
- +
-Using BBWIDTH with HIGHBB, where the coin breaks the upper band is a good possible use of this indicator.  +
- +
----- +
----- +
-=== Buying with OBV strategy === +
-When buying with OBV, the buy_value must be less or equal to calculated OBV.  +
- +
-The comparison for OBV strategy is:  +
-“DEFAULT_A_buy_value < = OBV < DEFAULT_A_buy_value_limit”  +
- +
-**Normal Values for OBV**\\ +
-OBV is an unbound number, so "​normal"​ is not definable. OBV values can be modeled on [[http://​www.TradingView.com|TradingView.com]] so that you can understand and determine your own "​good"​ values to use for this indicator.  +
- +
-OBV is not a good stand alone indicator, and should be combined with other indicators like RSI, STOCH, STOCHRSI, etc. +
- +
-On Balance Volume (OBV) measures buying and selling pressure as a cumulative indicator that adds volume on up days and subtracts volume on down days. It was one of the first indicators to measure positive and negative volume flow. Chartists can look for divergences between OBV and price to predict price movements or use OBV to confirm price trends. +
- +
-OBV for PT is calculated as the difference between the first volume amount captured (from OBV_length periods), and the signal candle (from OBV_signal),​ in percentage.  +
- +
-In PT, only the past 500 candles of volume are available, so OBV_length must be less than 500 (499 max).  +
-  +
  
 [[buy_and_sell_logic|TOP]] [[buy_and_sell_logic|TOP]]
----- 
 ---- ----
 ====How Indicators Configuration affect the PBL==== ====How Indicators Configuration affect the PBL====
  
-The following settings affect the PBL+The following settings affect the PBL:
  
-All of the items in the indicators ​configuration ​affect the PBL. As you change the settings, they either make the reactions of the bot more or less aggressive. ​Bascially, the longer the period, or the length, or the amount of time for the signal settings, the less aggressive/​more conservative the bot will be. The opposite is true when the settings are shorter - the bot will calculate values with more volatility and thus the bot will react more aggressively. ​+All of the items in the indicators ​config GUI affect the PBL. As you change the settings, they either make the reactions of the bot more or less aggressive. ​Basically, the longer the period, or the length, or the amount of time for the signal settings, the less aggressive/​more conservative the bot will be. The opposite is true when the settings are shorter - the bot will calculate values with more volatility and thus the bot will react more aggressively. ​
  
 Smoother is better, but there are recommended settings that are the "​sweet"​ spot for most of these strategies. If you are not sure, use the default. Looking up these strategies on the popular investing education websites will normally discuss in much better detail how to change the length of these settings in different situations. ​ Smoother is better, but there are recommended settings that are the "​sweet"​ spot for most of these strategies. If you are not sure, use the default. Looking up these strategies on the popular investing education websites will normally discuss in much better detail how to change the length of these settings in different situations. ​
  • buy_and_sell_logic.1547211907.txt.gz
  • Last modified: 3 months ago
  • by armchairguru