Enter your desired working stop-loss amount. Two lines are plotted representing the current bar high/low plus the average true range of the underlying (or any multiple thereof). If your desired stop amount falls within the boundaries of the envelope, the plot is blue. When the volatility increases such that your stop is probably insufficient, the plot turns red.
# ATRSTOPS # http://thinkscripter.wordpress.com # thinkscripter@gmail.com # Last Update 18 Jan 2009 input ATR_Multiple = 1.0; input Desired_Stop_Loss = 1.0; input ATR_period = 30; def val = AvgTrueRange(high, close, low, ATR_period)*ATR_Multiple; def tooVolatile = if(val>Desired_Stop_Loss,1,0); def plotColor = if(tooVolatile,5,1); plot LongStop = low-val; LongStop.AssignValueColor(getColor(plotColor)); LongStop.setStyle(curve.SHORT_DASH); plot ShortStop = high+val; ShortStop.AssignValueColor(getColor(plotColor)); ShortStop.setStyle(curve.SHORT_DASH);




Question: Where do you enter your stop loss amount?
Go to the Study Properties panel and you will see “Desired Stop Loss”….
Eric
I tried using this study but the blue lines did not change color even my stop range was not sufficent as I had multiple stop outs. Any idea what could be the cause? I tried different settings but same result.
Thanks.
Email sent but your email address appears to be invalid? Let me know the chart, timeframe, and settings you were using and we can sort out your issue.
-Eric