trailing stop loss |
Post Reply |
Author | |
slips
Regular Joined: 20 Oct 2009 Posts: 21 |
Post Options
Quote Reply
Topic: trailing stop loss Posted: 04 Mar 2011 at 1:26pm |
Hi again
I asked a question last night, but reading it now I don't think anyone would have quite got what i was asking. I have been unable to work out how to put my own trailing stop loss in my charts. can anyone guide me through the right process
slips
|
|
slips
|
|
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options Quote Reply Posted: 04 Mar 2011 at 9:32pm |
Hello slips,
What kind of stop loss did you want to use, example. ATR or percentage or another?
|
|
cmacdon
BullCharts Guru Joined: 09 Sep 2012 Location: Brisbane Posts: 236 |
Post Options Quote Reply Posted: 16 Sep 2012 at 6:26am |
Here is an indicator to play around with. I developed it some time ago when I read a Michael Jenkins article where he used the square root theory to set stop loss levels but I discarded Sq roots method as it did not seem to work too well on some low value dollar ASX stocks.
Instead, this indicator attempts to show whether a stop loss based on the settings for a number of ATRs is more conservative than a % stop set by the user. It is interesting as once set the more conservative solution changes from time to time as shown by the colour fills and some markers. A variable requires the indicator to be set for Longs or shorts. [target =Price;] n := input("Time periods for highest high",15); type := input("Is this Stop for 1 Long or 2 Short",1); sl := input("percent for Stop Loss",6);
LongPercent:= If(type=1,Highest(h,n)-((sl/100)*C),undefined);
[color =Dark Gray; linestyle=Dotted; width=2;] LongPercent; S2 := input("No. of ATRs for Stop Loss",2); LongATR:= If(type=1,Highest(h,n)-(atr(n)*s2),undefined); [color = Dark Purple; linestyle=Dotted; width=2;] LongATR; { Fill } [name =Fill; linestyle=fill; visible=false] [color = Dark Gray] LongPercent; [color = Dark Purple] LongATR; [name =% Set more conservative; linestyle=marker; marker=type1; visible=no] [tooltip="% Set more conservative"] cross (LongPercent, LongATR); [name =ATR set more conservative; linestyle=marker; marker=type1; visible=no] [tooltip="ATR set more conservative"] cross (LongATR, LongPercent); shortPercent:= If(type=2,Lowest(l,n)+((sl/100)*C),undefined);
[color =Dark Gray; linestyle=Dotted; width=2;] ShortPercent;
ShortATR:= If(type=2,Lowest(h,n)+(atr(n)*s2),undefined); [color = Dark Purple; linestyle=Dotted; width=2;] ShortATR; { Fill } [name =Fill; linestyle=fill; visible=false] [color = Dark Gray] ShortPercent; [color = Dark Purple] ShortATR; [name =% set more conservative; linestyle=marker; marker=type1; visible=no] [tooltip="% set more conservative"] cross (ShortPercent, ShortATR); [name =ATR set more conservative; linestyle=marker; marker=type1; visible=no] [tooltip="ATR set more conservative"] cross (ShortATR, ShortPercent); |
|
BC User since June 2007
|
|
Post Reply |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |