import MetaTrader5 as mt5
# MetaTrader 5 paketi ile ilgili verileri görüntüle
print("MetaTrader5 package author: ",mt5.__author__)
print("MetaTrader5 package version: ",mt5.__version__)
# MetaTrader 5 terminaline bağlantı kur
if not mt5.initialize():
print("initialize() failed, error code =",mt5.last_error())
quit()
# aktif emirlerin varlığını kontrol et
orders=mt5.orders_total()
if orders>0:
print("Total orders=",orders)
else:
print("Orders not found")
# MetaTrader 5 terminaline olan bağlantıyı kapat
mt5.shutdown()
|