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/07/01 01:30]
armchairguru
buy_and_sell_strategies [2019/07/17 14:04] (current)
taniman
Line 38: Line 38:
 ^ [[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#​FIXEDPRICE]] ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |  {{glyphicon>​ok?​12}} ​ |
 +^ [[buy_and_sell_strategies#​ATRPERCENTAGE]] ​ |  {{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 1574: Line 1575:
 ''​[[pairs_config#​DEFAULT_A_buy_value]] = 0.00000016''​ → buy zone begins when the ask price for BTT is below 16 satoshi.\\ ''​[[pairs_config#​DEFAULT_A_buy_value]] = 0.00000016''​ → buy zone begins when the ask price for BTT is below 16 satoshi.\\
 ''​[[pairs_config#​DEFAULT_A_buy_value_limit]]''​ must be less than 0.00000016 if used. ''​[[pairs_config#​DEFAULT_A_buy_value_limit]]''​ must be less than 0.00000016 if used.
 +
 +\\
 +[[buy_and_sell_strategies|TOP]]
 +\\
 +
 +----
 +
 +==== ATRPERCENTAGE ====
 +
 +To calculate the Average True Range (ATR), we first need to calculate the true range of each candle period. True Range takes into account ​
 +the most current period high/low range as well as the previous period close if necessary. ​
 +
 +There are three calculation which need to be completed and then compared against each other.
 +
 +The True Range is the largest of the following:
 +<​file>​
 +The Current Period High minus (-) Current Period Low
 +The Absolute Value (abs) of the Current Period High minus (-) The Previous Period Close
 +The Absolute Value (abs) of the Current Period Low minus (-) The Previous Period Close
 +</​file>​
 +
 +The ATR is an Exponential Moving Average (default EMA, can be SMA) of the True Range.
 +
 +**Note:** Due to using absolute values the true range and the Average true range are always positive. It measures only volatility, not direction. You should use other strategies to supplement the ATR strategy.
 +----
 +
 +**The Numbers**
 +
 +Valid Values: positive decimal values.
 +
 +----
 +**The Formula**
 +
 +To calculate the true range in any given period:
 +<​file>​
 +true range= largest of [(high - low), abs(high - previous close), abs (low - previous close)]
 +</​file>​
 +
 +To calculate the ATR plot the EMA or SMA or the true range.
 +
 +The BSV displayed in ProfitTrailer is the  difference between the moving average and the current ATR value expressed as a percentage:
 +<​file>​
 +(ATRvalue / MA1value ) * 100
 +</​file>​
 +
 +----
 +
 +**The Parameters**
 +
 +''​[[indicators_config#​ATRPERCENTAGE_indicator]]''​ = EMA/SMA\\
 +''​[[indicators_config#​ATRPERCENTAGE_candle_period]]''​ = 3600\\
 +''​[[indicators_config#​ATRPERCENTAGE_length]]''​ = 14\\
 +''​[[indicators_config#​ATRPERCENTAGE_offset]]''​ = 0\\
 +
 +----
 + 
 +**Examples**
 +\\
 +
 +Buy if the ATR is less than, or no more than 50% above, the moving average.
 +In Pairs Config:
 +<file java>
 +XRP_A_buy_strategy = ATRPERCENTAGE
 +XRP_A_buy_value = 1.5
 +</​file>​
 +
 +''​[[pairs_config#​DEFAULT_A_buy_value]] = 1.5''​ → buy zone begins when the calculated percentage is less than 1.5%\\
 +''​[[pairs_config#​DEFAULT_A_buy_value_limit]]''​ must be less than 1.5 if used.
 +
 +\\
 +You can also buy when the volatility is higher than a certain threshold by changing the buy strategy direction.
 +
 +Buy if the ATR is at least double the moving average.
 +In Pairs Config:
 +<file java>
 +XRP_A_buy_strategy = ATRPERCENTAGE
 +XRP_A_buy_value = 2
 +DEFAULT_A_buy_strategy_direction = UP
 +</​file>​
 +
 +''​[[pairs_config#​DEFAULT_A_buy_value]] = 2''​ → buy zone begins when the calculated percentage is greater than or equal to 2%\\
 +''​[[pairs_config#​DEFAULT_A_buy_value_limit]]''​ must be more than 2 if used.
  
 \\ \\
  • buy_and_sell_strategies.1561944616.txt.gz
  • Last modified: 3 weeks ago
  • by armchairguru