
If you’ve been building your own Python trading bot using MetaTrader 5 as your interface, you’ll know that there are times when you need to get all your open orders.
If you need to implement this function, here’s how.
Use this code:
# Function to retrieve all open orders from MT5
def get_open_orders():
orders = MetaTrader5.orders_get()
order_array = []
for order in orders:
order_array.append(order[0])
return order_arrayEnjoy, and don't forget to subscribe for more amazing content

If you’ve been building your own Python trading bot using MetaTrader 5 as your interface, you’ll know that there are times when you need to get all your open orders.
If you need to implement this function, here’s how.
Use this code:
# Function to retrieve all open orders from MT5
def get_open_orders():
orders = MetaTrader5.orders_get()
order_array = []
for order in orders:
order_array.append(order[0])
return order_arrayEnjoy, and don't forget to subscribe for more amazing content
Can the combination of crypto, AI, and Cyber really, truly, change the world? Follow me as I explore the possibilities!
Can the combination of crypto, AI, and Cyber really, truly, change the world? Follow me as I explore the possibilities!

Subscribe to The Crypto - AI - Cyber Disruption Continuum

Subscribe to The Crypto - AI - Cyber Disruption Continuum
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
No activity yet