ejtraderLabs / ejtraderMT

Metatrader 5 API - Trading and history OHLC Dataframe in Nano Seconds
GNU General Public License v3.0
70 stars 28 forks source link

How get clean data and how get last candle? #12

Closed DiMiTriFrog closed 3 months ago

DiMiTriFrog commented 7 months ago

After long work, i compiled on windows VPS and now is working but i'm some questions.

Could I receive clean data without loading bar ? I mean.. when i'm getting the candles avoid to print the loading bar.

Screenshot 2023-11-20 at 00 26 15

How could get only the last candle? I tried to:

    symbol = "EURUSD"
    timeframe = "M15"
    fromDate =  2

    history = api.history(symbol,timeframe,fromDate)

[] But getting :

Screenshot 2023-11-20 at 00 30 11

And any alternative to mt5.symbol_info(symbol) ???

traderpedroso commented 7 months ago

the last row is the atual price -

last_row = history.iloc[-1]
print(last_row)