CryptoRox

4All-Alerts Script for an easier setup

369
This is the alert script for

People have requested this so they can simply favorite and add it to a chart rather then cut and paste. That plus some of the code got converted to ticker data due to simply being in the description.

Happy Trading :)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//@version=2
//This study is for custom alerts that are best used with the Chrome Extension AutoView for automating TradingView alerts.
//You can get the AutoView extension for FREE using the following link
//https://chrome.google.com/webstore/detail/autoview/okdhadoplaoehmeldlpakhpekjcpljmb?utm_source=chrome-app-launcher-info-dialog
study("4All-Alert", shorttitle="Alerts")

src = close
len = input(4, minval=1, title="Length")

up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

rsin = input(5)
sn = 100 - rsin
ln = 0 + rsin

short = crossover(rsi, sn) ? 1 : 0
long = crossunder(rsi, ln) ? 1 : 0

plot(long, "Long", color=green)
plot(short, "Short", color=red)

// The following are to be placed in the message section of each alert in order
//for the extension to place the trades on 1broker for you

//Short
//c=order b=long
//c=position b=long l=200 t=market
//b=short q=0.01 l=200 t=market tp=13 sl=25

//Long
//c=order b=short
//c=position b=short l=200 t=market
//b=long q=0.01 l=200 t=market tp=13 sl=25