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

why the price is based on 'Low' but not 'Close' #77

Closed williamlifaith closed 1 year ago

williamlifaith commented 1 year ago

Hello, in this line :prices = env.df.loc[:, 'Low'].to_numpy()[start:end]

I think we need replace 'Low' with 'Close',that will be better,may I know the reason why you use 'Low' here ?

AminHP commented 1 year ago

Hi @williamlifaith,

It is based on close price: https://github.com/AminHP/gym-anytrading/blob/master/gym_anytrading/envs/stocks_env.py#L19 https://github.com/AminHP/gym-anytrading/blob/master/gym_anytrading/envs/forex_env.py#L20