positions_total

Açık pozisyonların sayısını elde eder.

positions_total()

Geri dönüş değeri

Tam sayı değeri.

Not

Fonksiyon, PositionsTotal'a benzerdir.

Örnek:

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()
 
# açık pozisyonların varlığını kontrol et
positions_total=mt5.positions_total()
if positions_total>0:
    print("Total positions=",positions_total)
else:
    print("Positions not found")
 
# MetaTrader 5 terminaline olan bağlantıyı kapat
mt5.shutdown()

Ayrıca bakınız

positions_get, orders_total