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

Re: [amibroker] Re: Loss Stop



PureBytes Links

Trading Reference Links

Hello,

In AmiBroker there are 3 types of built-in stops.
What you want is simply max. loss stop (type = 0 ):

ApplyStop( 0, 2, fixed_amount_in_points, 1 );

It is all 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, 1, optimize( "max. loss stop level", 10, 2, 30, 1 ), 1 );



Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message ----- 
From: <tchan95014@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, November 27, 2001 6:14 PM
Subject: [amibroker] Re: Loss Stop


> Thanks, Stephane,
> 
> However, from what Tomasz said, it seems to me, the fixed stop is 
> an 'amount', that is a value counted down from the highest high of 
> the trade has reached earlier, so that the stop PRICE level changes 
> as the trade goes on, if it has a chance.
> What I am looking for is a none changing price level (maximum loss 
> stop) throughout the trade and it is calculated from under the 
> trigger day low and it stays.
> 
> Thomas
> 
> 
> --- In amibroker@xxxx, "Stephane Carrasset" <nenapacwanfr@xxxx> wrote:
> > I think the applystop makes this job,
> > I have asked Tz about the applystop many times,
> > the applystop take the value of the first entry and keep its value 
> > during the trade, others entries signal are not taken in account
> > 
> > stephane
> > 
> > > Hi, Tomasz and all,
> > > 
> > > I did not get an answer last time, let me try again.
> > > 
> > > How do I add a loss stop at the signal day low - 0.125?
> > > 
> > > Example:
> > > 
> > > Day0 1 2 3 ... 20
> > > ----- ----- ---- ----
> > > Signal trigged
> > > BUY @ signal day H + 0.125
> > > enter a loss STOP @ signal day L - 0.125 GTC
> > > Exit 20 days later if the loss 
> STOP 
> > is 
> > > not hit.
> > > 
> > > any time during these 20 days, if the price dips down lower than 
> > the 
> > > signal day L - 0.125, the position is closed.
> > > 
> > > This loss STOP stays the same throughout the trade, but it is 
> > > different from trade to trade depends on the signal day L.
> > > 
> > > Please advise, thanks...
> > > 
> > > Thomas
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>