In this complete system Jim Berg uses the volatility indicator 2 times the ATR 10 periods by default, for the entry signal as well as the trailing stop.
He also uses it to produce a takeprofit line on the chart (the small violet points) to indicate when prices have moved up suddenly. This can be a signal to take profits before a possible pullback to more normal price movements. The system is set up for long trades only.
//PRC_ATR Volatility Jim Berg | indicator
//23.03.2020
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
ATRmult = 2 //ATR multiplier
// --- end of settings
// ATR trailing stop line
iATR = averagetruerange[10]
vel1 = Close - ATRmult*iATR
temp = 0
for j = 0 to 14 do
temp = Max(temp,vel1[j])
next
vel = temp
// velocity points
if Close> lowest[20](low) + ATRmult*iATR then
trend = 1
vel3 = average[13,1](high) + ATRmult*iATR
endif
if Close < highest[20](high) - ATRmult*iATR then
trend = -1
vel3 = average[13,1](low) - ATRmult*iATR
endif
if trend = 1 then
drawcandle(open,high,low,close) coloured(0,255,0)
else
drawcandle(open,high,low,close) coloured(255,0,0)
endif
return vel style(line) as "Trailing stop ATR" , vel3 coloured(238,130,238) style(point,3) as "Velocity points"