peerchemist / finta

Common financial technical indicators implemented in Pandas.
GNU Lesser General Public License v3.0
2.13k stars 688 forks source link

Candle and Response Order #122

Open b490001 opened 3 years ago

b490001 commented 3 years ago

This is probably a dumb question but I've been spinning circles on it, and I'm sure i'm not the only one, maybe it should go in the readme or something.

When I send candle data to a finta function, what is the order of the candles? First -> Last, or Last -> First? Is the first index in the list the beginning date or the end date?

And likewise, when the function/indicator returns, what is the order of the return list? The list is returned with nan's at the front, is the first index (probably a nan) the the furthest back (oldest) indicator reading, or the first? When I get an indicator result back, what's the latest result? (not the one from 180 minutes ago).

I can't figure out if I'm sending my candles backwards to this thing, or if I'm reading the response backwards, and I can't find anything on google / TA-lib docs aren't any help here either, everyone just expects you already know these things.

It becomes especially fun because it seems kucoin sends candles back in first->last order on spot but last->first order on futures. I'm just trying to get a unified "this is how the candles should be ordered" "this is how the responses should be ordered" system going here.