NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

//@version=2
//@Editted by: Mehrdad
//This indicator was made to allow 10 moving averages to be displayed without needing to use up 3 charting indicators individually.
//This codes are modified for Crocobot, speicial thanks to Mr Emami Nezhad. <3
study("SMAs, ATR, Fibo, Ichi, BBand", shorttitle="SMAs, ATR, Fibo, Ichi, BBand", overlay=true)


//User choices below
ch1=input(true , title="SMA 20")
ch2=input(true , title="SMA 40")
ch3=input(true , title="SMA 50")
ch4=input(true , title="SMA 100")
ch5=input(true , title="SMA 200")
ch6=input(false , title="SMA 250")
ch7=input(false , title="SMA 300")
ch8=input(false , title="SMA 400")
ch9=input(false , title="SMA 500")
ch10=input(false , title="SMA 600")
ch12=input(false , title="Bollinger Band")
ch13=input(true , title="ATR Trailing Stop (SELL ZONE)")
ch14=input(true , title="Fibonacci Levels (GOLDEN LINE)")
ch15=input(true , title="Ichimoku Line")

//SMA settings below
SMA20 =sma(close,20)
SMA40 =sma(close,40)
SMA50 =sma(close,50)
SMA100=sma(close,100)
SMA200=sma(close,200)
SMA250=sma(close,250)
SMA300=sma(close,300)
SMA400=sma(close,400)
SMA500=sma(close,500)
SMA600=sma(close,600)

//SMA styles below
plot(ch1? SMA20 : na , title="sma10" , style=line ,transp=0 , linewidth=1 , color=lime )
plot(ch2? SMA40 : na , title="sma20" , style=line ,transp=0 , linewidth=1 , color=red )
plot(ch3? SMA50 : na , title="sma50" , style=line ,transp=0 , linewidth=1 , color=fuchsia )
plot(ch4? SMA100 : na , title="sma100", style=line ,transp=0 , linewidth=1 , color=olive )
plot(ch5? SMA200 : na , title="sma200", style=line ,transp=0 , linewidth=3 , color=white )
plot(ch6? SMA250 : na , title="sma10" , style=line ,transp=0 , linewidth=1 , color=green )
plot(ch7? SMA300 : na , title="sma20" , style=line ,transp=0 , linewidth=1 , color=green )
plot(ch8? SMA400 : na , title="sma50" , style=line ,transp=0 , linewidth=1 , color=green )
plot(ch9? SMA500 : na , title="sma100", style=line ,transp=0 , linewidth=1 , color=green )
plot(ch10? SMA600 : na , title="sma200", style=line ,transp=0 , linewidth=1 , color=green )

//Bollinger Band settings below
basis = sma(close,20)
dev2 = 2 * stdev(close,20)
upper2 = basis + dev2
lower2 = basis - dev2
p2a = plot(ch12? upper2 : na , color=white , title="UPPER BB")
p2b = plot(ch12? lower2 : na , color=white , title="LOWER BB")

//Average True Range Trailing Stops settings below
nATRPeriod = 14
nATRMultip = 1.5
xATR = atr(nATRPeriod)
nLoss = nATRMultip * xATR

xATRTrailingStop = iff(close > nz(xATRTrailingStop[1], 0) and close[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), close - nLoss),
iff(close < nz(xATRTrailingStop[1], 0) and close[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), close + nLoss),
iff(close > nz(xATRTrailingStop[1], 0), close - nLoss, close + nLoss)))



plot(ch13? xATRTrailingStop: na, color=#d32f2f, title="ATR Trailing Stop", style=area, transp=60)


//Fibonacci levels settings below
fastperiod=20
emaperiod=40
toc=max(open,close)
boc=min(open,close)

effclose=if close>=open
toc
else
boc

midline=nz(ema(effclose,emaperiod))

plot(ch14? midline :na , color=yellow , title="Fibonacci Line (Golden Line)" , linewidth=2 , transp=0 , style=circles)


//Ichimoku settings below

conversionPeriods = 9
basePeriods = 26
laggingSpan2Periods = 52
displacement = 26

donchian(len) => avg(lowest(len), highest(len))

conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)

plot(ch15? conversionLine :na, color=yellow, title="Ichimoku Line", transp=0, linewidth=2)








//@version=2
// hline(OverSold,color=blue)
// hline(OverBought,color=blue)
// plot(k, color=black,title="k-line")
// plot(d, color=fuchsia,title="d-line",linewidth=1)
// *********** THIS IS FOR TEST ONLY rxx@XCZ *********** //
study(title="CROCOBOT", shorttitle="CROCOBOT")
source = close
lengthRSI = 14, lengthStoch = 14
smoothK = 3, smoothD = 3
OverSold = 25, OverBought = 75
rsi1 = rsi(source, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)
rsiAlone = rsi(close, 14)
con = rsiAlone <= 35 and k <= 24 and d <= 24
res = if con == true
1
else
0
alertcondition(con, title='BFP Alert', message='BOTTOM FISHING PROGRAM')
plot(res, color=blue, title="BFP line", linewidth=4)
// ** NOTE &&X = (x2:y3)-> &&Y = (A10:A13) <= O*

// hline(OverSold,color=blue)
// hline(OverBought,color=blue)
// plot(k, color=black,title="k-line")
// plot(d, color=fuchsia,title="d-line",linewidth=1)

