keksParticipant
Average
Hi,
I would like to explore the possibility to visually view profit target using a simple SuperTrend indicator on ProRealtime. In the chart when price changes the trend (orange dots go green for instance), I would like a horizontal line drawn at for example 5atr above in case trend is up. when price touches this line I would like another line to be drawn 5atr above and so on until the trend changes. When a new line is drawn I would like the previous line to stop being drawn. I have attached a sample where I have manually drawn white segments the way I would like them to show up. The lower chart in aqua is ATRcustom simply ATR(14)*5.
Thanks!
Here is the code to plot the target takeprofit levels as you described:
st=Supertrend[3,10]
iatr=AverageTrueRange[14](close)*5
if close crosses over st or close crosses over level then
startbar=barindex
level = close+iatr
elsif close crosses under st or close crosses under level then
startbar=barindex
level = close-iatr
endif
offset = max(1,barindex-startbar)
drawsegment(barindex[offset],level,barindex,level)
return
keksParticipant
Average
Amazing!
Looks exactly like I wished. Many many thanks!