kikocis/freqtrade-strategies public
Changesets · Branches · Tags · Compare
| Changeset | e917d4497ebb88720d8294f9796af10bcb86d60560949bd72ecaac58fb4909d8 |
|---|---|
| Author | Bryan Chain <bryan.chain@cerner.com> · 2021-03-27 21:39 -04:00 |
| Committer | Bryan Chain <bryan.chain@cerner.com> · 2021-03-27 21:39 -04:00 |
| Parents | d1cf5b9dde0b |
4 files changed
modified README.md +2 −0
| @@ -3,3 +3,5 @@ | ||
| 3 | 3 | Strategies for [Freqtrade](https://freqtrade.io), developed primarily in a partnership between @werkkrew and @JimmyNixx from the Freqtrade Discord. |
| 4 | 4 | |
| 5 | 5 | Use these strategies at your own risk. We are not responsible for anything. |
| 6 | + | |
| 7 | + |
modified hyperopts/SolipsisHyp_v3.py +4 −3
| @@ -150,6 +150,7 @@ | ||
| 150 | 150 | |
| 151 | 151 | # None of this will work unless you pull the fork werkkrew/freqtrade and switch to branch hyperopt |
| 152 | 152 | # Which you almost certainly do *not* want to do. |
| 153 | + # https://github.com/werkkrew/freqtrade/tree/hyperopt | |
| 153 | 154 | @staticmethod |
| 154 | 155 | def generate_dynamic_roi(params: Dict) -> Dict[int, float]: |
| 155 | 156 | |
| @@ -207,9 +208,9 @@ | ||
| 207 | 208 | def custom_stoploss_space() -> List[Dimension]: |
| 208 | 209 | |
| 209 | 210 | return [ |
| 210 | - Integer(500, 1440, name='cstp_decay_time'), | |
| 211 | - Integer(0, 360, name='cstp_decay_delay'), | |
| 212 | - Real(-0.30, -0.20, name='cstp_decay_start'), | |
| 211 | + Integer(300, 1440, name='cstp_decay_time'), | |
| 212 | + Integer(0, 180, name='cstp_decay_delay'), | |
| 213 | + Real(-0.35, -0.15, name='cstp_decay_start'), | |
| 213 | 214 | Real(-0.05, 0, name='cstp_decay_end'), |
| 214 | 215 | Real(0.01, 0.04, name='cstp_cur_min_diff'), |
| 215 | 216 | Real(-0.05, 0, name='cstp_cur_threshold'), |
modified strategies/Solipsis.py +10 −0
| @@ -10,6 +10,16 @@ | ||
| 10 | 10 | *** THIS IS A CHILD STRATEGY, REQUIRES IMPORT OF PARENT STRATEGY ** |
| 11 | 11 | *** CURRENTLY MAPS TO PARENT STRATEGY: Solipsis_v3 *** |
| 12 | 12 | |
| 13 | +Example for Custom Pair Params: | |
| 14 | + | |
| 15 | + custom_pair_params = [ | |
| 16 | + { | |
| 17 | + 'pairs': ('ABC/XYZ', 'DEF/XYZ'), | |
| 18 | + 'buy_params': {}, | |
| 19 | + 'sell_params': {}, | |
| 20 | + 'minimal_roi': {} | |
| 21 | + } | |
| 22 | + | |
| 13 | 23 | LAST OPTIMIZED: |
| 14 | 24 | |
| 15 | 25 | EXCHANGE: |
modified strategies/Solipsis_v3.py +24 −19
| @@ -25,7 +25,7 @@ | ||
| 25 | 25 | |
| 26 | 26 | """ |
| 27 | 27 | Solipsis - By @werkkrew and @JimmyNixx |
| 28 | -This strategy is an evolution of our previous framework "Schism" which we are happy to share by request. While Schism has been superceded by this | |
| 28 | +This strategy is an evolution of our previous framework "Schism" which can be found in this repository. While Schism has been superceded by this | |
| 29 | 29 | strategy there may still be valuable examples and ideas in it. |
| 30 | 30 | |
| 31 | 31 | We ask for nothing in return except that if you make changes which bring you greater success than what has been provided, you share those ideas back to us |
| @@ -34,7 +34,9 @@ | ||
| 34 | 34 | We take no responsibility for any success or failure you have using this strategy. |
| 35 | 35 | |
| 36 | 36 | Apes together strong. |
| 37 | - | |
| 37 | +This is not financial advice. | |
| 38 | +We like the stock. | |
| 39 | +Where lambo? | |
| 38 | 40 | |
| 39 | 41 | ************* |
| 40 | 42 | This is a very advanced strategy. It requires a lot of configuration, optimization, and understanding of how it works and what it does before use. |
| @@ -72,7 +74,7 @@ | ||
| 72 | 74 | a lot of variables being hyperopted and it may take a lot of epochs to find the right settings. |
| 73 | 75 | - It is possible to hyperopt the custom stoploss and dynamic ROI settings, however a change to the freqtrade code is needed. I have done |
| 74 | 76 | this in a fork on github and I use it personally, but this code will likely never get merged upstream so use with extreme caution. |
| 75 | - (github.com/werkkrew/freqtrade branch: hyperopt) | |
| 77 | + (https://github.com/werkkrew/freqtrade/tree/hyperopt) | |
| 76 | 78 | - Hyperopt Notes: |
| 77 | 79 | - Hyperopting buy/custom-stoploss/dynamic-roi together takes a LOT of repeat 1000 epoch runs to get optimal results. There |
| 78 | 80 | are a ton of variables moving around and often times the reported best epoch is not desirable. |
| @@ -522,25 +524,28 @@ | ||
| 522 | 524 | Custom Methods |
| 523 | 525 | """ |
| 524 | 526 | # Get parameters for various settings on a per pair or group of pairs basis |
| 527 | + # This function can probably be simplified dramatically | |
| 525 | 528 | def get_pair_params(self, pair: str, params: str) -> Dict: |
| 526 | - buy_params = self.buy_params | |
| 527 | - sell_params = self.sell_params | |
| 528 | - minimal_roi = self.minimal_roi | |
| 529 | + buy_params, sell_params = self.buy_params, self.sell_params | |
| 530 | + minimal_roi, dynamic_roi = self.minimal_roi, self.dynamic_roi | |
| 529 | 531 | custom_stop = self.custom_stop |
| 530 | - dynamic_roi = self.dynamic_roi | |
| 531 | 532 | |
| 532 | - if self.custom_pair_params and pair != 'backtest': | |
| 533 | - custom_params = next(item for item in self.custom_pair_params if pair in item['pairs']) | |
| 534 | - if 'buy_params' in custom_params: | |
| 535 | - buy_params = custom_params['buy_params'] | |
| 536 | - if 'sell_params' in custom_params: | |
| 537 | - sell_params = custom_params['sell_params'] | |
| 538 | - if 'minimal_roi' in custom_params: | |
| 539 | - custom_stop = custom_params['minimal_roi'] | |
| 540 | - if 'custom_stop' in custom_params: | |
| 541 | - custom_stop = custom_params['custom_stop'] | |
| 542 | - if 'dynamic_roi' in custom_params: | |
| 543 | - dynamic_roi = custom_params['dynamic_roi'] | |
| 533 | + if self.custom_pair_params: | |
| 534 | + # custom_params = next(item for item in self.custom_pair_params if pair in item['pairs']) | |
| 535 | + for item in self.custom_pair_params: | |
| 536 | + if 'pairs' in item and pair in item['pairs']: | |
| 537 | + custom_params = item | |
| 538 | + if 'buy_params' in custom_params: | |
| 539 | + buy_params = custom_params['buy_params'] | |
| 540 | + if 'sell_params' in custom_params: | |
| 541 | + sell_params = custom_params['sell_params'] | |
| 542 | + if 'minimal_roi' in custom_params: | |
| 543 | + custom_stop = custom_params['minimal_roi'] | |
| 544 | + if 'custom_stop' in custom_params: | |
| 545 | + custom_stop = custom_params['custom_stop'] | |
| 546 | + if 'dynamic_roi' in custom_params: | |
| 547 | + dynamic_roi = custom_params['dynamic_roi'] | |
| 548 | + break | |
| 544 | 549 | |
| 545 | 550 | if params == 'buy': |
| 546 | 551 | return buy_params |