sma20 = sma(high, 20)
sma40 = sma(low, 40)

changeSMA20 = change(sma20, 1)
changeSMA40 = change(sma40, 1)

slopeSMA20 = changeSMA20/1
slopeSMA40 = changeSMA40/1
rad2degree=180/3.14159265359 //pi
slopeSMA20Degree = rad2degree*atan(slopeSMA20)
slopeSMA40Degree = rad2degree*atan(slopeSMA40)
iSMA20 = 20
iBarsBack=input(defval=2,title="Bars Back",type=integer)
hline(0)
sma2sample=sma(close,iSMA20)
slopeD20=rad2degree*atan((sma2sample[1]-nz(sma2sample[iBarsBack]))/iBarsBack)
iSMA40 = 40
hline(0)
sma2sample2=sma(close,iSMA40)
slopeD40=rad2degree*atan((sma2sample2[1]-nz(sma2sample2[iBarsBack]))/iBarsBack)
iSMA25 = input(defval=25,title="I SMA",type=integer)
iSMA31 = input(defval=31,title="XTC Indicator",type=integer)
iSMA16 = input(defval=16,title="B Series",type=integer)
iSMA74 = input(defval=74,title="FoR Indicator",type=integer)
cci5=cci(close, 5)
cciCondition = if cci5[1] < -65
true
else
false
touchConditionBottom1 = if low[1] <= sma20[1]
true
else
false
touchConditionBottom2 = if low[1] > sma40[1]
true
else
false
smaSCondition = if sma20[1] > sma40[1]
true
else
false
slopeSMA20Condition = if slopeSMA20Degree > 0
true
else
false
slopeSMA40Condition = if slopeSMA40Degree > 0
true
else
false
finalResult = cciCondition and touchConditionBottom1 and touchConditionBottom2 and smaSCondition and slopeSMA20Condition and slopeSMA40Condition
x = if finalResult == true
1
else
0
// ************************* //
nowCondition = if close[0] > close[1]
true
else
false
finalResult2 = finalResult and nowCondition
y = if finalResult2 == true
2
else
0
z = if nowCondition == true
1
else
0
alertcondition(finalResult2, title='PDP Alert', message='PUMP DETECTION PROGRAM')
plot(y, title="PDP line", color=yellow, linewidth=4)
//plot(x, title="BULLISH", color=green, linewidth=4)
// Stochastic Based Relative Oversold and Overbought

//Input
// Short Stochastic Input
length1 = input(8, minval=1, title = "Short %K")
sma1 = input(3, minval=1, title="Smooth %K1")

// Base Stochastic Input
length3 = input(100, minval=1, title = "Base %K")
sma3 = input(10, minval=1, title="Smooth %K3")

// Stochastic Code

k1 = (sma(stoch(close, high, low, length1), sma1)-50)
k3 = (sma(stoch(close, high, low, length3), sma3)-50)

//Histogram 1 Calc and Plot

hist1 = (k1-k3)
plot_color1 = hist1 > hist1[1] and hist1 > 0 ? green : hist1 < hist1[1] and hist1 > 0 ? blue : hist1 < hist1[1] and hist1 <= 0 ? red : hist1 > hist1[1] and hist1 <= 0 ? orange : white
plot(hist1, color=plot_color1, style=histogram, linewidth=4, title="Diff")

//Horizontal Lines

h1=hline(80, "Extreme Up", red, solid, 3)
h2=hline(-80, "Extreme Down", green, solid, 3)
h3=hline(55, "OverBought", red, dashed, 1)
h4=hline(-55, "OverSold", green, dashed, 1)
fill(h2,h4, green, 80, "OverSold Zone")
fill(h1,h3, red, 80, "OverBought Zone")

//Code for Trend Based Zero Line
ma1 = ema(close, 13)
ma2 = ema(close, 21)
ma3 = ema(close, 34)
ma = ema(close, 89)
range = tr
rangema = ema(range, 89)
upper = ma + rangema * 0.5
lower = ma - rangema * 0.5
tr_up = ma1 > upper and ma2 > upper and ma3 > upper
tr_down = ma1 < lower and ma2 < lower and ma3 < lower
scolor = tr_up ? green : tr_down ? red : blue
plot(0, color=scolor, style=circles, linewidth=3)


fastEmaPeriod = input(9, minval=1, title="Fast EMA Periods")
slowEmaPeriod = input(26, minval=1, title="Slow EMA Periods")
showCrosses = input(true, title="Show EMA Crosses?")

fastEma = ema(close, fastEmaPeriod)
slowEma = ema(open, slowEmaPeriod)

plot(fastEma, title = 'Fast EMA', linewidth=1, color=lime)
plot(slowEma, title = 'Slow EMA', linewidth=1, color=fuchsia)

goldenCross = crossover(fastEma, slowEma)
deathCross = crossover(slowEma, fastEma)

plotarrow(showCrosses and goldenCross ? goldenCross : na, title="Golden Cross", colorup=green, maxheight=50, minheight=50, transp=0)
plotarrow(showCrosses and deathCross*-1 ? deathCross*-1 : na, title="Death Cross", colordown=red, maxheight=50, minheight=50, transp=0)

body=abs(open-close)
us= open<close ? high-close : high-open
ls = open<close ? open-low : close-low


// data = (us < body*0.1 and ls>body*2)
data= us < body*0.1 and ls>body*2
plotshape(data, text='HM')
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.