First mistake is I took some Version 3 code and pasted it into V4 and have got most of the conversion right but I know have error and I just can't figure out when I try to plot the series, getting the following error for each one:
line 189: Cannot call 'plot' with arguments (series[float], color=const color, style=const string, linewidth=literal integer, title=literal string);
//@version=4
study(title = "Study1", overlay = true)
> Blockquote
//strategy("Daily ATR Stop", overlay=true, precision=5)
smaFastLkb = input(14, minval=1, title='Fast SMA Period')
smaSlowLkb = input(28, minval=1, title='Slow SMA Period')
atrLkb = input(7, minval=1, title='ATR Stop Period')
atrRes = input("D", type= input.resolution, title='ATR Resolution')
atrMult = input(1, step=0.25, title='ATR Stop Multiplier')
// Get the indicators
// -------------------
atr = security(syminfo.tickerid , atrRes, atr(atrLkb))
smaFast = sma(close, smaFastLkb)
smaSlow = sma(close, smaSlowLkb)
longCondition = crossover(smaFast, smaSlow)
//if (longCondition)
// strategy.entry("Long", strategy.long)
shortCondition = crossunder(smaFast, smaSlow)
//if (shortCondition)
// strategy.entry("Short", strategy.short)
// Calc ATR Stops
float longStop = na
longStop := shortCondition ? na : longCondition ? close - (atr * atrMult) : longStop[1]
shortStop = float(na)
shortStop := longCondition ? na : shortCondition ? close + (atr * atrMult) : shortStop[1]
// Place the exits
//strategy.exit("Long ATR Stop", "Long", stop=longStop)
//strategy.exit("Short ATR Stop", "Short", stop=shortStop)
// Plot the stoplosses
plot(smaFast, color=color.orange, style = line.style_dashed, linewidth=2, title='Fast SMA')
plot(smaFast, color=color.purple, style = line.style_dashed, linewidth=2, title='Slow SMA')
plot(longStop, color=color.red, style = line.style_dashed, title='Long ATR Stop')
plot(shortStop, color= color.maroon,style = line.style_dashed, title='Short ATR Stop')