Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
anashoussaini opened this issue Jun 24, 2024 · 0 comments

Comments

@anashoussaini
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant