Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © bilgindurmaz
- //@version=4
- study("MULTIRSI+2022 By BD", shorttitle="MR+22",resolution="")
- RSI1L = input(true , "RSI1" , inline="RSI1")
- RSI1_period = input(14 , "" , inline="RSI1", minval=1)
- RSI1_source = input(close , "" , inline="RSI1")
- RSI1_color = input(#363A45 , "" , inline="RSI1")
- RSI1 = rsi(RSI1_source, RSI1_period)
- plot(RSI1L and RSI1? RSI1 : na, color=#363A45, linewidth=1, title= "RSI1")
- RSI1MAVW = input(true , "RSI1MAVW" ,inline="RSI1MAVW")
- fmal =input(0 , "" ,inline="RSI1MAVW")
- smal =input(1 , "" ,inline="RSI1MAVW")
- tmal=fmal+smal
- Fmal=smal+tmal
- Ftmal=tmal+Fmal
- Smal=Fmal+Ftmal
- M1= RSI1
- M2= wma(M1, smal)
- M3= wma(M2, tmal)
- M4= wma(M3, Fmal)
- M5= wma(M4, Ftmal)
- R1MAVW= wma(M5, Smal)
- col1= R1MAVW>R1MAVW[1]
- col2= R1MAVW<R1MAVW[1]
- color = col1 ? #4CAF50 : col2 ? #FF5252 : #FFEB3B
- plot(RSI1MAVW and R1MAVW ? R1MAVW : na, color=color, linewidth=1, title="R1MAVW")
- ma(RSI1, length, type) =>
- type == "SMA" ? sma(RSI1, length) :
- type == "EMA" ? ema(RSI1, length) :
- type == "SMMA (RMA)" ? rma(RSI1, length) :
- type == "WMA" ? wma(RSI1, length) :
- type == "VWMA" ? vwma(RSI1, length) :
- na
- show_ma1 = input(true , "RSI1 MA1" , inline="MA #1")
- ma1_type = input("SMA" , "" , inline="MA #1", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"])
- ma1_length = input(20 , "" , inline="MA #1", minval=1)
- ma1_color = input(#FF9800, "" , inline="MA #1")
- ma1 = ma(RSI1, ma1_length, ma1_type)
- plot(show_ma1 ? ma1 : na, color = ma1_color, title="MA №1")
- show_ma2 = input(false , "RSI1 MA2" , inline="MA #2")
- ma2_type = input("SMA" , "" , inline="MA #2", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"])
- ma2_length = input(30 , "" , inline="MA #2", minval=1)
- ma2_color = input(#FF5252, "" , inline="MA #2")
- ma2 = ma(RSI1, ma2_length, ma2_type)
- plot(show_ma2 ? ma2 : na, color = ma2_color, title="MA №2")
- /////////
- RSI2L = input(false , "RSI2" , inline="RSI2")
- RSI2_period = input(9 , "" , inline="RSI2", minval=1)
- RSI2_source = input(close , "" , inline="RSI2")
- RSI2_color = input(#787B86 , "" , inline="RSI2")
- RSI2 = rsi(RSI2_source, RSI2_period)
- plot(RSI2L and RSI2? RSI2 : na, color=#787B86, linewidth=1, title= "RSI2")
- RSI2MAVW = input(false , "RSI2MAVW" ,inline="RSI2MAVW")
- a1 = input(0 , "" ,inline="RSI2MAVW")
- a2 = input(1 , "" ,inline="RSI2MAVW")
- a3=a1+a2
- a4=a2+a3
- a5=a3+a4
- a6=a4+a5
- M21= RSI2
- M22= wma(M21, a2)
- M23= wma(M22, a3)
- M24= wma(M23, a4)
- M25= wma(M24, a5)
- R2MAVW= wma(M25, a6)
- col21= R2MAVW>R2MAVW[1]
- col22= R2MAVW<R2MAVW[1]
- color22 = col21 ? #4CAF50 : col22 ? #FF5252 : #FFEB3B
- plot(RSI2MAVW and R2MAVW ? R2MAVW : na, color=color22, linewidth=1, title="R2MAVW")
- mar(RSI2, length2, type2) =>
- type2 == "SMA" ? sma(RSI2, length2) :
- type2 == "EMA" ? ema(RSI2, length2) :
- type2 == "SMMA (RMA)" ? rma(RSI2, length2) :
- type2 == "WMA" ? wma(RSI2, length2) :
- type2 == "VWMA" ? vwma(RSI2, length2) :
- na
- show_ma21 = input(false , "RSI2 MA1" , inline="MA #21")
- ma21_type = input("SMA" , "" , inline="MA #21", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"])
- ma21_length = input(20 , "" , inline="MA #21", minval=1)
- ma21_color = input(#00BCD4, "" , inline="MA #21")
- ma21 = mar(RSI2, ma21_length, ma21_type)
- plot(show_ma21 ? ma21 : na, color = ma21_color, title="MA №21")
- show_ma22 = input(false , "RSI2 MA2", inline="MA #22")
- ma22_type = input("SMA" , "" , inline="MA #22", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"])
- ma22_length = input(30 , "" , inline="MA #22", minval=1)
- ma22_color = input(#2196F3, "" , inline="MA #22")
- ma22 = mar(RSI2, ma22_length, ma22_type)
- plot(show_ma22 ? ma22 : na, color = ma22_color, title="MA №22")
- ////////
- p1=hline(70, color=#FF9800, linestyle=hline.style_dashed, linewidth=1)
- p2=hline(60, color=#FF5252, linestyle=hline.style_dashed, linewidth=1)
- hline(50, color=#9C27B0, linestyle=hline.style_dotted, linewidth=1)
- p3=hline(40, color=#4CAF50, linestyle=hline.style_dashed, linewidth=1)
- p4=hline(30, color=#00E676, linestyle=hline.style_dashed, linewidth=1)
- fill(p1,p2, color=color.new(color.red, 88), title="sel area")
- fill(p3,p4, color=color.new(color.green, 88), title="buy area")
Advertisement
Add Comment
Please, Sign In to add comment