What are the rules of TP/SL in this code? ========= ---------- TP/SL правила…
- User
What are the rules of TP/SL in this code?
=========
---------- TP/SL правила -------------
if idx == 3 and tp_price and sl_price: # ATR‑основанный TP/SL order_params.update({ 'tpTriggerPx': str(round_price(tp_price, tick)), 'tpOrdPx': '-1', 'tpTriggerPxType': 'last', 'slTriggerPx': str(round_price(sl_price, tick)), 'slOrdPx': '-1', 'slTriggerPxType': 'last', }) elif idx < 1: tp_chunk = round_price(limit_px * 0.67, tick) sl_chunk = round_price(limit_px * 1.9, tick) order_params.update({ 'tpTriggerPx': str(tp_chunk), 'tpOrdPx': '-1', 'tpTriggerPxType': 'last', 'slTriggerPx': str(sl_chunk), 'slOrdPx': '-1', 'slTriggerPxType': 'last', }) else: tp_chunk = round_price(limit_px * 0.50, tick) order_params.update({ 'tpTriggerPx': str(tp_chunk), 'tpOrdPx': '-1', 'tpTriggerPxType': 'last', # SL отсутствует }) # --------------------------------------
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.