AminHP / gym-anytrading

The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)
MIT License
2.1k stars 465 forks source link

add env.close #15

Closed bionicles closed 4 years ago

bionicles commented 4 years ago

when you run many envs, you have to have a way to close the render windows. env.close() is the standard way to do this in openai gym, so this pull request just adds a simple env.close method to the TradingEnv class, which closes the pyplot window. then you can play atari games and trade stocks in a loop with rendering, and not clutter your screen with too many windows!

AminHP commented 4 years ago

Yes, you are right. I forgot to add a close method. Thank you for your contribution, especially keeping my coding style with that extra line :D