Post
Topic
Board Speculation
Re: I see a dump approaching, do you?
by
dragonvslinux
on 31/01/2020, 20:58:27 UTC
based on a plethora of different indicators (ex: MACD, Ihimoku, Hash)

How is that miner capitulation apocalypse going on?  Grin

It's went incredibly well thanks for asking! Unsurprisingly given that it was based on relatively simple tried & tested mathematics  Wink Gotta love those 1s and 0s  Cheesy

$7245, December 27th 2019 (10)



Quote from: capriole_charles
Buying during Miner Capitulation yields wonderful returns.

In case you weren't aware, the miner capitulation (translation: drop in hash rate) ended (quite swiftly infact) and the Hash Ribbons indicator signaled an incredibly reliable buy signal. Sorry if you weren't aware of the data science playing out, better luck next time, maybe. Then again, if everyone in the space understood these data science models, in-depth statistical analysis, as well as source code, then there wouldn't be any money to be made  Tongue

I appreciate you and others skepticism however, if it weren't for this I wouldn't of been so convinced by the probability and the source code's mathematics, but spent the time to study it enough to now be sitting in a nice leveraged position, 28% up so far (not including high leverage), but I'll obviously wait for thousand % returns before cashing out  Tongue


I hope others were able to benefit from the signal, given the 90% probability it would be accurate, which so far unless it breaks below around $6,200 looks pretty solid, which would then be questionable whether the post buy signal correction is deeper than the max draw-down, or whether the source code needs improving due to lack of accuracy. But then again, mathematics that has been reliable for 9 years sounds a lot like a familiar asset that I own, so no need to doubt that the value of 1 or 0 will change in the near future  Wink

For now though, all good, thanks for asking! I waited nearly a year to get a nice highly leveraged position to ride out for the next cycle. If it weren't for that indicator, I wouldn't be in one.

I can hardly find a worse indicator other than the number of horses that have taken a dump on the track at Kempton.



No, it was not what math calculated, don't bring math into this.

Code: (Hash Ribbons indicator)
//@version=4
study("Hash Ribbons",overlay= false)

// NOTES

// The "Spring" is the confirmed Miner capitulation period:
// - The 1st "gray" circle is the start of Capitulation (1 month Hash Rate crosses UNDER 2 month Hash Rate)
// - Last "green" circle is the end of Capitulation (1 month Hash Rate crosses OVER 2 month Hash Rate)
// - The "greener" the spring gets (up until blue) represents Hash Rate recovery (it is increasing)
// - The "blue" circle is the first instance of positive momentum following recovery of Hash Rate (1m HR > 2m HR). This is historically a rewarding place to buy with limited downside.

// INPUTS

type = input('Ribbons',options=['Ribbons','Oscillator'],title="Plot Type")
len_s = input(30,"Hash Rate Short SMA (days).")
len_l = input(60,"Hash Rate Long SMA (days).")
signals = input(true, "Plot Signals")
plot_halvings = input(true,"Plot Halvings")
raw = input(false, "Plot Raw Hash Rate")

// HASH RATE MA

// HR on TV only has "yesterday's" value --> use "lookahead_on" when running live (on current bar), to pull forward yesterdays data
live_HR_raw = security("QUANDL:BCHAIN/HRATE", "D", close,gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)
live_HR_short = security("QUANDL:BCHAIN/HRATE", "D", sma(close,len_s),gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)
live_HR_long = security("QUANDL:BCHAIN/HRATE", "D", sma(close,len_l),gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_on)

