LastBattle

[Bitcoin] Lastbattle's nose picker

I've been working on a top and bottom picker script over the past couple of weeks, based on RSI of multiple timeframe closing price. It've been a pretty good trading system that's tested over the last meteoric rise from 220~270 and back down to 230 right now, and I think it should be released to the community.
Sure, I'm not worried about this strategy not working anymore after it is being used by the majority. Everyone have a different view of the market, and this is more towards psychology. It'll likely to hold for as long as there are still humans trading Bitcoins. Bitcoin market is full of emotions, you'll never run out of it.

So why does it work?
If you take a look at the live charts offered by Bitcoinwisdom and Cryptowatch, they only offer 1, 3, 5, and 15 minute timeframe by default with no other option to switch.
Naturally more traders will look at these levels for oversold and overbought condition.
The same indicator does not work for the broader commodities market such as Gold and Silver.

How does it work?
As long as the RSI levels of 1, 3, 5, and 15 minute fulfills the oversold/overbought level, a signal will be given.
The overbought/oversold level gets compensated the higher volatility the market is in.

Note: **
-This is only for exit strategy. If you're on long, consider reducing or exiting your position when it displays a red. On the other hand if you're short, consider reducing or covering your shorts if it shows a green.
-It may give false signal in a trending market, use your trading experience and judgement to filter them out. (eg: uptrend usually have more than 1 legs AND after a long consolidation, RSI gets to oversold/overbought easily... the market will tend to test the support/resistance again.)
-This is tuned for the 15m interval, the script won't work beyond this. I use it for scalping futures. Feel free to change or remove this line 'plot(interval == 15 and '
-Even if it shows a signal, it may not be the true top/bottom. Sometimes there may be a weak diverged leg aka 'last fart', so that's one reason I dont use this for entry until more confirmation is given via other indicators.

** If your chart is zooming all the way down to 0, right click on the price at the right and select 'Scale price only'

Go ahead and try this out with willy, etc and see what works better :D

Credits:
-LazyBear for the volatility switcher script

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
study(title = "lastbattles nose picker", shorttitle="lastbattles nose picker",overlay=true)

// Inputs
rsiPeriod = input(14, title="RSI period")
//atrPeriod = input(20, title="ATR period")
overbought = input(67, title="Overbought Signal", minval=1, maxval=100)
oversold = input(35, title="Oversold Signal", minval=1, maxval=100)
volatilitymultiplier = input(1, title="Volatility multiplier", minval=0, maxval=5)

//atrTimeframe = input(defval="7", title="ATR Timeframe", type=resolution)
rsiTimeframe1 = input(defval="1", title="RSI Timeframe 1", type=resolution)
rsiTimeframe2 = input(defval="3", title="RSI Timeframe 2", type=resolution)
rsiTimeframe3 = input(defval="5", title="RSI Timeframe 3", type=resolution)
rsiTimeframe4 = input(defval="15", title="RSI Timeframe 4", type=resolution)
rsiTimeframe5 = input(defval="1", title="RSI Timeframe 5", type=resolution)
rsiTimeframe6 = input(defval="1", title="RSI Timeframe 6", type=resolution)

// Functions
isSellSignal(rsi1, rsi2, rsi3, rsi4, rsi5, rsi6, overbought) => (rsi1 >= overbought and rsi2 >= overbought and rsi3 >= overbought and rsi4 >= overbought and rsi5 >= overbought and rsi6 >= overbought)
isBuySignal(rsi1, rsi2, rsi3, rsi4, rsi5, rsi6, oversold) => (rsi1 <= oversold and rsi2 <= oversold and rsi3 <= oversold and rsi4 <= oversold and rsi5 <= oversold  and rsi6 <= oversold)

// RSI values
rsi1 = security(tickerid,rsiTimeframe1, rsi(close, rsiPeriod))
rsi2 = security(tickerid,rsiTimeframe2, rsi(close, rsiPeriod))
rsi3 = security(tickerid,rsiTimeframe3, rsi(close, rsiPeriod))
rsi4 = security(tickerid,rsiTimeframe4, rsi(close, rsiPeriod))
rsi5 = security(tickerid,rsiTimeframe5, rsi(close, rsiPeriod))
rsi6 = security(tickerid,rsiTimeframe6, rsi(close, rsiPeriod))

// ATR values in percentage wise
//atr = security(tickerid,atrTimeframe, ema(tr*100/close[1], atrPeriod))
//atr_percentagePrice = close[1] * 0.01 * atr
//multiplier_atr = abs(1 / (2 - atr_percentagePrice)) // absolute value of multiplier

// volatility switch
dr= security(tickerid,"60", roc(close,1)) / security(tickerid,"60", sma(close,2))
vola14=stdev(dr, 14)
vswitch14=((vola14[1] <= vola14 ) + (vola14[2] <= vola14 ) +   (vola14[3] <= vola14 ) +   
		(vola14[4] <= vola14 ) +  (vola14[5] <= vola14 ) + (vola14[6] <= vola14 ) +   
		(vola14[7] <= vola14 ) +  (vola14[8] <= vola14 ) +  (vola14[9] <= vola14 ) +  
		(vola14[10] <= vola14 ) + (vola14[11] <= vola14 ) +  (vola14[12] <= vola14 ) +  
		(vola14[13] <= vola14 ) + 1) / 14 
volatility_multiplier =  abs(1 / (volatilitymultiplier - vswitch14))

//plot(multiplier_atr + close, style=line,  linewidth=2, color=#FF0000)
//plot(atr_percentagePrice, style=line,  linewidth=2, color=#FF0000)
//plot(rsi1, style=line,  linewidth=2, color=#FF0000)
//plot(rsi2, style=line,  linewidth=2, color=#FF8000)
//plot(rsi3, style=line,  linewidth=2, color=#FFFF00)
//plot(rsi4, style=line,  linewidth=2, color=#80FF00)
//plot(rsi5, style=line,  linewidth=2, color=#00FFFF)
//plot(volatility_multiplier * 2 + close, color=red, linewidth=2, title="VOLSWITCH_21")

sellsignal = isSellSignal(rsi1, rsi2, rsi3, rsi4, rsi5, rsi6, overbought + volatility_multiplier)
buysignal = isBuySignal(rsi1, rsi2, rsi3, rsi4, rsi5, rsi6, oversold - (volatility_multiplier / 2))
spartasellsignal = isSellSignal(rsi1, rsi2, rsi3, rsi4, rsi5, rsi6, 80)
spartabuysignal = isBuySignal(rsi1, rsi2, rsi3, rsi4, rsi5, rsi6, 20)

// regular signals
plot(interval == 15 and sellsignal ? close : na, title="caution sell", color=red, style=columns, transp=50 , linewidth=7)
plot(interval == 15 and buysignal ? close : na, title="caution buy", color=green, style=columns, transp=50, linewidth=7)

// super signals! spartaaa
plot(interval == 15 and spartasellsignal ? close : na, title="super caution sell", color=red, style=columns, transp=0 , linewidth=7)
plot(interval == 15 and spartabuysignal ? close : na, title="super caution buy", color=green, style=columns, transp=0, linewidth=7)

//plotchar(isSellSignal(rsi1, rsi2, rsi3, rsi4, rsi5, overbought), char='S')
//plotchar(isBuySignal(rsi1, rsi2, rsi3, rsi4, rsi5, oversold), char='B')

//h1 = hline(0)
//h2 = hline(100)
//fill(h1, h2)