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

Re: [amibroker] (unknown)



PureBytes Links

Trading Reference Links


Dear Stephane,
 
You will find my answers below.
 





 
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 stopmode = 0 - 
disable stop, 1 - amount in percent, 2 - amount in points, 3 - amountin 
percents of profit (for trailing stop only)amount = percent/point 
loss/profit trigger amount ( from 3.78 this could be an array. The 
amount of stop is sampled when buy signal occurs and this amount is used 
for the stop)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 );
 
 
 
 
> could you give me precisions about parameters 
of applystop because > the informations are not the same in the helpfile 
and in a message > of the group.> > 1/ if I want A stopLOSS 
in PERCENTAGE> type=0;/*0 - maximum loss stop*/> mode=1 OR 
2;/*CONTRADICTION: 1 - amount in percent OR mode 2 (percent > 
loss)*/> amount=optimize( "loss stop level", 10, 2, 30, 1 );> 
Exitatstop=1;
1. For percent max. loss stop 
use:
ApplyStop( 0, 1, amount, 1 );
 
> > 2/if I want a stopLOSS in POINT 
(ATR)> type=0> mode=1 or 2 /* CONTRADICTION: 2 - amount in points 
OR  mode 1 (point > loss)> */> amount= 
factor*ATR(value);> Exitatstop=1;
 
2. In this case use:
 
ApplyStop( 0, 2, amount, 1 );
 
 
> > 3/if I want a profitTARGET in 
PERCENTAGE> type=1;/*1 - profit target stop*/> mode= 1 OR3 
/*CONTRADICTION: 1 - amount in percent  OR 3 (percent of > 
profit)*/> amount=optimize( "profit stop level", 10, 2, 30, 1 );> 
Exitatstop=1;

3. In this case use:
 
ApplyStop( 1, 1, amount, 1 
);
 
 
 
> > 4/if I want a profitTARGET in POINT 
( ATR)> type=1;> mode= 2 or WHAT /* 2 - amount in points*/> 
amount= factor*ATR(value);> Exitatstop=1;> 


4. In this case use:
 
ApplyStop( 1, 2, amount, 1 );
 
Best regards,Tomasz 
Janeczko===============AmiBroker - the comprehensive share 
manager.<FONT face=Tahoma 
size=2>http://www.amibroker.com