gym-anytrading icon indicating copy to clipboard operation
gym-anytrading copied to clipboard

TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got slice)

Open anashoussaini opened this issue 7 months ago • 0 comments

I run the basic example given in the ReadMe and it gives me TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got slice)

Import pytz from datetime import datetime, timedelta from gym_mtsim import MtSimulator, OrderType, Timeframe, FOREX_DATA_PATH

sim = MtSimulator( unit='USD', balance=10000., leverage=100., stop_out_level=0.2, hedge=False, )

if not sim.load_symbols(FOREX_DATA_PATH): sim.download_data( symbols=['EURUSD', 'GBPCAD', 'GBPUSD', 'USDCAD', 'USDCHF', 'GBPJPY', 'USDJPY'], time_range=( datetime(2021, 5, 5, tzinfo=pytz.UTC), datetime(2021, 9, 5, tzinfo=pytz.UTC) ), timeframe=Timeframe.D1 ) sim.save_symbols(FOREX_DATA_PATH)

anashoussaini avatar Jun 24 '24 05:06 anashoussaini