TradingView
SimpleCryptoLife
16 сен 2020 г., 15:13

[SCL] Bitcoin Hashrate Dips (Miner Capitulation) 

Bitcoin Liquid IndexBrave New Coin

Описание

Gives long-term buy signals for Bitcoin from dips and recoveries in the hashrate (the "miner capitulation" theory). It has an overlay and a standalone mode and is fully configurable. It uses Williams Lows and ATR instead of moving averages.

Features that might be interesting for Pinescripters:
+ Automatic (as far as is possible currently) adjustment of plots for overlay and standalone display modes.
+ A neat label function for debugging floats
+ Fully commented
+ The debug that I used to overcome problems in developing it is left in
+ Ideas for how to deal with a wildly oscillating and exponentially increasing data source

You need to run this indicator on the Bitcoin daily chart for it to make any sense. The best is a BTC/USD chart with a long history, such as BNC:BLX.
Комментарии
nardine
Hi, Is your indicator still active ?
SimpleCryptoLife
@nardine, Good question. It looks as though TradingView have discontinued the data feeds, although I didn't see any notice of that. If you type QUANDL into the asset box, nothing comes up. So this indicator, and any others that use that data, will no longer work. I'm afraid any followup questions would have to go to TradingView support.
nardine
@SimpleCryptoLife, Thanks for answering. This was really a good one, too bad.
lhwasd18
Hi, im trying pinescript for the first time and i have no idea of how to turn your code into the top chart, could you help?
SimpleCryptoLife
@lhwasd18, Hi. You need to make a copy of this script in order to change it. So, favourite it, add it to your chart, right click and edit source, and make a copy. Use the TradingView help for working with Pinescripts in general.
To display it over the main chart, in your copy, edit this line at the very start of the script:
study("SCL Miner Capitulation (Hashrate Dips)",overlay=false)
Set it to true instead, and set the value of inputIsOverlay to true in Settings.
Note: if you change the overlay value, you need to remove and re-add the chart for TradingView to pick up the change properly.
lhwasd18
@SimpleCryptoLife, Thx for trying to explaining, or at least trying lol. I'm probably just dumb and still can't figure it out. I read all you had commented in the script itself but somehow I can't make a chart which looks like the one on top (even changing the overlay to true in the study function and inputIsOverlay to true in settings + removing & re-adding). I've decided to learn pine because of your indicators, python just wasn't cutting it. Btw, the chart on top should have the reversion toward the mean behaviour right? That's what I was trying to achieve
SimpleCryptoLife
@lhwasd18, If you get it to show anything at all in overlay mode it's probably working as it should. There is no reversion to the mean. The overlay version has less information plotted. It just shows the alerts when a signal happens. If you're really new to Pine, maybe I should mention right-click on the indicator to bring up the settings. There you can turn some things on or off.
Congratulations on your decision to learn Pine. If a non-programmer like me can do it, I'm sure it will be easy for you. Best of luck.
Ещё