BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: trailing stop loss
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

trailing stop loss

 Post Reply Post Reply
Author
Message / View First Unread Post
slips View Drop Down
Regular
Regular
Avatar

Joined: 20 Oct 2009
Posts: 21
Post Options Post Options   Quote slips Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post 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?
 
 
Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz