Elder's market thermometer calculation
See original GitHub issueFirst of all, thanks for the work on this library! I have a stupid question about the Elder’s Market Thermometer indicator. I’ve been using the indicator from both Tradingview (using lazybear’s version) and from Python using pandas_ta. I noticed the values are different between the two versions, is it a bug or is it a difference in the calculation?
Here is an example with BTCUSDT 4h (Binance):
Tradingview:
And here is what i tried from my code:
thermo = df.ta.thermo(length=22, long=3, short=7)
>>print(thermo
THERMO_22_3.0_7.0 THERMOma_22_3.0_7.0
...
2021-04-18 00:00:00 9038.68 1415.982374
2021-04-18 04:00:00 3971.96 1638.241298
2021-04-18 08:00:00 860.10 1570.576837
2021-04-18 12:00:00 723.77 1496.941460
2021-04-18 16:00:00 1659.75 1511.098724
2021-04-18 20:00:00 720.62 1442.361444
2021-04-19 00:00:00 602.72 1369.349144
2021-04-19 04:00:00 720.06 1312.889219
2021-04-19 08:00:00 290.65 1223.998852
2021-04-19 12:00:00 1898.45 1282.646778
2021-04-19 16:00:00 1042.20 1261.738362
2021-04-19 20:00:00 1165.78 1253.394157
2021-04-20 00:00:00 1280.41 1255.743361
2021-04-20 04:00:00 907.08 1225.424808
2021-04-20 08:00:00 932.82 1199.980911
2021-04-20 12:00:00 419.20 1132.086919
2021-04-20 16:00:00 450.05 1072.779361
2021-04-20 20:00:00 990.37 1065.613329
2021-04-21 00:00:00 919.39 1052.898257
2021-04-21 04:00:00 935.14 1042.658409
2021-04-21 08:00:00 691.84 1012.152460
2021-04-21 12:00:00 596.70 976.026159
2021-04-21 16:00:00 829.00 963.241276
2021-04-21 20:00:00 1592.98 1018.001165
2021-04-22 00:00:00 975.02 1014.263672
2021-04-22 04:00:00 889.00 1003.371179
2021-04-22 08:00:00 373.00 948.556294
2021-04-22 12:00:00 1311.56 980.121834
I’m getting the OHLC data from here: https://api.binance.com/api/v1/klines?&symbol=BTCUSDT&interval=4h&limit=1200
Here, for example, the last candle will have a value of 1311 from Python, while according to Lazybear’s version is around 300, the same happens with other candles. Now, am i missing something and this is indeed a stupid question or is the calculation just different? Thanks in advance!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I’m going to try to do correlation testing, once i know how to do it properly, thank you! I’m trying to understand how does Lazybear calculates it
@Jacks349,
No worries. Thanks for getting back to me. I’ll close for now and you can reopen when ready.
KJ