BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: 20% Drawdown Stop Loss
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

20% Drawdown Stop Loss

 Post Reply Post Reply
Author
Message / View First Unread Post
Aakash View Drop Down
Newbie
Newbie


Joined: 15 Apr 2006
Location: Australia
Posts: 3
Post Options Post Options   Quote Aakash Quote  Post ReplyReply Direct Link To This Post Topic: 20% Drawdown Stop Loss
    Posted: 16 Apr 2006 at 9:06am
Hi,
 
I am trying to construct Alan Hull's 20% Drawdown Stop Loss indicator, however have not been succesfull. I cant find the expression for the value that is a 52 week high. The logic I am trying to work on is as below -
 
"A Value that is a 20% drawdown from the highest closing price in the past 12 months. The 20% drawdown price level should be represented by a line on a price chart. This stop loss moves up each time the price activity makes a new high, however, that the stop loss doesn't fall when price activity retreats."
 
Please can someone assist me with this ?
 
In anticipation.
 
Regards,
AG 
Back to Top
Owen View Drop Down
Regular
Regular


Joined: 15 Nov 2004
Posts: 97
Post Options Post Options   Quote Owen Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2006 at 6:59pm
Askash, you can do it by modifying Bullcharts' built-in Wilson Trailing Stop. e.g.

[Color=Green; Target=Price]
TDate:=InputDate("Date of trend", date(2004,6,25));
HoldingDays:=BarsSince(OnOrSkipped(TDate));

Stop:=HHV(c, 250)*0.8;
ValueB:= If(Stop>PREV(undefined),Stop,If(Stop<=PREV(undefined), PREV(undefined),Stop*Holdingdays));
ValueB


The main modification is the definition of stop. Here I use HHV(c, 250)*0.8, to get a line that is 80% of the highest close in the last 250 trading days. The other parts of the formula are used to make the line go up, starting from your trading date. I don't actually understand how they work though. I think it uses something that is not explained by Bullscript's manual. If Peter is still around perhaps he would care to explain.

Back to Top
Aakash View Drop Down
Newbie
Newbie


Joined: 15 Apr 2006
Location: Australia
Posts: 3
Post Options Post Options   Quote Aakash Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2006 at 9:02pm

Hi Owen,

Thanks very much for your response, however, it still seems to run into problems ... I tried that , say for BHP, whose 52 week high is 30.24 and with that the 20% drop would be 24.20. When this formula is applied the value comes to be 32.42 ...

The closest I got constructing the 20%drawdown was modifying the Simple - Stop Loss ... but it is not scaling ... :(

Wish we could debug the script to see the values it obtains as it progresses through the function ....

Thanks anyways ...

Cheers,

Aakash

 

Back to Top
Owen View Drop Down
Regular
Regular


Joined: 15 Nov 2004
Posts: 97
Post Options Post Options   Quote Owen Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2006 at 12:32am
Aakash, I use the exact same formula and it seems to work OK.

 
Back to Top
Aakash View Drop Down
Newbie
Newbie


Joined: 15 Apr 2006
Location: Australia
Posts: 3
Post Options Post Options   Quote Aakash Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2006 at 4:40pm

Hi Owen,

Thanks, I will try it again. Are you changing anything in the formula ? e.g.
1. Are you running with the default input date of 2004,6,25 or modyfying it ?
2. Do you change that 250 to reflect it as 365 (to make it 12 months) ?
3. Do I need to put anything in that "undefined" parameter under PREV ?

Thanks for all your assistance.

Regards.

Aakash 

 

Back to Top
Owen View Drop Down
Regular
Regular


Joined: 15 Nov 2004
Posts: 97
Post Options Post Options   Quote Owen Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2006 at 6:32pm
Aakash, I simply copied and pasted the formula that I posted. Absolutely nothing was changed.

I use 250 because there are 250-260 trading days in a year.

The input date is supposed to be date you entered your trade, so you can change it to suit your trades. If the date is recent then the stop line will be the same.

PREV(undefined) and Stop*Holdingdays are the parts that I don't understand. All I know is they work so I just copy the formula.
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