BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScan
  New Posts New Posts RSS Feed: Indicator code for trailing stop
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Indicator code for trailing stop

 Post Reply Post Reply
Author
Message / View First Unread Post
wombat40 View Drop Down
Newbie
Newbie
Avatar

Joined: 14 Aug 2010
Location: perth
Posts: 8
Post Options Post Options   Quote wombat40 Quote  Post ReplyReply Direct Link To This Post Topic: Indicator code for trailing stop
    Posted: 28 Feb 2012 at 7:26pm
Gday there,
                  Im using a trailing stop, and also an initial stop in bullcharts/ tradesim scans that works ok in tradesim system ,

Initial stop =  hist(lowest(L,8),1)

Trailing stop = Close<hist(lowest(L,8),1)   

But i want to code it so that i can use it as a indicator when viewing the results on charts...ie formula to make it a indicator..and be able to change the period etc

Just inquiring if anyone knows how to do this.?

cheers...mark
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: 01 Mar 2012 at 3:51pm
Hey mark,
 
This should do it.
 

[lineStyle=Solid; Target=Price]

n := input("Lookback periods",8,0);

hshift := input("Horizontal shift",1);

[color=steel blue]

hist(Lowest(L,n),hshift);

Back to Top
wombat40 View Drop Down
Newbie
Newbie
Avatar

Joined: 14 Aug 2010
Location: perth
Posts: 8
Post Options Post Options   Quote wombat40 Quote  Post ReplyReply Direct Link To This Post Posted: 02 Mar 2012 at 2:43pm
Thanks buddy.
                 Now can that be used as Initial stop ...or trailing stop on the charts?  Is it the same code for both, or that is the trailing stop?

Appreciate the help
     
...mark
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: 03 Mar 2012 at 12:23am

Yes that is for both Initial stop and trailing stop.

You're welcome.

 

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