Thanks a lot Mike.

Btw - the

Sell = Low < ValueWhen(ExRem(Buy, Sell), Low);

solution doesn't work like stated, as the "Sell" variable within the ExRem() 
function is not initiated before this code line has been executed.

--- In [email protected], "Mike" <sfclimb...@...> wrote:
>
> I believe that your understanding of stopTypeLoss is correct. 
> stopTypeTrailing will move up over time to hang from from new highest highs. 
> So no, stopTypeTrailing is not tied to the entry bar values.
> 
> Mike
> 
> --- In [email protected], "rise_t575" <rise_t@> wrote:
> >
> > 
> > 
> > Thanks very much for all the help.
> > 
> > When looking at the logic of
> > 
> > ApplyStop(stopTypeLoss, stopModePoint, BuyPrice - Low, ...);
> > 
> > it seems like all variables used for the "Amount" parameter of the 
> > ApplyStop() function refer to the entry bar (at least when using 
> > stopTypeLoss - don't know if this is true when using e. g. 
> > stopTypeTrailing), i. e. BuyPrice = value of BuyPrice array at entry bar, 
> > and Low = value of Low array at entry bar.
> > 
> > Is my understanding of ApplyStop() parameters correct? And: Would this 
> > statement be true as well when using stopTypeTrailing?
> > 
> > --- In [email protected], "Edward Pottasch" <empottasch@> wrote:
> > >
> > > Valuewhen has the same issue with redundant signals as Ref does. I was 
> > > simply answering to the question if Sell = L < Ref(L, - BarsSince(Buy)); 
> > > is correct.  And it is correct. 
> > > 
> > > rgds Ed
> > > 
> > > 
> > > 
> > > 
> > > 
> > > From: Mike 
> > > Sent: Wednesday, August 04, 2010 9:30 AM
> > > To: [email protected] 
> > > Subject: [amibroker] Re: Exit if L < L of Entry Bar
> > > 
> > > 
> > >   
> > > That is true only when you are certain that there are no redundant 
> > > signals between the actual buy and the actual sell. For example,
> > > 
> > > Buy = Cross(High, 50);
> > > Sell = Cross(50, High);
> > > 
> > > will not produce redundant signals (since the opposite cross must occur 
> > > before a new cross can again occur). However,
> > > 
> > > Buy = High >= 50;
> > > Sell = 50 > High;
> > > 
> > > will produce redundant signals (since the price can remain above the 
> > > threshold for an extended duration) and using BarsSince will not give you 
> > > the value at the time of the original Buy, but rather at the time of the 
> > > most recent redundant signal.
> > > 
> > > Mike
> > > 
> > > --- In [email protected], "Edward Pottasch" <empottasch@> wrote:
> > > >
> > > > hi,
> > > > 
> > > > yes that is correct.
> > > > 
> > > > same result would be:
> > > > 
> > > > Sell = L < Valuewhen(Buy,L);
> > > > 
> > > > when you make a plot of valuewhen(Buy,L) and Ref(L,-Barssince(Buy)) you 
> > > > find they give the same result. Ref is a function that supports 
> > > > variable periods:
> > > > 
> > > > http://www.amibroker.com/guide/a_varperiods.html
> > > > 
> > > > regards, Ed
> > > > 
> > > > 
> > > > 
> > > > 
> > > > From: rise_t575 
> > > > Sent: Wednesday, August 04, 2010 2:51 AM
> > > > To: [email protected] 
> > > > Subject: [amibroker] Exit if L < L of Entry Bar
> > > > 
> > > > 
> > > > 
> > > > Hello,
> > > > 
> > > > What would be the correct code for this?
> > > > 
> > > > Is this one 100% correct:
> > > > 
> > > > Sell = L < Ref(L, - BarsSince(Buy));
> > > > 
> > > > Or do I have to use the the EXREM() function somewhere within the 
> > > > formula (I don't have any experience with this one)?
> > > > 
> > > > Thanks in advance!
> > > >
> > >
> >
>


Reply via email to