This is a trading object shared by a member. You can use this object as well as hundreds of others with QuantShare - Trading Software.
Click on the Like button or on one of the share buttons to share this object and spread the word about QuantShare.
QuantShare is an advanced trading software for stock, forex, futures, ETF and options markets. It is the best and the most complete EOD trading software software and it is FREE (beta version).
The Safezone indicator, introduced by Alexander Elder in 2002, is used as a stop order against signal reversal in trending markets.
The Safezone indicator intends to create a better trailing stop by eliminating the noise component of a trend and by creating a safer stop. It calculates two lines depending on an uptrend or a downtrend. These lines will be used as stops, one for long positions and another for short positions.
The function, I have uploaded, creates the SafeZone for long positions. It has two parameters: the lookback period, which defines the number of bars to use for the calculation and the coefficient. Generally, traders use a value of 20 for the lookback period and a value of 2 for the coefficient.
To use this function as a trailing stop in the simulator, enable trailing stops in your trading system, change the stop settings to (Point) then set the value of the stop to the following formula: close - safezone(20, 2);
You can also use it as a sell rule: sell = close < safezone(20, 2);