From 6d8095e1ab1c13aa2d7bf74c38d86cf57d6ed371 Mon Sep 17 00:00:00 2001 From: David Brazda Date: Tue, 9 May 2023 19:26:14 +0200 Subject: [PATCH] consolidace vice sell limitek --- v2realbot/ENTRY_backtest_strategyVykladaci.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/v2realbot/ENTRY_backtest_strategyVykladaci.py b/v2realbot/ENTRY_backtest_strategyVykladaci.py index 037f0f5..6fa22e0 100644 --- a/v2realbot/ENTRY_backtest_strategyVykladaci.py +++ b/v2realbot/ENTRY_backtest_strategyVykladaci.py @@ -293,6 +293,13 @@ def next(data, state: StrategyState): limitka_filled_qty = 0 for o in orderlist: if o.side == OrderSide.SELL: + + if limitka_found: + state.ilog(e="nalezeno vicero sell objednavek, bereme prvni, ostatni - rusime") + result=state.interface.cancel(o.id) + state.ilog(e="zrusena objednavka"+str(o.id), message=result) + continue + #print("Nalezena LIMITKA") limitka_found = True state.vars.limitka = o.id