jesse-ai / jesse

An advanced crypto trading bot written in Python
https://jesse.trade
MIT License
5.73k stars 733 forks source link

added a friendly version of the candles list #438

Closed kakulukia closed 7 months ago

kakulukia commented 7 months ago
image

If you also like it as much as i do, i will also build a test case and add a description for the docs.

kakulukia commented 7 months ago

The name is also up for discussion. Probably nice_candles is much easier to type. But i certainly did not want to replace candles as this is only meant for some manual comparison rather than feeding it to indicators.

saleh-mir commented 7 months ago

Thank you for the pull request. But I don't think this should be in the main API because we already have properties such as self.close, self.open, self.low, self.high for the current candle. And I think that those are enough shortcuts. And if someone needs more than that, they should be okay with the default syntax for Python lists and NumPy arrays. Because they are everywhere.

kakulukia commented 7 months ago

I know about all the shortcuts. But yes, my picture doing a bad job for getting the original idea across as i have been using [-1]. The shortcuts work for this candle of course. But they aint working for for [-2] and so on.

saleh-mir commented 7 months ago

I read your code and I understand your point but I don't want to change numpy arrays a lot because they are very performant and I don't want to have a shortcut for every little thing and I'm also having an eye for future performance boost optimizations and the more classes we have the harder that's going to be but numpy arrays are already super optimized

yakir4123 commented 7 months ago

another important thing is that ta packages prefer use np arrays and not classes

kakulukia commented 7 months ago

I know. That's why I did not change candles but added an additional property.