Elffuss BraidHub

kikocis/freqtrade-strategies public

minor fixes
Changesete917d4497ebb88720d8294f9796af10bcb86d60560949bd72ecaac58fb4909d8
AuthorBryan Chain <bryan.chain@cerner.com> · 2021-03-27 21:39 -04:00
CommitterBryan Chain <bryan.chain@cerner.com> · 2021-03-27 21:39 -04:00
Parentsd1cf5b9dde0b

Browse the files at this changeset

4 files changed

modified README.md +2 −0
@@ -3,3 +3,5 @@
33 Strategies for [Freqtrade](https://freqtrade.io), developed primarily in a partnership between @werkkrew and @JimmyNixx from the Freqtrade Discord.
44
55 Use these strategies at your own risk. We are not responsible for anything.
6+
7+![Where Lambo?](misc/wherelambo.jpg)
modified hyperopts/SolipsisHyp_v3.py +4 −3
@@ -150,6 +150,7 @@
150150
151151 # None of this will work unless you pull the fork werkkrew/freqtrade and switch to branch hyperopt
152152 # Which you almost certainly do *not* want to do.
153+ # https://github.com/werkkrew/freqtrade/tree/hyperopt
153154 @staticmethod
154155 def generate_dynamic_roi(params: Dict) -> Dict[int, float]:
155156
@@ -207,9 +208,9 @@
207208 def custom_stoploss_space() -> List[Dimension]:
208209
209210 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'),
213214 Real(-0.05, 0, name='cstp_decay_end'),
214215 Real(0.01, 0.04, name='cstp_cur_min_diff'),
215216 Real(-0.05, 0, name='cstp_cur_threshold'),
modified strategies/Solipsis.py +10 −0
@@ -10,6 +10,16 @@
1010 *** THIS IS A CHILD STRATEGY, REQUIRES IMPORT OF PARENT STRATEGY **
1111 *** CURRENTLY MAPS TO PARENT STRATEGY: Solipsis_v3 ***
1212
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+
1323 LAST OPTIMIZED:
1424
1525 EXCHANGE:
modified strategies/Solipsis_v3.py +24 −19
@@ -25,7 +25,7 @@
2525
2626 """
2727 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
2929 strategy there may still be valuable examples and ideas in it.
3030
3131 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 @@
3434 We take no responsibility for any success or failure you have using this strategy.
3535
3636 Apes together strong.
37-
37+This is not financial advice.
38+We like the stock.
39+Where lambo?
3840
3941 *************
4042 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 @@
7274 a lot of variables being hyperopted and it may take a lot of epochs to find the right settings.
7375 - It is possible to hyperopt the custom stoploss and dynamic ROI settings, however a change to the freqtrade code is needed. I have done
7476 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)
7678 - Hyperopt Notes:
7779 - Hyperopting buy/custom-stoploss/dynamic-roi together takes a LOT of repeat 1000 epoch runs to get optimal results. There
7880 are a ton of variables moving around and often times the reported best epoch is not desirable.
@@ -522,25 +524,28 @@
522524 Custom Methods
523525 """
524526 # Get parameters for various settings on a per pair or group of pairs basis
527+ # This function can probably be simplified dramatically
525528 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
529531 custom_stop = self.custom_stop
530- dynamic_roi = self.dynamic_roi
531532
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
544549
545550 if params == 'buy':
546551 return buy_params