0% found this document useful (0 votes)
22 views

indicator

Sell and buy

Uploaded by

bekap47420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

indicator

Sell and buy

Uploaded by

bekap47420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

// 8888888888 8888888b. 8888888888 8888888888 d8888 888 .d8888b.

.d88888b. As you
// 888 888 Y88b 888 888 d88888 888 d88P Y88b
d88P" "Y88b Can see
// 888 888 888 888 888 d88P888 888 888 888
888 888 Are all
// 8888888 888 d88P 8888888 8888888 d88P 888 888 888
888 888 .d8888b Basic free
// 888 8888888P" 888 888 d88P 888 888 888 88888
888 888 88K tradingview
// 888 888 T88b 888 888 d88P 888 888 888 888
888 888 "Y8888b. indicators
// 888 888 T88b 888 888 d8888888888 888 Y88b d88P
Y88b. .d88P X88 repackaged
// 888 888 T88b 8888888888 8888888888 d88P 888 88888888 "Y8888P88
"Y88888P" 88888P' into one
//
// FAQ
//
// Why?
// I want you to see what you are willing to pay hundereds of dollars a month

// Has the code been leaked/hacked?


// No, this code has been created only using common sense and public information
from the internet

// What's the accuracy I can expect from this version of the indicator?
// I'd say it's about 90% the same as the one you would pay

// The indicator needs to be updated?


// Write me a private message on TradingView (Nick42_for_win)

// Can I suggest an indicator to get a FREE ALGOs version?


// Write me a private message on TradingView (Nick42_for_win)

// Do you get any monetary return from this project?


// Nope, 0$

// Enjoy ;)

//@version=5
indicator("BTC AI]", overlay=true, precision=0, explicit_plot_zorder=true,
max_labels_count=500)

//------------------ AI Signals | https://www.getaisignals.com ---------------//


