question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Elder's market thermometer calculation

See original GitHub issue

First 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: q

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:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Jacks349commented, Apr 23, 2021

Hello @Jacks349,

Hmm… that’s weird. Thanks for providing details and source.

Also if you have not come across it already, here is some discussion about the creation of thermo in Issue #119.

When I test TV indicators, I export from them to do correlation testing. If you could do that when you get a chance and print a correlation result, that would be great.

If you have a TradingView account, add LazyBear’s Thermo indicator to a new basic chart. Just use ticker SPY and Daily timeframe. So the new chart should mostly be: the Candles, Volume and Volume MA, and LazyBear’s Thermo Plots. Zoom out as far as you can and then you should read Issue #107 on how to export data from TradingView and do correlation testing. That will give you a good sample to compare visually. Anywhere between 500 and 1000 rows is good. Plot the data on the last 100 or so bars to see how it looks and 300-400 bars for a bigger picture to make sure it looks consistent on a large perspective. You can test Crypto later once you are certain it looks about right or its nearly 99% correlated.

At this time, I currently do not have an expected time on when I can take on this Issue. But I’ll keep you posted.

Kind Regards, KJ

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

0reactions
twopirllccommented, May 19, 2021

@Jacks349,

Sorry for the late answer! I did not manage to do the test due to a lack of time, but i plan to do it. You can close the issue for now, at worst i’ll reopen it and post my results!

No worries. Thanks for getting back to me. I’ll close for now and you can reopen when ready.

KJ

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elders Thermometer - MotiveWave
The THER is the highest absolute difference of either, the previous low minus current low or, the current high minus previous high. The...
Read more >
Elder's Market Thermometer - StockFetcher.com Stock Screener
Calculate a moving average of market temperature, and plot it as a line on the same chart. I use a 22-day EMA because...
Read more >
Volatility Indicator Elders' Market Thermometer MTF TT
Using the Elders' Market Thermometer MTF TT indicator, you can estimate the “temperature” of the market, that is, find the key points near...
Read more >
Elder's Market Thermometer - MQL5 programming forum
Hello All, I'm trying to program Elder's Market Thermometer and have the basic calculations and drawing correct to measure "temperature.
Read more >
Elder's Market Thermometer [LazyBear] - TradingView
Market temperature, introduced by Dr . Alexander Elder, helps differentiate between sleepy, quiet and hot market periods.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found