[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Trailingstop & applystop



PureBytes Links

Trading Reference Links

Hello,

There is much difference between mode 1. and 3.
For simplicity I will describe long postions here.

In mode 1. Amibroker checks for X % drop in PRICE
from highest high.

In mode 3. AmiBroker checks for X% drop in PROFIT
from the higest high.

Let's say that you bought at 100 and the stock reached
the high of 120 then fell down to 107. Let's assume
that there where no other peaks/troughs in the meantime.

If you put a mode 1, 10% trailing stop it would be activated
at level 120 * ( 1 - 10% ) = 108 - so in the example above your
system will close the position at 108.

If you put a mode 3, 10% (percent of profit) trailing stop it would
be activated at level 118:

MaxProfit = 120 - 100 = 20
10% from Profit = 20 * 0.1 = 2

Stop Level = HighestHigh - (10% from Profit) = 120 - 2 = 118.

As you can see mode 3 is much more sensitive.

MS supports only mode 3. (percent of profit).

Best regards, 
Tomasz Janeczko
amibroker.com

----- Original Message ----- 
From: <bmx888@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, November 27, 2001 10:10 PM
Subject: [amibroker] Re: Trailingstop & applystop


> Sorry if this has been asked.
> 
> What's the difference between mode 1 and 3:
> 1 - amount in percent, 3 - amount in percent of profit (risk)
> >From MS, I understand 3 should be the maximum profit at risk. If it's 
> a trailing stop, then what's the difference between mode 1 and 3?
> 
> Thanks,
> 
> 
> 
> --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > Hello,
> > 
> > > Thanks for the answer, but I figure that the 'amount' is a value 
> to 
> > > be substrated from the hightest high the trade has reached 
> earlier.
> > 
> > This is how trailing stop works. 
> > 
> > > Is there a way to calculate a fixed price level that stays the 
> same 
> > > without changing at all.
> > 
> > Yes. Use max. loss stop (type = 1).
> > 
> > > For example, I had a trigger value to go long at 10 1/8 at the 
> same 
> > > time I want to place a maximum loss stop of 8 7/8 and this level 
> > > stays the same throughout the trade, no changes regardless of 
> other 
> > > target stops or trailing stops that might be used later.
> > > 
> > 
> > There are 3 kinds of stops in AMiBroker: max. loss, profit target
> > and trailing. You can mix all of them in the same formula. 
> > The one you need is simply max. loss stop (type = 1 ) as described
> > in the User's Guide:
> > 
> > SYNTAX applystop( type, mode, amount, exitatstop ) 
> > RETURNS nothing 
> > FUNCTION controls built-in stops from the formula level (allows 
> optimization of stops)
> > 
> > 
> > Parameters: 
> > type = 0 - maximum loss stop, 1 - profit target stop, 2 - trailing 
> stop 
> > mode = 0 - disable stop, 1 - amount in percent, 2 - amount in 
> points, 3 - amount in percent of profit (risk)
> > amount = percent/point loss/profit trigger/risk amount. this could 
> be a number (static stop level) or an array (dynamic stop level)
> > exitatstop = 0 - exits at defined price field, 1 - exits at stop 
> level 
> > 
> > EXAMPLE applystop( 0, 2, max_loss_in_points, 1 );
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>