From 990c3a1eacc3b6a95ce522c74301d4f0ea714b16 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 26 Jan 2021 11:26:30 -0500 Subject: [PATCH] Try out 3 ticks away as limit submission --- piker/_ems.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/piker/_ems.py b/piker/_ems.py index 07fabe29..17c68831 100644 --- a/piker/_ems.py +++ b/piker/_ems.py @@ -539,11 +539,17 @@ async def _ems_main( if action == 'buy': tickfilter = ('ask', 'last', 'trade') percent_away = 0.005 - abs_diff_away = 2 * mt + + # TODO: we probably need to scale this based + # on some near term historical spread + # measure? + abs_diff_away = 3 * mt + elif action == 'sell': tickfilter = ('bid', 'last', 'trade') percent_away = -0.005 - abs_diff_away = -2 * mt + abs_diff_away = -3 * mt + else: # alert tickfilter = ('trade', 'utrade', 'last') percent_away = 0