hist_HR_raw = security("QUANDL:BCHAIN/HRATE", "D", close,gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
hist_HR_short = security("QUANDL:BCHAIN/HRATE", "D", sma(close,len_s),gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
hist_HR_long = security("QUANDL:BCHAIN/HRATE", "D", sma(close,len_l),gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)

daily_s10 = security(syminfo.tickerid, "D", sma(close,10),gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
daily_s20 = security(syminfo.tickerid, "D", sma(close,20),gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)


// DAILY TIMEFRAME MGMT

is_newbar(res) =>
    t = time(res) // res calculated below \/
    change(t) != 0 ? true : false

// Check how many bars are in our upper (otf) timeframe
since_new_bar = barssince(is_newbar("D")) //1-360 for minutes, D = Daily, W = Weekly, M = Monthly
D_total_bars = int(na)
D_total_bars := since_new_bar == 0 ? since_new_bar[1] : D_total_bars[1] // calculates the total number of current time frame bars in the OTF

// INDICATORS

HR_short = float(na)
HR_long = float(na)
HR_raw = float(na)
s10 = float(na)
s20 = float(na)

HR_short := barstate.isrealtime ? live_HR_short : hist_HR_short
HR_long := barstate.isrealtime ? live_HR_long : hist_HR_long
HR_raw := barstate.isrealtime ? live_HR_raw : hist_HR_raw

s10 := barstate.isrealtime ? (since_new_bar == D_total_bars ? daily_s10 : s10[1]) : daily_s10
s20 := barstate.isrealtime ? (since_new_bar == D_total_bars ? daily_s20 : s20[1]) : daily_s20

capitulation = crossunder(HR_short,HR_long)
miner_capitulation = HR_shortrecovering = HR_short > HR_short[1] and HR_short > HR_short[2] and HR_short > HR_short[3] and miner_capitulation
recovered = crossover(HR_short,HR_long)

// HASH BOTTOM + PA SIGNAL

buy = false
buy := s10>s20
     and (
     (barssince(recovered) < barssince(crossunder(s10,s20)) and barssince(recovered) < barssince(capitulation))
     or crossover(HR_short,HR_long)
     )
    
buy_plot = buy and (buy[1] == false)

// OSCILLATOR

delta = HR_short-HR_long
diff = (delta/HR_short)*100

// PLOT - DEFAULT

plot(raw ? HR_raw : na, color = color.green, linewidth = 1, style = plot.style_line, title='HR Raw')
p1=plot(type=='Ribbons'? HR_long : na, color = color.gray, linewidth = 2, style = plot.style_line,title='HR SMA Long')
p2=plot(type=='Ribbons'? HR_short : na, color = (HR_shortfill(p1,p2,color=(HR_short
// PLOT - OSCILLATOR

plot(type=='Oscillator' ? diff : na,style=plot.style_columns,color=(diff<0?color.red:color.blue),title='Oscillator')

// PLOT - SIGNALS

plotshape(signals ? capitulation :na,style=shape.circle,location=location.top,color=color.gray,size=size.normal,transp=50,text='Capitulation',textcolor=color.black,title='Capitulation')
plotshape(signals ? miner_capitulation : na,style=shape.circle,location=location.top,color=color.green,size=size.normal,transp=90,title='Miner Capitulation')
plotshape(signals ? recovering : na,style=shape.circle,location=location.top,color=color.green,size=size.normal,transp=50,title='Recovering')
plotshape(signals ? recovered : na,style=shape.circle,location=location.top,color=color.lime,size=size.normal,transp=0,textcolor=color.white,title='Recovered')
plotshape(signals ? buy_plot: na,style=shape.circle,location=location.top,color=color.blue,size=size.normal,transp=0,text="Buy",textcolor=color.blue,title='Buy')

// HALVINGS

halving_1 = timestamp(2012,11,28,0,0)
halving_2 = timestamp(2016,7,9,0,0)
halving_3 = timestamp(2020,4,30,0,0) // projected! https://www.bitcoinclock.com/
h1_range = time >= halving_1 - 3*(24*60*60*1000) and time <= halving_1 + 3*(24*60*60*1000) //adds 3 day either side for chart visibility
h2_range = time >= halving_2 - 3*(24*60*60*1000) and time <= halving_2 + 3*(24*60*60*1000) //adds 3 day either side for chart visibility
h3_range = time >= halving_3 - 3*(24*60*60*1000) and time <= halving_3 + 3*(24*60*60*1000) //adds 3 day either side for chart visibility
bgcolor(h1_range and plot_halvings? color.red : na, transp = 20)
bgcolor(h2_range and plot_halvings? color.red : na, transp = 20)
bgcolor(h3_range and plot_halvings? color.red : na, transp = 20)

//ALERTS

alertcondition(capitulation, title='Alert - Capitulation')
alertcondition(recovered, title='Alert - Recovered')
alertcondition(buy and not(buy[1]), title='Alert - Buy')

Reference: https://www.tradingview.com/script/kT7jIvqv-Hash-Ribbons/