INNER CODE UNIT · Python

size_official

5ymph0en1x/SyDOM · sydom.py:368

                        size_official = abs(current_size) + pos_size
                    else:
                        size_official = abs(current_size)
                else:
                    size_official = pos_size
            except Exception as e:
                size_official = pos_size
                pass
        if paper_trading is False:
            sl_ord_number = launch_order(instr_bmex, definition='limit', direction='buy', size=size_official, price=matrix_bmex_ticker[2])
        if paper_trading is True:
            launch_paper_order(instr_bmex, direction='long', size=size_official, price=matrix_bmex_ticker[2])
            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…