// Get user input
sensitivity = input.float(4, " Sensitivity (0.5 - 4)", 0.5, 20, step=0.1)
emaCloud = input.bool(false, "EMA Cloud")
suppRes = input.bool(false, "Support & Resistance")
breaks = input.bool(false, "Breaks")
usePsar = input.bool(false, "PSAR")
emaEnergy = input.bool(true, "EMA Energy")
// Functions
supertrend(_src, factor, atrLen) =>
atr = ta.atr(atrLen)
upperBand = _src + factor * atr
lowerBand = _src - factor * atr
prevLowerBand = nz(lowerBand[1])
prevUpperBand = nz(upperBand[1])
lowerBand := lowerBand > prevLowerBand or close[1] < prevLowerBand ?
lowerBand : prevLowerBand
upperBand := upperBand < prevUpperBand or close[1] > prevUpperBand ?
upperBand : prevUpperBand
int direction = na
float superTrend = na
prevSuperTrend = superTrend[1]
if na(atr[1])
direction := 1
else if prevSuperTrend == prevUpperBand
direction := close > upperBand ? -1 : 1
else
direction := close < lowerBand ? 1 : -1
superTrend := direction == -1 ? lowerBand : upperBand
[superTrend, direction]
// Get Components
ocAvg = math.avg(open, close)
ema1 = ta.ema(high, 9)
ema2 = ta.ema(high, 12)
ema3 = ta.ema(high, 15)
ema4 = ta.ema(high, 18)
sma1 = ta.sma(close, 5)
sma2 = ta.sma(close, 6)
sma3 = ta.sma(close, 7)
sma4 = ta.sma(close, 8)
sma5 = ta.sma(close, 9)
sma6 = ta.sma(close, 10)
sma7 = ta.sma(close, 11)
sma8 = ta.sma(close, 12)
sma9 = ta.sma(close, 13)
sma10 = ta.sma(close, 14)
sma11 = ta.sma(close, 15)
sma12 = ta.sma(close, 16)
sma13 = ta.sma(close, 17)
sma14 = ta.sma(close, 18)
sma15 = ta.sma(close, 19)
sma16 = ta.sma(close, 20)
psar = ta.sar(0.02, 0.02, 0.2)
[supertrend, direction] = supertrend(close, sensitivity, 11)
barsL = 10
barsR = 10
pivotHigh = fixnan(ta.pivothigh(barsL, barsR)[1])
pivotLow = fixnan(ta.pivotlow(barsL, barsR)[1])
// Colors
green = #2BBC4D, green2 = #00DD00
red = #C51D0B, red2 = #DD0000
emaCloudColor = emaCloud ? (close > supertrend ? #71CD6D : #D75131) : na
emaEnergyColor(ma) => emaEnergy ? (close >= ma ? green : red) : na
// Plots
p1 = plot(ema1, "", na, editable=false)
p2 = plot(ema2, "", emaCloudColor, editable=false)
p3 = plot(ema3, "", emaCloudColor, editable=false)
p4 = plot(ema4, "", na, editable=false)
fill(p1, p2, emaCloud ? (ema2 > ema3 ? color.new(#D75131, 80) : color.new(#71CD6D,
80)) : na)
fill(p4, p3, emaCloud ? (ema2 < ema3 ? color.new(#D75131, 80) : color.new(#71CD6D,
80)) : na)
fill(p2, p3, emaCloud ? color.new(emaCloudColor, 35) : na)
plot(sma1, "", emaEnergyColor(sma1), editable=false)
plot(sma2, "", emaEnergyColor(sma2), editable=false)
plot(sma3, "", emaEnergyColor(sma3), editable=false)
plot(sma4, "", emaEnergyColor(sma4), editable=false)
plot(sma5, "", emaEnergyColor(sma5), editable=false)
plot(sma6, "", emaEnergyColor(sma6), editable=false)
plot(sma7, "", emaEnergyColor(sma7), editable=false)
plot(sma8, "", emaEnergyColor(sma8), editable=false)
plot(sma9, "", emaEnergyColor(sma9), editable=false)
plot(sma10, "", emaEnergyColor(sma10), editable=false)
plot(sma11, "", emaEnergyColor(sma11), editable=false)
plot(sma12, "", emaEnergyColor(sma12), editable=false)
plot(sma13, "", emaEnergyColor(sma13), editable=false)
plot(sma14, "", emaEnergyColor(sma14), editable=false)
plot(sma15, "", emaEnergyColor(sma15), editable=false)
plot(sma16, "", emaEnergyColor(sma16), editable=false)
barcolor(close > supertrend ? #2BE300 : red2)
p5 = plot(ocAvg, "", na, editable=false)
p6 = plot(psar, "PSAR", usePsar ? (psar < ocAvg ? green : red) : na, 1,
plot.style_circles, editable=false)
fill(p5, p6, usePsar ? (psar < ocAvg ? color.new(green, 90) : color.new(red, 90)) :
na, editable=false)
y1 = low - (ta.atr(30) * 2)
y2 = high + (ta.atr(30) * 2)
bull = ta.crossover(close, supertrend) and close >= sma9
bear = ta.crossunder(close, supertrend) and close <= sma9
buy = bull ? label.new(bar_index, y1, "BUY", xloc.bar_index, yloc.price, #2BE300,
label.style_label_up, color.white, size.normal) : na
sell = bear ? label.new(bar_index, y2, "SELL", xloc.bar_index, yloc.price, red2,
label.style_label_down, color.white, size.normal) : na
plot(pivotHigh, "Resistance", not suppRes or ta.change(pivotHigh) ? na : red, 2,
offset=-(barsR + 1), editable=false)
plot(pivotLow, "Support", not suppRes or ta.change(pivotLow) ? na : green, 2,
offset=-(barsR + 1), editable=false)
plotshape(breaks and ta.crossover(close, pivotHigh), "Break", shape.labelup,
location.belowbar, green, 0, "B", color.white, false, size.small)
plotshape(breaks and ta.crossunder(close, pivotLow), "Break", shape.labeldown,
location.abovebar, red, 0, "B", color.white, false, size.small)
// Alerts
alertcondition(bull or bear or ta.crossover(close, pivotHigh) or
ta.crossunder(close, pivotLow), "Alert Any", "AI Signals Gold\nAlert Triggered on
{{ticker}} @ {{close}}")
alertcondition(bull, "Alert Buy", "AI Signals Gold\nBuy {{ticker}} @ {{close}}")
alertcondition(bear, "Alert Sell", "AI Signals Gold\nSell {{ticker}} @ {{close}}")
alertcondition(ta.crossover(close, pivotHigh), "Broke Resistance", "AI Signals
Gold\nBroke Resistance on {{ticker}} @ {{close}}")
alertcondition(ta.crossunder(close, pivotLow), "Broke Support", "AI Signals Gold\
nBroke Support on {{ticker}} @ {{close}}")

You might also like