From 80e264eeaa22cdc8ec1101eae3afe9ee96945ba4 Mon Sep 17 00:00:00 2001 From: David Brazda Date: Thu, 1 Jun 2023 17:57:32 +0200 Subject: [PATCH] RSI<35 jako buysignal,vypnuta slopeProtect na buy --- v2realbot/ENTRY_Vykladaci_RSI_MYSELL.py | 12 ++++++++---- v2realbot/__pycache__/config.cpython-310.pyc | Bin 2847 -> 2847 bytes v2realbot/config.py | 2 +- .../strategy/__pycache__/base.cpython-310.pyc | Bin 14184 -> 14208 bytes v2realbot/strategy/base.py | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/v2realbot/ENTRY_Vykladaci_RSI_MYSELL.py b/v2realbot/ENTRY_Vykladaci_RSI_MYSELL.py index d508ff7..734bdf1 100644 --- a/v2realbot/ENTRY_Vykladaci_RSI_MYSELL.py +++ b/v2realbot/ENTRY_Vykladaci_RSI_MYSELL.py @@ -407,7 +407,7 @@ def next(data, state: StrategyState): dont_buy_when['last_buy_offset_too_soon'] = data['index'] < (state.vars.last_buysignal_index + safe_get(state.vars, "lastbuy_offset",3)) dont_buy_when['blockbuy_active'] = (state.vars.blockbuy == 1) dont_buy_when['jevylozeno_active'] = (state.vars.jevylozeno == 1) - dont_buy_when['buy_protection_enabled'] = buy_protection_enabled() + #dont_buy_when['buy_protection_enabled'] = buy_protection_enabled() dont_buy_when['open_rush'] = is_open_rush(datetime.fromtimestamp(data['updated']).astimezone(zoneNY), safe_get(state.vars, "open_rush",0)) dont_buy_when['close_rush'] = is_close_rush(datetime.fromtimestamp(data['updated']).astimezone(zoneNY), safe_get(state.vars, "close_rush",0)) dont_buy_when['rsi_is_zero'] = (state.indicators.RSI14[-1] == 0) @@ -429,14 +429,18 @@ def next(data, state: StrategyState): #slopeMA jde dolu, rsi jde nahoru #buy mame kazdy potvrzeny, tzn. rsi falling muze byt jen 2 - buy_cond['AND']['slopeMA_falling'] = isfalling(state.indicators.slopeMA,3) - buy_cond['AND']['rsi_is_rising'] = isrising(state.indicators.RSI14,2) - buy_cond["AND"]["rsi_buy_signal_below"] = state.indicators.RSI14[-1] < safe_get(state.vars, "rsi_buy_signal_below",40) + + #buy_cond['AND']['slopeMA_falling'] = isfalling(state.indicators.slopeMA,3) + #buy_cond['AND']['rsi_is_rising'] = isrising(state.indicators.RSI14,2) + #buy_cond["AND"]["rsi_buy_signal_below"] = state.indicators.RSI14[-1] < safe_get(state.vars, "rsi_buy_signal_below",40) #puvodni buy conditiony #buy_cond["AND"]["rsi_buy_signal_below"] = state.indicators.RSI14[-1] < safe_get(state.vars, "rsi_buy_signal_below",40) #buy_cond["AND"]["ema_trend_is_falling"] = isfalling(state.indicators.ema,state.vars.Trend) + #pouze RSI pod 35 a zadny jiny + buy_cond["AND"]["rsi_buy_signal_below"] = state.indicators.RSI14[-1] < safe_get(state.vars, "rsi_buy_signal_below",40) + result, conditions_met = eval_cond_dict(buy_cond) if result: state.ilog(e=f"BUY SIGNAL {conditions_met}") diff --git a/v2realbot/__pycache__/config.cpython-310.pyc b/v2realbot/__pycache__/config.cpython-310.pyc index 9be4c78c1d9839d50837ff059ebd0374b4c4e829..3aec37775dd021fcc66fbaa753812cb3856b8cc5 100644 GIT binary patch delta 195 zcmW-aI}QO+07c(3Kl6DrK4S*M_^(CuqPX>aBpR(wL84{@5?fHR4$H6xFLR5NoYUM# z_Q=#hsX&-rKS#cAYIAZC&_l>NBJJ!I;))3!GY{Uy=X4jVU#PD88&U3zyx?^Z$A zSd+?_GS;K7s|>Vtu-IbzZlTW(LUs|chnRgN3^8DYRLj#4BgV*>WEh(~F?Z84&p5!G VDHf(K89gP6z5Lm7Q>>kD^$!m$E(!nu diff --git a/v2realbot/config.py b/v2realbot/config.py index de82591..2baf679 100644 --- a/v2realbot/config.py +++ b/v2realbot/config.py @@ -6,7 +6,7 @@ from appdirs import user_data_dir NORMALIZED_TICK_BASE_PRICE = 30.00 LOG_RUNNER_EVENTS = False #no print in console -QUIET_MODE = False +QUIET_MODE = True #how many consecutive trades with the fill price are necessary for LIMIT fill to happen in backtesting #0 - optimistic, every knot high will fill the order #N - N consecutive trades required diff --git a/v2realbot/strategy/__pycache__/base.cpython-310.pyc b/v2realbot/strategy/__pycache__/base.cpython-310.pyc index d17c41e75f1db29a3e52d2a05c202ff5c06fc6fd..d06bc3795377c5c30343417cdcf474c9ccaeae84 100644 GIT binary patch delta 556 zcmaKpJ4nM&6o&7)NgpOnZDXZR@KHq3$@d~o;?%l|(1OZ!FiO=lqAe*Z1qGp^MhCZw zi@1mcM|E>{b`dvMM{&@T+Xqf2@N>`o|NG^fn~&V?nzE)S62a%`VVfP@DQ8{&2qnZM z8ewD;^e^kSYj6k3#H37^Ach+qkLE1{6IVoi#suby66Ri^xaLl^<&sR1Y&b(pLP;!2 zrpP=|ei{`Cvt(mTB!*N-199FtthX9mxz05>OKz~H|AA#VEZ>A>nlN7-c52kx_gWX- z@vOJj#>RmG{38liKi5{)QW0=aX@V5Pd?%mpjJwp()&wCz0e#d-1 zhH;fz^SvQk@AU(G+IxNb0N=K^{~lo4ejK=QL7TliI7uO8T@PP@WT!^r0<8Z6ngWEn delta 520 zcmZ8ey-UMT5Wjm#YnwJTYPGFZv=&j+!OyKY6%++Qkcyy#@VZ2e7$e$}qNU&C7`pEJK%|X`79NY7=Q^X zaM(lr+qz4Q<^9w*seuY|VMEks4Xl94xR`NtgkJ`)APZ};RaO#8Vo@?h?n}4|szL^q zVP{kXLn_Q5ICq8meK6`%L*7))TI@?4{`civ-&VtyYxu&R@6=1<_tJ#DG*Uf{DN<5@ zJ;zSjKsT}M)`(l1c~ey&O&|ls*rW?7Y6}6u40v)yZT0XrE>#(EA?HzAoWey5&sKMO zYTjAQtE-9;A0}@*mn(>WR!J;e#*Kv9X)+_pBUN@qJn5PprovopmtM0j(mfr@g09iG zy!j1%o#%ITq( 0 and item['confirmed'] == 1: - rt_out["indicators"] = dict() for key, value in self.state.indicators.items(): #odchyceny pripad, kdy indikatory jsou inicializovane, ale jeste v nich nejsou data, pak do WS nic neposilame try: