Iván González

UT Bot Alerts indicator

Category: Indicators By: Iván González Created: March 12, 2024, 10:05 AM
March 12, 2024, 10:05 AM
Indicators
8 Comments
UT Bot Alerts indicator

The UT Bot alerts indicator is a typical trend following indicator.

The UT Bot Alerts is based on the price position and its trail stop.

When the price is above its trail stop the indicator is in an uptrend, and therefore the candles are coloured green, signalling the beginning of a trend with a green arrow.

When the price is below its trail stop the indicator is in a downtrend and the candlesticks are coloured red, marking the beginning of the trend with a red arrow.

Accompanying the price is a trail stop line which is based on the difference between the price and x times its ATR. This makes it a suitable indicator for all types of volatility, as it adjusts according to the market.

Indicator configuration:
– Type of closure: heikin ashi or not.
– a: factor that multiplies the ATR. Provides more or less sensitivity to price movements.
– c: ATR periods.

You can also configure the indicator to show or not the arrows and the colour of the candles.

//PRC_UT Bot Alerts
//version = 1
//15.02.24
//Iván González @ www.prorealcode.com
//Sharing ProRealTime knowledge
///inputs
a = 1 //Key Vaule. 'This changes the sensitivity' - Decimal
c = 10 //ATR period - Integer
drawsignals = 1 //Show arrows - Boolean
colorcandles = 1 //Color candles - Boolean
heikin = 1 // boolean. True work as Heikin A
/////////////////
xatr = averagetruerange[c](close)
nLoss = a * xatr

if heikin then
src = (open+close+high+low)/4
else
src = close
endif
 
if barindex < c then
xatrTrailingStop = undefined
pos = 0
else
if src > xatrTrailingStop[1] and src[1] > xatrTrailingStop[1] then
xAtrTrailingStop = max(xatrTrailingStop[1],src-nLoss)
else
if src < xatrTrailingStop[1] and src[1] < xatrTrailingStop[1] then
xAtrTrailingStop = min(xatrTrailingStop[1],src+nLoss)
else
if src > xatrTrailingStop[1] then
xAtrTrailingStop = src-nLoss
else
xAtrTrailingStop = src+nLoss
endif
endif
endif
 
if src[1] < xatrTrailingStop[1] and src > xAtrTrailingStop[1] then
pos = 1
r=250
g=0
b=0
else
if src[1] > xatrTrailingStop[1] and src < xatrTrailingStop[1] then
pos = -1
r=0
g=0
b=250
else
pos = pos[1]
endif
endif
endif
 
///////Trading conditions
ema = average[1](src)
above = ema crosses over xatrTrailingStop
below = ema crosses under xatrTrailingStop
 
buy1 = src > xatrTrailingStop and above
sell1 = src < xatrTrailingStop and below
 
barbuy = src > xatrTrailingStop
barsell = src < xatrTrailingStop
 
//////Plot signals and candles
if drawsignals then
if buy1 then
drawarrowup(barindex,low-0.15*averagetruerange[10])coloured("green")
elsif sell1 then
drawarrowdown(barindex,high+0.15*averagetruerange[10])coloured("red")
endif
endif
 
if colorcandles then
if barbuy then
rbar=0
gbar=250
bbar=0
elsif barsell then
rbar=250
gbar=0
bbar=0
else
rbar=125
gbar=125
bbar=125
endif
DRAWCANDLE(open, high, low, close)coloured(rbar,gbar,bbar)
endif
return xatrTrailingStop as "Trailing Stop" coloured(r,g,b)style(line,2)

Download
Filename: PRC_UT-Bot-Alerts-1.itf
Downloads: 313
Iván González
Iván González Legend
Operating in the shadows, I hack problems one by one. My bio is currently encrypted by a complex algorithm. Decryption underway...
Author’s Profile

Comments

jak
jak
2 months ago
#

is there any similar indicator that gives buy and sell signals and is non repaint

Nicolas
2 months ago
#

This indicator doesnt repaint. You can search the library with keyword "signal" to find many others: for instance: https://www.prorealcode.com/?s=signal&search_post_type%5B%5D=library&date_range=All+time

RTR
RTR
2 years ago
#

Ivan thank you for the pro-screener. I a trying to understand how to write the signals from your indicator into code. I am looking at your proscreener and indicator but I don´t get where the "buy" and "sell" signals are triggered or what part of the code is for "buy" and what part is for "sell". Can you please tell us what the code for "buy" and for "sell" is? I would like to use them.

Iván
2 years ago
#

Hi, Lines 62 and 63. These lines define buy and sell conditions.

Doddge
2 years ago
#

Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indicador "Linear Regression Candles" cruzan por encima de este indicador UT Bot Alerts indicator? Muchas gracias

RTR
RTR
2 years ago
#

It would be great. Thank you!

RTR
RTR
2 years ago
#

Hi Ivan, Could you make a Proscreener with this indicator when a buy and a sell signal (green and red arrows) appear? Also, how would you filter the arrows (buy or sell order) when there is no much movement in the market to avoid entering in the market?

Iván
2 years ago
#

Hi, to avoid range markets you could combine this indicator with ADX for example or another one. If you want to create a screener you only have to delete all drawing/plotting lines and delete variables not used in the screener. //PRC_UT Bot Alerts //version = 1 //15.02.24 //Iván González @ www.prorealcode.com //Sharing ProRealTime knowledge ///inputs a = 1.3 //Key Vaule. 'This changes the sensitivity' - Decimal c = 10 //ATR period - Integer heikin = 1 // boolean. True work as Heikin A ///////////////// xatr = averagetruerange[c](close) nLoss = a * xatr if heikin then src = (open+close+high+low)/4 else src = close endif if barindex < c then xatrTrailingStop = undefined pos = 0 else if src > xatrTrailingStop[1] and src[1] > xatrTrailingStop[1] then xAtrTrailingStop = max(xatrTrailingStop[1],src-nLoss) else if src < xatrTrailingStop[1] and src[1] < xatrTrailingStop[1] then xAtrTrailingStop = min(xatrTrailingStop[1],src+nLoss) else if src > xatrTrailingStop[1] then xAtrTrailingStop = src-nLoss else xAtrTrailingStop = src+nLoss endif endif endif if src[1] < xatrTrailingStop[1] and src > xAtrTrailingStop[1] then pos = 1 else if src[1] > xatrTrailingStop[1] and src < xatrTrailingStop[1] then pos = -1 else pos = pos[1] endif endif endif ///////Trading conditions ema = average[1](src) above = ema crosses over xatrTrailingStop //below = ema crosses under xatrTrailingStop buy1 = src > xatrTrailingStop and above //sell1 = src < xatrTrailingStop and below screener[buy1]

ProRealCode ProRealCode
Loading...