INNER CODE UNIT · Python

size_official

5ymph0en1x/SyDOM · sydom.py:545

                        size_official = (abs(current_size) + pos_size) * -1
                    else:
                        size_official = (abs(current_size)) * -1
                else:
                    size_official = pos_size * -1
            except Exception as e:
                size_official = pos_size * -1
                pass
        if paper_trading is False:
            sl_ord_number = launch_order(instr_bmex, definition='limit', direction='sell', size=size_official, price=matrix_bmex_ticker[1])
        if paper_trading is True:
            launch_paper_order(instr_bmex, direction='short', size=size_official, price=matrix_bmex_ticker[1])
            order = 1
        counter = 0
        if paper_trading is False:
            try:
                while ws_bmex.open_orders_raw(instr_bmex) == [] or ws_bmex.open_orders_raw(instr_bmex)[len(ws_bmex.open_orders_raw(instr_bmex)) - 1]['ordStatus'] != "New":
                    sleep(0.1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…