# Ratchet Chandelier Stop Loss - ProRealTime



## Rusty99 (27 April 2009)

I have developed a ratchet chandelier stop loss for ProRealTime.
It is developed as an indicator that "hangs" a set multiply of ATR below the recent highest HIGH. 
It includes a Rachet - it adds a small multiple of ATR each day after the Rachet was last reset by the indicator last falling within the range. 
This works on the concept of reducing your risk the longer you hold the stock. 
In the example shown below the initial setting is 1.9 * ATR - after 5 days this reduces to 1.75,  after 10 days to 1.6 and after 20 days 1.3 etc.

It is easy to change the various parameters. The settings shown below are for swing trading

Indicator (as an overlay onthe main chart)

myhigh = highest[3](high) - 1.9*(AverageTrueRange[5](close))
IF (mytot > low) THEN
	myx = 0
ELSE
	myx = myx + 0.03
ENDIF
myextra =  myx[1]*(AverageTrueRange[5](close))
mytot = myhigh +myextra
RETURN mytot

Cheers,

see previous thread 

https://www.aussiestockforums.com/forums/showthread.php?t=11818&highlight=Chandelier+exit


----------



## Wysiwyg (26 November 2009)

Rusty99 said:


> I have developed a ratchet chandelier stop loss for ProRealTime.
> In the example shown below the initial setting is 1.9 * ATR - after 5 days this reduces to 1.75,  after 10 days to 1.6 and after 20 days 1.3 etc.




I like this time ratcheting idea. Could this be added to an ATR trailing stop in Amibroker Formula Language or does anyone know of an existing formula to reduce the ATR multiplier after a set n days? 

Thanks.


----------



## peterbee (29 November 2009)

I'm not familiar with ProRealTime code, but I gather Rusty's code in effect decreases the ATR multiple, ie tightens the stop with time.  It is like a creeping time stop.  Or a parabolic stop.  

I'm curious about the logic of tightening the stop over time though.  If you are in a trend that's moving in your favour do you want to exit your position sooner?  Maybe it's better to ride the trend for longer -  and not tighten your stop so you can maximise the advantages of following the trend?


----------



## Wysiwyg (29 November 2009)

peterbee said:


> I'm not familiar with ProRealTime code, but I gather Rusty's code in effect decreases the ATR multiple, ie tightens the stop with time.  It is like a creeping time stop.  Or a parabolic stop.
> 
> I'm curious about the logic of tightening the stop over time though.  If you are in a trend that's moving in your favour do you want to exit your position sooner?  Maybe it's better to ride the trend for longer -  and not tighten your stop so you can maximise the advantages of following the trend?




All dependent upon strategy, the traders goals and risk aversion.  If anyone could guarantee a trend will continue up indefinitely then I would not bother with a trailing stop. 
The original posters suggestion is too tight for me and there are endless variables. Say a 5*ATR to 4*ATR to 3*ATR trailer adjusted every 3 months.

Like risk over time? Take wider options. Just a thought.


----------



## Wysiwyg (29 November 2009)

Wysiwyg said:


> All dependent upon strategy, the traders goals and risk aversion.



After losing nearly everything due to no strict stop loss rule (plus other misdemeanors) and giving up tens of thousands in profits over time due to no trailing stops, I have learned my lessons the hard way.


----------



## chubacca (29 December 2009)

Hey Rusty this is a very interesting formula do you mind if i upload it to wisestocktrader site?


----------

