AminHP / gym-anytrading

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

how to use multi time-frame to create custom environment #89

Closed Masoud1365 closed 11 months ago

Masoud1365 commented 1 year ago

hi Amin can we use multi time frame to create custom environment ? for example, I want to use daily, 4h, 1h time frames for my environment

AminHP commented 1 year ago

Hi @Masoud1365

Yes, it is possible. In order to do so, you need a Dict observation space (here) with three elements for the daily, 4h, and 1h time frames. You also need to override TradingEnv._get_observation (here) to return a dictionary of numpy arrays as observation.